Screen capture method for touch screen notebook based on domestic operating system
1. A screen capture method for a notebook computer based on a domestic operating system is characterized by comprising the following steps:
acquiring a screen capture signal;
judging the type of the screen capture signal;
and carrying out corresponding screen capturing operation according to the type of the screen capturing signal.
2. The screen capture method based on the domestic operating system touch screen notebook computer of claim 1, wherein the corresponding screen capture operation according to the screen capture signal type comprises the following steps:
and performing full screen capture through full screen Printscreen when a full screen capture signal is captured.
3. The screen capture method based on the domestic operating system touch screen notebook computer of claim 1, wherein the corresponding screen capture operation according to the screen capture signal type comprises the following steps:
when capturing an Alt + a (A) signal, judging whether the mouse is pressed down;
and if so, carrying out area screen capture.
4. The screen capture method based on the domestic operating system touch screen notebook computer of claim 1, wherein the corresponding screen capture operation according to the screen capture signal type comprises the following steps:
when capturing an Alt + p (P) signal, judging whether the notebook touch screen is touched;
if so, judging whether the area stroked by the finger is a closed screen area or not;
if so, carrying out screen capture by drawing the region with a finger;
if not, the current state is kept.
Background
With the rapid development of computer technology and smart phones, domestic operating systems based on Linux systems are rapidly developed, more and more individuals and enterprises begin to use Linux domestic operating systems in large quantities, the variety of various application programs is continuously increased, smart phones almost provide the same content as computers, and the computers and the smart phones are used for recording, playing videos, acquiring network news, games, reading electronic books and providing entertainment games. Program functions are constantly changing, becoming increasingly diverse and complex. The screen capture technology of the user can enable people to capture and store the content presented on the screen to a preset position according to the self interest requirement. For example, when a user watches a network video online, the user may be interested in a certain picture in the video and may want to intercept and store the certain picture locally. For example, the user may find an intended item on an online shopping website, but does not intend to purchase the item immediately, and may wish to intercept information related to the item for local storage. For another example, a user browses a paper to see a certain technical scheme, but the technical scheme needs to pay for browsing and does not provide a downloading function, and the realistic requirement prompts the application of the screen capture technology on a domestic operating system.
However, the screen capture technology in the prior art is mainly applied to non-Linux systems, such as QQ screen capture on Windows, wechat screen capture, and various screen capture software on smart phones. In recent years, although a domestic operating system based on Linux is developed vigorously, the difference between software usability and quantity and windows and smart phones is large, the screen capture technology of the domestic operating system based on Linux only has a Printscreen key full-screen capture mode at present, and the operation is not flexible and the technology is incomplete. In conclusion, no better method for performing screen capture operation on the screen content of the computer exists on the domestic operating system based on the Linux.
Disclosure of Invention
In order to solve the above problems, the present invention provides a screen capture method for a touch screen notebook based on a domestic operating system, the method comprising the steps of:
acquiring a screen capture signal;
judging the type of the screen capture signal;
and carrying out corresponding screen capturing operation according to the type of the screen capturing signal.
Preferably, the performing the corresponding screen capturing operation according to the type of the screen capturing signal includes the steps of:
and performing full screen capture through full screen Printscreen when a full screen capture signal is captured.
Preferably, the performing the corresponding screen capturing operation according to the type of the screen capturing signal includes the steps of:
when capturing an Alt + a (A) signal, judging whether the mouse is pressed down;
and if so, carrying out area screen capture.
Preferably, the performing the corresponding screen capturing operation according to the type of the screen capturing signal includes the steps of:
when capturing an Alt + p (P) signal, judging whether the notebook touch screen is touched;
if so, judging whether the area stroked by the finger is a closed screen area or not;
if so, carrying out screen capture by drawing the region with a finger;
if not, the current state is kept.
The invention provides a screen capture method based on a domestic operating system touch screen notebook, which solves the problems of single screen capture mode, inflexible screen capture, inflexible sharing mode and the like under domestic operating system platforms and foreign Linux platforms operating systems, and can be transplanted to other Linux distribution versions; for the non-touch screen notebook, the blank of functions of screen capture in a rectangular area, editing screen capture pictures and marking are realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a screen capture method of a touch screen notebook based on a domestic operating system provided by the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings in conjunction with the following detailed description. It should be understood that the description is intended to be exemplary only, and is not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
Abbreviations and key terms in this application are defined as follows:
touch screen notebook: the touch screen of the notebook computer, the touch pad on the notebook computer or the handwriting pad externally connected with the computer and other devices with touch input functions are important channels for information interaction between people and the computer. When people use the touch screen to replace a mouse or a keyboard to work, the touch screen arranged at the front end of the display is touched by fingers or other objects, and the operating system can position and select information input according to the icon or menu position touched by the fingers. The touch screen consists of a touch detection component and a touch screen controller; the touch detection component is arranged in front of the display screen and used for detecting the touch position of a user, acquiring the abscissa and the ordinate of the touch position and sending the touch position to the touch screen controller after receiving the abscissa and the ordinate; the touch screen controller is mainly used for receiving touch information from the touch point detection device, packaging the touch point coordinates into a blind data structure, and then sending the blind data structure to the operating system and the CPU. It can receive and execute the command from CPU.
Screen shot: also called screen capture, screen capture is a way to capture pictures or words or videos, and is also a computer application technology. The screen capture is divided into mobile phone screen capture and computer screen capture, and the two operation methods are different. By the technology, the interested article pictures can be intercepted from the equipment for watching, and people can be helped to better understand the use knowledge. Is a method which can be used and learned by people. The screen capture function may be implemented by some software.
Area screen capture: sending a screen capture signal (a PrintScreen can be captured on a domestic operating system) to generate a key event, setting a timestamp for judging whether full screen capture or region capture is carried out when the operating system captures the key event, monitoring DOWN events of a screen of a touch screen notebook computer in a time slice, wherein the DOWN events are divided into mouse pressing events and finger pressing events, acquiring pressed horizontal coordinates and vertical coordinates (and peripheral regions) pressing time by the operating system when the mouse is pressed, monitoring mouseKeyDown events (compared with the situation that the finger is pressed, the mouse pressing events are generally one point), mouse moving events and mouseKeyUP events if the mouse is pressed, acquiring coordinate points of the UP events, capturing a rectangular region with a diagonal line between the mouseKeyDown and the current mouseKeyUP of a user as a current screen capture region, and activating a screen capture operation interface to be packaged into a data structure. When the screen is monitored to be pressed DOWN, the moving position of the touch coordinate is monitored in a timer time slice, the coordinate of a key UP event of a screen of the notebook computer is monitored to be out of the coordinate range of a DOWN event, and if the touch screen area is an annular area, the screen is subjected to area screen capturing. Otherwise, full screen capture is carried out on the screen, if the screen is outside the time slice, the screen capture is regarded as an invalid area, and full screen capture is carried out by default. And for a full-screen screenshot area, saving the picture as a real size interface presented by the resolution set by the user by default, not processing, and performing equal-scale scaling on the screenshot action. And the area screen capture operation is used for capturing the selected range of the screen content of the touch screen notebook computer to obtain an area screen capture, and the screen capture area is not zoomed.
Referring to fig. 1, in an embodiment of the present application, the present invention provides a screen capture method for a home operating system-based touch screen notebook, where the method includes the steps of:
s1: acquiring a screen capture signal;
s2: judging the type of the screen capture signal;
s3: and carrying out corresponding screen capturing operation according to the type of the screen capturing signal.
The invention provides a screen capture method of a notebook computer based on a domestic operating system, which realizes screen capture on the domestic operating system, including full screen capture, regional capture and irregular capture, and can be transplanted to other Linux system platforms, and mainly comprises the following contents: (1) full screen intercept (Printscreen); (2) the method comprises the following steps of area screen capturing, wherein a rectangular area is dragged by a mouse, and screen content in the rectangular area is captured; (3) the irregular area is intercepted in a closed loop mode for the touch screen notebook equipment; (4) if the two closed-loop areas have the content of coordinate overlapping, the two closed-loop areas can be regarded as a new annular area and a screen capture content; (5) and the content providing option outside the corresponding annular area in the time slice is to store the graph outside the area or the graph inside the area, and the screen shot is in the opposite direction.
In this embodiment of the present application, the performing the corresponding screen capturing operation according to the type of the screen capturing signal includes:
and performing full screen capture through full screen Printscreen when a full screen capture signal is captured.
In the embodiment of the application, full screen capture is used for capturing the whole computer screen, and when the operating system is guided to a desktop environment, the whole screen is captured by using a PrintScreen shortcut key.
In this embodiment of the present application, the performing the corresponding screen capturing operation according to the type of the screen capturing signal includes:
when capturing an Alt + a (A) signal, judging whether the mouse is pressed down;
and if so, carrying out area screen capture.
In the embodiment of the application, when an operating system acquires a regional screenshot signal, by sending the regional screenshot signal Alt + a, a screenshot daemon captures the signal, in a Linux system, there may be four working areas, at this time, a current working area is acquired, the current window is an active window, a resolution of a current display device is acquired, a device coordinate specifies a position of an object by a horizontal distance and a vertical distance between the object and a left upper corner of the window, an X axis of the device coordinate is right, a Y axis is downward, a coordinate origin is located at the left upper corner of the window, according to the display device, a virtual screenshot panel is created as an intermediate layer, the virtual screenshot panel is mapped to a coordinate of the current display device, and the following points are satisfied:
(1) screen coordinates, including the entire screen, with (0,0) in the upper left corner of the screen;
(2) the maximum value of the coordinates of the resolution of the current display device is the maximum coordinates of the display device, for example, the resolution of the current window is 1440x900, and the coordinate value of the lower right corner of the screen is (1440,900);
(3) the rectangular origin of the area screenshot is obtained by capturing coordinates of a mouse DOWN and dragging a rectangular area. And acquiring the coordinate of the mouse UP time to obtain the whole rectangular area.
The Linux system can obtain a Display device by methods such as Get _ Display _ name or Get _ Current _ monitor provided by X11 and GTK, and can also specify full window coordinates or screen coordinates, the coordinates of the mouse can be obtained by (gdkaventmotion) event, the event.y can obtain coordinate values of horizontal coordinates and vertical coordinates by event.x, the mouse can obtain coordinates of pressing down the mouse by a structural body, the Display device can be obtained by Display, the window and the Display device can be obtained by whether the mouse is pressed down, the graph is processed by GdkPixbuf, and pseudo codes of the packaging structural body are as follows:
after receiving the region screen capture, the screen capture daemon firstly acquires a virtual rectangular region, monitors a Mouse pressing event, acquires a Mouse point, packages a Mouse _ keyDown event, a Mouse _ keyUP event and a Mouse _ move event, and moves the Mouse to the following structural body:
with the initial coordinates and the end point coordinates, a rectangular area can be obtained and used as an original graph to perform boundary processing, shadow, scaling and other operations, rewrite functions of a dialog box, a component and the like, and realize area interception of a screen.
In this embodiment of the present application, the performing the corresponding screen capturing operation according to the type of the screen capturing signal includes:
when capturing an Alt + p (P) signal, judging whether the notebook touch screen is touched;
if so, judging whether the area stroked by the finger is a closed screen area or not;
if so, carrying out screen capture by drawing the region with a finger;
if not, the current state is kept.
When a screen capture instruction Alt + p screen capture signal is received, another virtual screen capture panel is created according to a display device for area screen capture to serve as an intermediate layer, the virtual screen capture panel is mapped to coordinates of a device displayed by a current touch screen notebook, touchListen is responsible for message circulation in the whole life cycle of the touch screen, a finger touches any point on the screen, the current screen captures the touch screen signal and the start time of the touch screen, touchdown is used for capturing, the point pressed by the finger is set as a first time point, and the touch point is located in the current display device coordinate system and corresponds to a uniquely determined horizontal coordinate and a uniquely determined vertical coordinate. The operating system can accurately judge the position of the point, and can be packaged by a structural body, and the pseudo code of the structural body part is as follows:
at the moment, the contact time slice is activated, touch screen point data is packaged and can be stored in an array or a chain table, the methods of touchdispatch, monitoreouch and the like are realized, when a finger leaves the screen, an UP signal of a screen of a touch screen notebook computer is obtained and packaged into a touchmoveup event, and the appointed UP event of the touch screen notebook computer is touched; and recording as a second time point, comparing the difference value of the second time point and the first time point with a preset time slice, and if the difference value is smaller than the preset time slice and the coordinate points are simultaneously subjected to traversal comparison, acquiring an irregular graph area if a coordinate overlapping area exists.
In the time slice, if one screen capture area is completed, pressing another screen point can be restarted to start screen capture of the second section area. A user selects a local area of a screen of the touch screen notebook computer, and the selected area is used as a screen capturing range of a second area; when coordinate points of two irregular areas coincide in the time slice, the two irregular areas can be regarded as a screen capture area, and the irregular screen capture obtains a plurality of subunits and interface processing subunits, and the subunits and the interface processing subunits are used as a whole and are packaged by the data structure of the single irregular area. Selecting the selected area in a reverse direction, and selecting a middle reverse area to realize reverse screen capture; the interface acquisition subunit area is used for acquiring a real size interface of a screen capture area of the touch screen notebook, wherein the real size interface is a maximum physical screen which can be presented by the touch screen notebook screen; the interface processing subunit is configured to perform reduction processing on the interface with the real size, determine the processed reduced screenshot containing the screen content as a final screenshot effect, and perform further processing on the screenshot image at this time, such as giving up the screenshot, marking some content in the screenshot area, saving the content in the local area, sharing the content in a social network, and the like.
Compared with the prior art of screen capture, the embodiment can not only perform screen capture operation of screen content on the touch screen notebook to obtain the screen capture image, but also switch between different screen capture modes (full screen capture and regional capture) according to the preset mode, so that the screen capture operation can better meet various requirements of users, and further the user experience is improved.
The invention provides a screen capture method based on a domestic operating system touch screen notebook, which solves the problems of single screen capture mode, inflexible screen capture, inflexible sharing mode and the like under domestic operating system platforms and foreign Linux platforms operating systems, and can be transplanted to other Linux distribution versions; for the non-touch screen notebook, the blank of functions of screen capture in a rectangular area, editing screen capture pictures and marking are realized.
It is to be understood that the above-described embodiments of the present invention are merely illustrative of or explaining the principles of the invention and are not to be construed as limiting the invention. Therefore, any modification, equivalent replacement, improvement and the like made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. Further, it is intended that the appended claims cover all such variations and modifications as fall within the scope and boundaries of the appended claims or the equivalents of such scope and boundaries.