CN110134897B - Browser window control method and device - Google Patents

Browser window control method and device Download PDF

Info

Publication number
CN110134897B
CN110134897B CN201910285652.7A CN201910285652A CN110134897B CN 110134897 B CN110134897 B CN 110134897B CN 201910285652 A CN201910285652 A CN 201910285652A CN 110134897 B CN110134897 B CN 110134897B
Authority
CN
China
Prior art keywords
window layer
window
mouse
event
java
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910285652.7A
Other languages
Chinese (zh)
Other versions
CN110134897A (en
Inventor
毛杰
黎敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Koubei Shanghai Information Technology Co Ltd
Original Assignee
Koubei Shanghai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Koubei Shanghai Information Technology Co Ltd filed Critical Koubei Shanghai Information Technology Co Ltd
Priority to CN201910285652.7A priority Critical patent/CN110134897B/en
Publication of CN110134897A publication Critical patent/CN110134897A/en
Application granted granted Critical
Publication of CN110134897B publication Critical patent/CN110134897B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a browser window control method and a device, wherein the method comprises the following steps: monitoring a mouse pressing event in a window layer of an embedded browser architecture triggered by a user, and recording the coordinates of the starting position of the mouse pressing; monitoring a moving track formed by moving operation in a window layer of an embedded browser architecture triggered by a user, and recording relevant position coordinates of the moving track; calculating displacement information according to the starting position coordinates and the relevant position coordinates of the moving track; transmitting the displacement information to a java empty window body layer; and controlling the java empty window body layer to drive the browser window to move according to the displacement information. And monitoring the pressing of the mouse and recording the coordinates of each position by the embedded browser architecture window layer, calculating displacement information and transmitting the displacement information to the java empty window layer. The java empty window layer moves to drive the whole browser window to move, and the control of the browser window is completed.

Description

Browser window control method and device
Technical Field
The invention relates to the field of software, in particular to a browser window control method and device.
Background
Software suitable for a PC end of a computer is generally realized by adopting java technology at the bottom layer. But only the browser window generated by the java technology is simple in appearance and not attractive enough. In the prior art, in order to improve the appearance display of a browser window, for example, a browser kernel can be adopted in the browser window developed by java technology. However, since the browser window developed by the chrome kernel has a specific display mode, the appearance of the browser window cannot be customized. If the specific control part corresponding to the chrome kernel of the browser window is cancelled, the browser window cannot be controlled at all, and the operation of a user is inconvenient.
Disclosure of Invention
In view of the above, the present invention has been made to provide a browser window control method and apparatus that overcomes or at least partially solves the above-mentioned problems.
According to an aspect of the present invention, there is provided a browser window control method, where the browser window includes a java empty window layer and an embedded browser architecture window layer, the method includes:
monitoring a mouse pressing event in a window layer of an embedded browser architecture triggered by a user, and recording a starting position coordinate of the mouse pressing; the mouse pressing event is a mouse pressing event at any position of a window layer embedded with a browser architecture in a browser window; monitoring a moving track formed by moving operation in a window layer of an embedded browser architecture triggered by a user, and recording relevant position coordinates of the moving track; calculating displacement information according to the starting position coordinates and the relevant position coordinates of the moving track;
a transmission step, transmitting the displacement information to a java empty window body layer;
and a moving step, controlling the java empty window body layer to drive the browser window to move according to the displacement information.
Optionally, the listening step further comprises:
monitoring a mouse pressing event in a window layer of an embedded browser architecture triggered by a user, and judging whether the event type of the mouse pressing event is a mobile control type event or not; the event type is divided into a service processing type event or a mobile control type event according to a protocol agreed in advance;
if so, recording the coordinates of the starting position pressed by the mouse.
Optionally, the movement operation triggered by the user in the window layer of the embedded browser architecture is a mouse movement operation;
the listening step further comprises:
and monitoring a moving track formed by the movement of a mouse in a window layer of the embedded browser architecture triggered by a user, and recording the relevant position coordinates of the moving track.
Optionally, the user-triggered moving operation in the window layer of the embedded browser architecture is a keyboard moving operation;
the listening step further comprises:
and monitoring the keyboard moving operation corresponding to the direction key button clicking event triggered by the user to determine the moving direction and the preset moving distance in the moving track corresponding to the keyboard moving operation so as to obtain the displacement information.
Optionally, the step of transferring further comprises:
and transmitting the displacement information to a java empty window layer based on a pre-injected interface of the embedded browser architecture window layer.
Optionally, the listening step further comprises:
and stopping recording the moving track when a mouse bounce event in the window layer of the embedded browser architecture is monitored.
Optionally, the method further comprises:
monitoring a mouse click event of a specified area in an embedded browser architecture window layer triggered by a user;
transmitting the control instruction information corresponding to the designated area to a java empty window body layer;
and controlling the java empty window layer to operate the browser window to complete the corresponding control instruction.
According to another aspect of the present invention, there is provided a browser window control apparatus, where a browser window is a java empty window layer and an embedded browser architecture window layer, the apparatus comprising:
the first monitoring module is suitable for monitoring a mouse pressing event in a window layer of an embedded browser architecture triggered by a user and recording the coordinates of the starting position of the mouse pressing; the mouse pressing event is a mouse pressing event at any position of a window layer embedded with a browser architecture in a browser window; monitoring a moving track formed by moving operation in a window layer of an embedded browser architecture triggered by a user, and recording relevant position coordinates of the moving track; calculating displacement information according to the starting position coordinates and the relevant position coordinates of the moving track;
the first transmission module is suitable for transmitting the displacement information to the java empty window body layer;
and the moving module is suitable for controlling the java empty window body layer to drive the browser window to move according to the displacement information.
Optionally, the first listening module is further adapted to:
monitoring a mouse pressing event in a window layer of an embedded browser architecture triggered by a user, and judging whether the event type of the mouse pressing event is a mobile control type event or not; the event type is divided into a service processing type event or a mobile control type event according to a protocol agreed in advance;
if so, recording the coordinates of the starting position pressed by the mouse.
Optionally, the movement operation triggered by the user in the window layer of the embedded browser architecture is a mouse movement operation;
the first listening module is further adapted to:
and monitoring a moving track formed by the movement of a mouse in a window layer of the embedded browser architecture triggered by a user, and recording the relevant position coordinates of the moving track.
Optionally, the user-triggered moving operation in the window layer of the embedded browser architecture is a keyboard moving operation;
the first listening module is further adapted to:
and monitoring the keyboard moving operation corresponding to the direction key button clicking event triggered by the user to determine the moving direction and the preset moving distance in the moving track corresponding to the keyboard moving operation so as to obtain the displacement information.
Optionally, the first transfer module is further adapted to:
and transmitting the displacement information to a java empty window layer based on a pre-injected interface of the embedded browser architecture window layer.
Optionally, the first listening module is further adapted to:
and stopping recording the moving track when a mouse bounce event in the window layer of the embedded browser architecture is monitored.
Optionally, the apparatus further comprises:
the second monitoring module is suitable for monitoring a mouse click event of a specified area in the window layer of the embedded browser architecture triggered by a user;
the second transmission module is suitable for transmitting the control instruction information corresponding to the specified area to the java empty window body layer;
and the control module is suitable for controlling the java empty window layer to operate the browser window to complete the corresponding control instruction.
According to still another aspect of the present invention, there is provided an electronic apparatus including: the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the browser window control method.
According to still another aspect of the present invention, there is provided a computer storage medium having at least one executable instruction stored therein, where the executable instruction causes a processor to perform operations corresponding to the above browser window control method.
According to the browser window control method and device provided by the invention, a monitoring step is carried out, a mouse pressing event in an embedded browser architecture window layer triggered by a user is monitored, and a starting position coordinate of mouse pressing is recorded; the mouse pressing event is a mouse pressing event at any position of a window layer embedded with a browser architecture in a browser window; monitoring a moving track formed by moving operation in a window layer of an embedded browser architecture triggered by a user, and recording relevant position coordinates of the moving track; calculating displacement information according to the starting position coordinates and the relevant position coordinates of the moving track; a transmission step, transmitting the displacement information to a java empty window body layer; and a moving step, controlling the java empty window body layer to drive the browser window to move according to the displacement information. And recording the coordinates of the starting position pressed by the mouse and the coordinates of the position related to the movement track formed by the subsequent movement operation by monitoring the mouse pressing event. And calculating displacement information according to the recorded starting position coordinates and the relevant position coordinates of the moving track, and realizing moving the browser window according to the displacement information. The embedded browser is used for monitoring the pressing of a mouse and recording position coordinates, calculating displacement information and transmitting the displacement information to a java empty window layer. The java empty window layer moves to drive the whole browser window to move, and the control of the browser window is completed.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 shows a flow diagram of a browser window control method according to one embodiment of the present invention;
FIG. 2 illustrates a flowchart of a browser window control method according to another embodiment of the present invention;
FIG. 3 illustrates a flowchart of a browser window control method according to another embodiment of the present invention;
FIG. 4 shows a functional block diagram of a browser window control apparatus according to one embodiment of the present invention;
fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 shows a flowchart of a browser window control method according to an embodiment of the present invention. As shown in fig. 1, the browser window control method specifically includes the following steps:
step S101, a mouse pressing event in a window layer of an embedded browser architecture triggered by a user is monitored, and coordinates of a starting position of the mouse pressing are recorded.
The browser window is a browser window used by the PC terminal. When the browser window is generated, a java empty window layer is created by java technology, and a browser architecture window layer is embedded in the java empty window layer. The window layer of the embedded browser architecture is realized by a chrome embedded framework, which is a transparent mode of the browser window provided by the JCEF, namely, the generated browser window cannot be moved or can realize operations such as closing and minimizing, and cannot use self-contained components of the JCEF native browser window. On the basis, the control of the browser window is realized through the embodiment.
Specifically, a mouse-down event triggered by a user is monitored, wherein the mouse-down event is a mouse-down event at any position of a window layer of an embedded browser architecture in a browser window. The embedded browser architecture window layer may utilize H5 technology to monitor mouse down events. When a user triggers a mouse-down event, a mouse-down event of the mouse can be monitored based on the H5 technology, and coordinates of a start position of the mouse-down (e.g., event.
Step S102, monitoring a moving track formed by moving operation in an embedded browser architecture window layer triggered by a user, and recording relevant position coordinates of the moving track; and calculating displacement information according to the start position coordinates and the relevant position coordinates of the moving track.
And monitoring a moving track formed by moving operation in the window layer of the embedded browser architecture triggered by the user after the mouse pressing event is monitored.
When the movement operation triggered by the user in the window layer of the embedded browser architecture is a mouse movement operation, monitoring a movement track formed by the movement of the mouse in the window layer of the embedded browser architecture triggered by the user, specifically, acquiring position coordinates of each point corresponding to the real-time movement of the mouse in the window layer of the embedded browser architecture by using an H5 technology, and obtaining position coordinates related to the movement of each mouse in the movement track. And subtracting the coordinates in the corresponding direction according to the start position coordinates and the position coordinates related to the movement of each mouse in the movement track to calculate the difference value of the coordinates and the start position coordinates and the position coordinates, so as to obtain displacement information. The displacement information is specifically the moving distance in each direction in the window layer of the embedded browser architecture. Such as the X-direction movement distance and the Y-direction movement distance, where the X-direction and the Y-direction are included according to the position coordinate representation, the displacement information may also be represented as the movement distance in the transverse direction, the movement distance in the longitudinal direction, and the like, which are set specifically according to the actual implementation, for example.
When the movement operation triggered by the user in the window layer of the embedded browser architecture is a keyboard movement operation, for example, after the mouse pressing event triggered by the user is monitored, the user hovers the mouse, and the movement operation is completed by operating the keyboard. The keyboard operated by the user is a direction key button, such as an up, down, left and right direction key button. And monitoring the keyboard moving operation corresponding to the direction key button clicking event triggered by the user, and determining the moving direction and the preset moving distance according to the monitored direction key button clicked by the user to obtain the displacement information. Wherein, the preset moving distance of one-time clicking the direction key button can be preset aiming at each direction key button. For example, the displacement information of the left direction key button is moved leftwards in the moving direction and is moved by 50 pixels in one time.
And step S103, transmitting the displacement information to a java empty window body layer.
Because the monitoring in the above steps is all realized in the embedded browser architecture window layer, after the embedded browser architecture window layer acquires the displacement information, the displacement information also needs to be transmitted to the java empty window layer. When the displacement information is transmitted, the displacement information can be transmitted to the java empty window layer based on the interface injected in advance by the window layer of the embedded browser architecture. The content of the transfer is as follows:
Figure BDA0002023180400000071
the displacement information is transmitted by the window layer of the embedded browser architecture to inform the java empty window layer, and the browser window needs to be moved by 55 pixels in the positive direction of the X direction and 66 pixels in the positive direction of the Y direction. And transmitting corresponding numerical values according to the direction of the specific moving track when transmitting the displacement information. When the moving direction is opposite to the positive direction of the X direction or the positive direction of the Y direction, the transmitted numerical value can be a negative number. The specific content of the transfer can be set according to the implementation situation, and is not limited herein.
Further, step S102 and step S103 are both executed in real time, and when the displacement information is calculated in step S102, the calculated displacement information is transmitted to the java empty window body layer in real time.
And step S104, controlling the java empty window body layer to drive the browser window to move according to the displacement information.
After the java empty window layer receives the displacement information, the java empty window layer is controlled to drive the whole browser window to move according to the analysis result by analyzing the displacement information. As with the displacement information in the above example, the browser window is moved 55 pixels in the positive X-direction and 66 pixels in the positive Y-direction. Because the browser window is generated by embedding a browser architecture window layer in the java empty window layer, the movement of the java empty window layer is controlled to drive the whole browser window to move.
It should be noted that, in step S101 and step S102, the mouse pressing event and the movement track are monitored and monitored in the window layer of the embedded browser architecture, and the start position coordinates and the relevant position coordinates of the movement track are recorded to calculate the displacement information. Step S103 relates to the transmission of cross-layer displacement information between the embedded browser architecture window layer and the java empty window layer. Step S104 is performed by the java empty window layer to control the movement of the browser window.
According to the browser window control method provided by the invention, a monitoring step is carried out, a mouse pressing event in a window layer of an embedded browser architecture triggered by a user is monitored, and the coordinates of the starting position of the mouse pressing are recorded; the mouse pressing event is a mouse pressing event at any position of a window layer embedded with a browser architecture in a browser window; monitoring a moving track formed by moving operation in a window layer of an embedded browser architecture triggered by a user, and recording relevant position coordinates of the moving track; calculating displacement information according to the starting position coordinates and the relevant position coordinates of the moving track; a transmission step, transmitting the displacement information to a java empty window body layer; and a moving step, controlling the java empty window body layer to drive the browser window to move according to the displacement information. And recording the coordinates of the starting position pressed by the mouse and the coordinates of the position related to the movement track formed by the subsequent movement operation by monitoring the mouse pressing event. And calculating displacement information according to the recorded starting position coordinates and the relevant position coordinates of the moving track, and realizing moving the browser window according to the displacement information. The embedded browser is used for monitoring the pressing of a mouse and recording position coordinates, calculating displacement information and transmitting the displacement information to a java empty window layer. The java empty window layer moves to drive the whole browser window to move, and the control of the browser window is completed.
Fig. 2 illustrates a flowchart of a browser window control method according to another embodiment of the present invention. As shown in fig. 2, the browser window control method specifically includes the following steps:
step S201, a mouse down event triggered by a user in the window layer of the embedded browser architecture is monitored, and whether the type of the mouse down event belongs to a mobile control type event is determined.
Because the window layer of the embedded browser architecture comprises a plurality of controls, when a mouse pressing event triggered by a user is monitored, the type of the event to which the mouse pressing event belongs is also required to be judged. The event type can be distinguished as a service processing type event or a mobile control type event according to a pre-agreed protocol. The service processing type event comprises a click event (a mouse is pressed and then bounced) corresponding to a button in the window layer of the embedded browser architecture; the movement control type events comprise events corresponding to non-button areas in the window layer of the embedded browser architecture pressed by a mouse, click events which are used for directly operating the mouse to move without triggering the button after the mouse clicks the button in the window layer of the embedded browser architecture, and the like. The specific agreed protocol is set according to the implementation situation.
And executing the step S202 when the event type of the mouse pressing event is judged to be the mobile control type event, otherwise, processing the service processing type event corresponding to the mouse pressing.
Step S202, recording the coordinates of the starting position pressed by the mouse.
And acquiring coordinates of the starting position pressed by the mouse, and recording the coordinates so as to obtain displacement information through subsequent calculation.
Step S203, monitoring a moving track formed by moving operation in an embedded browser architecture window layer triggered by a user, and recording relevant position coordinates of the moving track; and calculating displacement information according to the start position coordinates and the relevant position coordinates of the moving track.
And step S204, transmitting the displacement information to a java empty window body layer.
The above steps refer to the description of steps S102-S103 in the embodiment of fig. 1, and are not described again here.
And step S205, stopping recording the moving track when a mouse bounce event in the window layer of the embedded browser architecture is monitored.
When the moving track is monitored, when a mouse bounce event in the window layer of the embedded browser architecture is monitored, namely a user releases a pressed mouse, the user does not operate the mouse to move continuously or control the keyboard to operate the moving track any more, the mouse up event can be monitored by utilizing the H5 technology, the recording of the moving track is stopped, the displacement information is not calculated any more, and the displacement information does not need to be transmitted to the java hollow window layer continuously.
And S206, controlling the java empty window body layer to drive the browser window to move according to the displacement information.
And the java empty window layer correspondingly moves according to the direction, the distance and the like in the displacement information according to the displacement information received in real time, so that the whole browser window is driven to correspondingly move. When the mouse pops up, the user does not perform movement control on the browser window any more, the embedded browser architecture window layer does not transmit displacement information to the java empty window layer, the java empty window layer stops moving, and the browser window stops moving.
According to the browser window control method provided by the invention, service processing type events or movement control type events are distinguished according to a pre-agreed protocol, and when a mouse pressing event triggered by a user is a movement control type event, displacement information is calculated according to a movement track formed by user operation and transmitted to a java empty window layer, so that the browser window is controlled to move according to the displacement information. Furthermore, a mouse bounce event is monitored, the recording of the moving track is stopped in time, and the consistency of the movement of the browser window and the operation of the user on the browser window is guaranteed.
Fig. 3 illustrates a flowchart of a browser window control method according to another embodiment of the present invention. As shown in fig. 3, the browser window control method specifically includes the following steps:
step S301, a mouse click event of a specified area in an embedded browser architecture window layer triggered by a user is monitored.
Since the generated browser window cannot implement operations such as closing and minimizing, the present embodiment implements the above control operation on the browser window. Specifically, designated areas are set in the window layer of the embedded browser architecture, the designated areas may be one or more, and different designated areas correspond to different control operations. For example, in order to meet the daily operation habit of the user, the designated area can be set at the upper right corner of the window layer of the embedded browser architecture. The designated area includes, for example, a closing operation designated area, a minimizing operation designated area, and the like.
And monitoring a mouse click event triggered in the window layer of the embedded browser architecture, and executing the step S302 when the mouse click event is determined to occur in a specified area.
Step S302, the control instruction information corresponding to the designated area is transmitted to the java empty window layer.
And each designated area corresponds to different control operations, and corresponding control instruction information is determined according to the designated area where the triggered mouse click event is located. The control instruction information includes, for example, minimization control instruction information, closing control instruction information, and the like. And transmitting the control instruction information corresponding to the designated area to a java empty window layer based on a pre-injected interface of the embedded browser architecture window layer.
And step S303, controlling the java empty window layer to operate the browser window to complete a corresponding control instruction.
And after the java empty window layer receives the control instruction information, the browser window is correspondingly operated through the java technology to realize the control instruction. If the control instruction information is the minimum control instruction information, the java empty window layer minimizes the browser window after receiving the minimum control instruction information.
According to the browser window control method provided by the invention, a mouse click event of a specified area in an embedded browser architecture window layer triggered by a user is monitored, control instruction information corresponding to the specified area is transmitted to a java empty window layer, and the java empty window layer is controlled to operate a browser window to complete a corresponding control instruction, so that the browser window is controlled according to user operation.
Fig. 4 shows a functional block diagram of a browser window controlling apparatus according to an embodiment of the present invention. As shown in fig. 4, the browser window control apparatus includes the following modules:
the first listening module 410 is adapted to: monitoring a mouse pressing event in a window layer of an embedded browser architecture triggered by a user, and recording the coordinates of the starting position of the mouse pressing; the mouse pressing event is a mouse pressing event at any position of a window layer embedded with a browser architecture in a browser window; monitoring a moving track formed by moving operation in a window layer of an embedded browser architecture triggered by a user, and recording relevant position coordinates of the moving track; and calculating displacement information according to the start position coordinates and the relevant position coordinates of the moving track.
The first transfer module 420 is adapted to: and transmitting the displacement information to a java empty window body layer.
The movement module 430 is adapted to: and controlling the java empty window body layer to drive the browser window to move according to the displacement information.
Optionally, the first listening module 410 is further adapted to: monitoring a mouse pressing event in a window layer of an embedded browser architecture triggered by a user, and judging whether the event type of the mouse pressing event is a mobile control type event or not; the event type is divided into a service processing type event or a mobile control type event according to a protocol agreed in advance; if so, recording the coordinates of the starting position pressed by the mouse.
Optionally, the movement operation triggered by the user in the window layer of the embedded browser architecture is a mouse movement operation; the first listening module 410 is further adapted to: and monitoring a moving track formed by the movement of a mouse in a window layer of the embedded browser architecture triggered by a user, and recording the relevant position coordinates of the moving track.
Optionally, the user-triggered moving operation in the window layer of the embedded browser architecture is a keyboard moving operation; the first listening module 410 is further adapted to: and monitoring the keyboard moving operation corresponding to the direction key button clicking event triggered by the user to determine the moving direction and the preset moving distance in the moving track corresponding to the keyboard moving operation so as to obtain the displacement information.
Optionally, the first transfer module 420 is further adapted to: and transmitting the displacement information to a java empty window layer based on a pre-injected interface of the embedded browser architecture window layer.
Optionally, the first listening module 410 is further adapted to: and stopping recording the moving track when a mouse bounce event in the window layer of the embedded browser architecture is monitored.
Optionally, the apparatus further comprises: a second listening module 440, a second transfer module 450, and a control module 460.
The second listening module 440 is adapted to: and monitoring a mouse click event of a specified area in the window layer of the embedded browser architecture triggered by a user.
The second transfer module 450 is adapted to: and transmitting the control instruction information corresponding to the specified area to the java empty window body layer.
The control module 460 is adapted to: and controlling the java empty window layer to operate the browser window to complete the corresponding control instruction.
The descriptions of the modules refer to the corresponding descriptions in the method embodiments, and are not repeated herein.
The application also provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the browser window control method in any method embodiment.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
As shown in fig. 5, the electronic device may include: a processor (processor)502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein:
the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508.
A communication interface 504 for communicating with network elements of other devices, such as clients or other servers.
The processor 502 is configured to execute the program 510, and may specifically execute relevant steps in the above-described browser window control method embodiment.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the present invention. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may be specifically configured to cause the processor 502 to execute a browser window control method in any of the above-described method embodiments. For specific implementation of each step in the program 510, reference may be made to corresponding steps and corresponding descriptions in units in the above browser window control embodiment, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a browser window control apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (14)

1. A browser window control method, wherein the browser window is a java empty window layer and an embedded browser architecture window layer, and the browser architecture window layer is embedded in the java empty window layer, the method comprises the following steps:
monitoring a mouse pressing event in the window layer of the embedded browser architecture triggered by a user, and recording the coordinates of the starting position of the mouse pressing; the mouse pressing event is a mouse pressing event at any position of a window layer of an embedded browser architecture in the browser window; monitoring a moving track formed by moving operation in the embedded browser architecture window layer triggered by a user, and recording relevant position coordinates of the moving track; calculating displacement information according to the starting position coordinates and the relevant position coordinates of the moving track; the displacement information is specifically the moving distance in each direction in the window layer of the embedded browser architecture; monitoring and monitoring mouse pressing events and moving tracks in a window layer of an embedded browser architecture;
a transmission step, namely transmitting the displacement information to the java empty window layer based on a pre-injected interface of the embedded browser architecture window layer;
and a moving step, namely analyzing the displacement information by a java empty window layer, and controlling the java empty window layer to drive the browser window to move according to an analysis result.
2. The method of claim 1, wherein the listening step further comprises:
monitoring a mouse pressing event in the window layer of the embedded browser architecture triggered by a user, and judging whether the event type of the mouse pressing event is a mobile control type event or not; the event type is divided into a service processing type event or a mobile control type event according to a protocol agreed in advance;
if so, recording the coordinates of the starting position pressed by the mouse.
3. The method of claim 1, wherein the user-triggered move operation in the embedded browser architecture window layer is a mouse move operation;
the listening step further comprises:
and monitoring a moving track formed by the movement of a mouse in the window layer of the embedded browser architecture triggered by a user, and recording the relevant position coordinates of the moving track.
4. The method of claim 1, wherein the user-triggered move operation in the embedded browser architecture window layer is a keyboard move operation;
the listening step further comprises:
and monitoring the keyboard moving operation corresponding to the direction key button clicking event triggered by the user to determine the moving direction and the preset moving distance in the moving track corresponding to the keyboard moving operation so as to obtain displacement information.
5. The method of any of claims 1-4, wherein the listening step further comprises:
and stopping recording the moving track when a mouse bounce event in the window layer of the embedded browser architecture is monitored.
6. The method according to any one of claims 1-4, wherein the method further comprises:
monitoring a mouse click event of a specified area in the window layer of the embedded browser architecture triggered by a user;
transmitting the control instruction information corresponding to the designated area to the java empty window body layer;
and controlling the java empty window layer to operate the browser window to complete a corresponding control instruction.
7. A browser window control apparatus, wherein the browser windows are a java empty window layer and an embedded browser architecture window layer, and the browser architecture window layer is embedded inside the java empty window layer, the apparatus comprising:
the first monitoring module is suitable for monitoring a mouse pressing event in the window layer of the embedded browser architecture triggered by a user and recording the coordinates of the starting position of the mouse pressing; the mouse pressing event is a mouse pressing event at any position of a window layer of an embedded browser architecture in the browser window; monitoring a moving track formed by moving operation in the embedded browser architecture window layer triggered by a user, and recording relevant position coordinates of the moving track; calculating displacement information according to the starting position coordinates and the relevant position coordinates of the moving track; the displacement information is specifically the moving distance in each direction in the window layer of the embedded browser architecture; monitoring and monitoring mouse pressing events and moving tracks in a window layer of an embedded browser architecture;
the first transmission module is suitable for transmitting the displacement information to the java empty window layer based on a pre-injected interface of an embedded browser architecture window layer;
and the moving module is suitable for analyzing the displacement information by the java empty window layer and controlling the java empty window layer to drive the browser window to move according to an analysis result.
8. The apparatus of claim 7, wherein the first listening module is further adapted to:
monitoring a mouse pressing event in the window layer of the embedded browser architecture triggered by a user, and judging whether the event type of the mouse pressing event is a mobile control type event or not; the event type is divided into a service processing type event or a mobile control type event according to a protocol agreed in advance;
if so, recording the coordinates of the starting position pressed by the mouse.
9. The apparatus of claim 7, wherein the user-triggered move operation in the embedded browser architecture window layer is a mouse move operation;
the first listening module is further adapted to:
and monitoring a moving track formed by the movement of a mouse in the window layer of the embedded browser architecture triggered by a user, and recording the relevant position coordinates of the moving track.
10. The apparatus of claim 7, wherein the user-triggered move operation in the embedded browser architecture window layer is a keyboard move operation;
the first listening module is further adapted to:
and monitoring the keyboard moving operation corresponding to the direction key button clicking event triggered by the user to determine the moving direction and the preset moving distance in the moving track corresponding to the keyboard moving operation so as to obtain displacement information.
11. The apparatus of any of claims 7-10, wherein the first listening module is further adapted to:
and stopping recording the moving track when a mouse bounce event in the window layer of the embedded browser architecture is monitored.
12. The apparatus of any one of claims 7-10, wherein the apparatus further comprises:
the second monitoring module is suitable for monitoring a mouse click event of a specified area in the embedded browser architecture window layer triggered by a user;
the second transfer module is suitable for transferring the control instruction information corresponding to the specified area to the java empty window body layer;
and the control module is suitable for controlling the java empty window layer to operate the browser window to complete a corresponding control instruction.
13. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the browser window control method according to any one of claims 1-6.
14. A computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the browser window control method according to any one of claims 1 to 6.
CN201910285652.7A 2019-04-10 2019-04-10 Browser window control method and device Active CN110134897B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910285652.7A CN110134897B (en) 2019-04-10 2019-04-10 Browser window control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910285652.7A CN110134897B (en) 2019-04-10 2019-04-10 Browser window control method and device

Publications (2)

Publication Number Publication Date
CN110134897A CN110134897A (en) 2019-08-16
CN110134897B true CN110134897B (en) 2022-02-08

Family

ID=67569787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910285652.7A Active CN110134897B (en) 2019-04-10 2019-04-10 Browser window control method and device

Country Status (1)

Country Link
CN (1) CN110134897B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113986447B (en) * 2021-12-24 2022-03-29 畅捷通信息技术股份有限公司 Interaction method and device of local application service and browser and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1304631A2 (en) * 1997-04-30 2003-04-23 Sony Corporation Browser apparatus, address registering method, browser system, and recording medium
CN102393797A (en) * 2010-11-26 2012-03-28 王琦凡 Mouse and method for controlling window switching through the same
CN103631893A (en) * 2013-11-15 2014-03-12 北京奇虎科技有限公司 Browser control method and browser
CN103838498A (en) * 2014-03-05 2014-06-04 深圳市深信服电子科技有限公司 Method and device for realizing window switching
CN105242817A (en) * 2014-07-07 2016-01-13 阿里巴巴集团控股有限公司 Page element real-time highlighted display method and apparatus
CN105426088A (en) * 2015-11-02 2016-03-23 北京金山安全软件有限公司 Browser control method and device and terminal equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060069785A1 (en) * 2004-09-24 2006-03-30 Vistaprint Technologies Limited System and method for controlling display windows
CN101685451A (en) * 2008-09-27 2010-03-31 国际商业机器公司 Method for monitoring events in browser, event monitoring device and browser equipment
CN103390053A (en) * 2013-07-26 2013-11-13 贝壳网际(北京)安全技术有限公司 Page switching control method and device of browser and client
CN105335037A (en) * 2014-07-07 2016-02-17 北京畅游天下网络技术有限公司 Method for moving browser window
EP3355212B1 (en) * 2017-01-27 2020-04-22 Scirra Ltd. Window content transfer methods and systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1304631A2 (en) * 1997-04-30 2003-04-23 Sony Corporation Browser apparatus, address registering method, browser system, and recording medium
CN102393797A (en) * 2010-11-26 2012-03-28 王琦凡 Mouse and method for controlling window switching through the same
CN103631893A (en) * 2013-11-15 2014-03-12 北京奇虎科技有限公司 Browser control method and browser
CN103838498A (en) * 2014-03-05 2014-06-04 深圳市深信服电子科技有限公司 Method and device for realizing window switching
CN105242817A (en) * 2014-07-07 2016-01-13 阿里巴巴集团控股有限公司 Page element real-time highlighted display method and apparatus
CN105426088A (en) * 2015-11-02 2016-03-23 北京金山安全软件有限公司 Browser control method and device and terminal equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JavaScript在动态网页设计中的应用;张云苑;《科技信息》;20070210(第5期);23-24 *

Also Published As

Publication number Publication date
CN110134897A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
KR102578253B1 (en) Electronic device and method for acquiring fingerprint information thereof
CN108037888B (en) Skill control method, skill control device, electronic equipment and storage medium
CN102789312B (en) A kind of user interactive system and method
CN104808942A (en) Touch Event Processing for Web Pages
CN103150109A (en) Touch event model for web pages
CN104685449A (en) User interface element focus based on user's gaze
CN104541231A (en) Method and device for preventing mistaken touch of touch screen
CN107066167A (en) A kind of regional selection method, device and graphic user interface
CN104571852A (en) Icon moving method and device
CN102197359A (en) Multi-touch manipulation of application objects
CN107506130B (en) Character deleting method and mobile terminal
CN108646959A (en) Screen control method, device and mobile terminal
CN110109598A (en) A kind of animation interaction implementation method, device and electronic equipment
US20180075153A1 (en) Method and device for switching webpages in browser
CN109343837A (en) Game rendering method and relevant device
CN105493018A (en) Independent hit testing for touchpad manipulations and double-tap zooming
CN110134897B (en) Browser window control method and device
CN110493125A (en) Instant communicating method, equipment and computer readable storage medium
CN109491670A (en) A kind of page display method and terminal device
CN106598422B (en) hybrid control method, control system and electronic equipment
CN106951258A (en) The operating method and mobile terminal of a kind of mobile terminal
CN108604331A (en) A kind of information prompting method and mobile device
EP3327551A1 (en) Electronic device for displaying image and method for controlling the same
CN107861827A (en) Card screen detection method, mobile terminal and computer-readable recording medium
CN108885556A (en) Control numeral input

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant