WO2016101810A1 - Method for switching display object in multi-window system and device thereof - Google Patents

Method for switching display object in multi-window system and device thereof Download PDF

Info

Publication number
WO2016101810A1
WO2016101810A1 PCT/CN2015/097479 CN2015097479W WO2016101810A1 WO 2016101810 A1 WO2016101810 A1 WO 2016101810A1 CN 2015097479 W CN2015097479 W CN 2015097479W WO 2016101810 A1 WO2016101810 A1 WO 2016101810A1
Authority
WO
WIPO (PCT)
Prior art keywords
window
display object
application
display
unit
Prior art date
Application number
PCT/CN2015/097479
Other languages
French (fr)
Chinese (zh)
Inventor
任俊彦
费建江
姜德
Original Assignee
阿里巴巴集团控股有限公司
任俊彦
费建江
姜德
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 阿里巴巴集团控股有限公司, 任俊彦, 费建江, 姜德 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2016101810A1 publication Critical patent/WO2016101810A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method and device for switching display objects in a multi-window system.
  • Z-order refers to the stacking order of these windows in a stack of stacked windows.
  • the stacking of windows refers to stacking windows along a virtual axis (generally referred to as the Z axis) extending from the screen to the outside of the screen, and the window at the top of the Z-order (ie, the top window, such as window n) It will be pressed on other windows, and the window at the bottom of the Z-order (ie the bottom window, such as window 1) will be pressed by other windows.
  • the input event distribution mechanism of the existing Android native system (hereinafter referred to as the system) is that if there is a click action, the java layer of the system generates an input event containing coordinate values of the click point (for example, x, y coordinate values).
  • the input module traverses the window attribute in the input list (InputList) in order from the top window to the bottom window; if a window is found to be a clickable window according to the window property, the event is distributed Go to the display unit of this window and end the traversal; after that, if the display unit determines that the coordinate value of the click point included in the input event is in the touchable area of the display unit (TouchableRegion), the event will be processed, otherwise the The event is processed.
  • InputList input list
  • the currently launched applications are Application A and Application B
  • Application A is the currently displayed application (ie, the window of Application A is the top window)
  • the window of Application B is applied by A.
  • the window is partially obscured.
  • the mouse clicks on the window of the application B and the generated input event is only sent to the top window under the existing distribution mechanism, that is, only the display unit of the window of the application A is sent. Understandably: because the position (coordinate) of the mouse click has exceeded The window area of the application A is out, so even if the generated input event is sent to the display unit of the window of the application A, the display unit does not process the input event, so that window switching does not occur.
  • the embodiment of the present invention provides a method for switching display objects in a multi-window system, which is used to solve the problem that the display object switching cannot be implemented based on input events in the Android native system.
  • the embodiment of the present application further provides a device for switching display objects in a multi-window system, which is used to solve the problem that the display object switching cannot be implemented based on input events in the Android native system.
  • a method for switching a display object in a multi-window system includes: obtaining a coordinate value of a click point included in an input event; determining whether a display object corresponding to the clickable area including the coordinate value is a top display object; Otherwise, the display object is set as the top display object, and the display interface is refreshed.
  • a device for switching a display object in a multi-window system comprising: a coordinate value obtaining unit, configured to obtain a coordinate value of a click point included in an input event; and a determining unit, configured to determine a coordinate value obtained by the coordinate value obtaining unit Whether the display object corresponding to the click area is the top display object; and the interface refreshing unit is configured to set the display object as the top display object and refresh the display interface when the determination result obtained by the determining unit is negative.
  • the display object Since it is determined that the display object corresponding to the clickable area including the coordinate value of the click point is not the top display object, the display object is set as the top display object for display, thereby solving the problem that the Android native system cannot implement the window based on the input event. Switching problems.
  • FIG. 1 is a schematic diagram of a list sequence of a Z-order according to an embodiment of the present application.
  • FIG. 1b is a schematic diagram of application A and application B before window switching according to an embodiment of the present disclosure.
  • FIG. 2 is a schematic diagram of an activity stack of application A and application B in the embodiment of the present application.
  • FIG. 3 is a schematic diagram of a multi-window display according to an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a method for switching a display object in a multi-window system according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of an apparatus for switching a window in a multi-window system according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of a correspondence between an input list and a Z-order list provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of steps of a method for switching a window in a multi-window system according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of application A and application B after window switching according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of an apparatus for switching a display object in a multi-window system according to an embodiment of the present disclosure.
  • step S101 Before introducing the solution provided by the embodiment of the present application, an implementation manner of a multi-window system is first introduced. Specifically, the method includes step S101 and step S102:
  • S101 The terminal saves each display unit of the application in the application for each application that is started. Corresponding containers, in which different applications correspond to different containers.
  • the terminal includes but is not limited to: a mobile phone, a tablet computer, and the like.
  • each display unit for displaying the interface of the application is started separately during the running of the application.
  • the terminal may instantiate a container for the application for each application that has been started, and then save each display unit that has been activated by the application in a corresponding container, and subsequently display the corresponding application interface.
  • the container may be a stack, and the display unit at the top of the stack is in an active state, and the display unit in the active state is called by the application process or thread to display the corresponding display unit to the user.
  • the application interface, the content on the application interface corresponding to the display unit can be refreshed in real time, and can interact with the user through preset various input commands, and at this time, other display units in the stack are in a Paused state or The Stopped state, the display unit in the Paused state or the Stopped state is not currently displayed to the user.
  • the display unit corresponding to the other application interface is popped from the stack and re-saved at the top of the stack, that is, activated and switched to the Active state, correspondingly
  • the storage location of the original display unit at the top of the stack moves downward and switches to the Paused state or the Stopped state, and the other application interface becomes the application interface currently displayed to the user.
  • S102 The terminal displays a window of the application according to the window attribute of the application and each display unit saved in the container corresponding to the application.
  • each display unit of the application includes various display elements, such as text, pictures, videos, controls, and the like, on the application interface defined in advance.
  • the application process instructs the display unit to display the application interface
  • the resolution information of the current terminal screen is obtained, and then the application interface is directly displayed on the terminal screen in an adaptive manner according to the resolution information.
  • the window attribute may be predefined to save the related information, and the lifetime of the window is Track and update these related information (from the time the window is created until the time the window is closed).
  • the window attribute may include a window length value, a window width value, and a window coordinate value, etc.
  • the coordinate referenced by the window coordinate value is a two-dimensional coordinate on the current terminal screen, and the window coordinate value is used to locate the position of the window on the current terminal screen, which may be the coordinate of the intersection of two diagonal lines of the window. It can also be the coordinates of other specific points in the window area (such as the vertices of the window). For the rectangular window whose window length value, window width value and window coordinate value are determined, the size and position of the window are determined.
  • the terminal may determine the size and location of the window on the screen of the terminal according to the window attribute of the application, and then invoke the corresponding display unit saved in the corresponding container of the application by the corresponding process or thread to display the application. Window.
  • the display unit specifically includes an activity
  • the container specifically includes an activity stack.
  • the activity stack is a first-in/Last-Out data structure, and the valid data stored is the activity of the application corresponding to the activity stack.
  • the following describes an example of saving the activity provided by the embodiment of the present application. It is assumed that the application A and the application B have been started on the terminal, wherein the application A has started two activities (activityA1, activityA2), and the application B has started three activities. (activityB1 ⁇ activityB3), the terminal instantiates two activity stacks for saving the activity of application A and the activity of application B respectively.
  • Figure 2 shows the activity stack of application A and application B.
  • the left side is the stack of application A
  • the right side is the activity stack of application B.
  • only activityA2 and activityB3 located at the top of the two stacks are in the active state, and other activities are in the Paused state or the Stopped state.
  • application A is displaying the application interface corresponding to activityA2
  • application B is displaying the application interface corresponding to activityB3.
  • the terminal can pop the activityA2 and activityA1 in the activity stack of application A in turn, and then add activityA2 and activityA1 to the stack, so that activityA1 is located in the application.
  • activityA1 switches to the active state
  • activityA2 switches to the Paused state or the Stopped state.
  • the related process or thread of the application A can call activityA1 to display the corresponding application interface.
  • the implementation manner of another multi-window system may specifically include the following steps 1 and 2:
  • Step 1 For each application that has been started, save the display unit of each application in at least one container.
  • the display unit may be an activity
  • the container may be an activity stack.
  • the terminal may instantiate an activity stack for each application to save the activity of the application, or directly instantiate one or more activity stacks for each application to share the activity stack.
  • the activity of each application is saved in these activity stacks, and is subsequently used for display.
  • Step 2 Display a plurality of windows according to the set window attribute and each display unit saved in the container, wherein at least one window displays two or more visual units.
  • the terminal may display a window for each activated application according to the set window attribute and each display unit saved in the activity stack, so that only the application is displayed in each application window. Your own visual unit.
  • the terminal may also first instantiate one or more windows according to the set window property, and then display two or more visual units in each window according to each display unit saved in the activity stack, thereby increasing the window. Use efficiency.
  • the two or more visual units displayed in the same window may belong to the same application or belong to different applications.
  • Fig. 3 shows a schematic diagram of multi-window display in such a scene, and it can be seen that two windows are displayed on the terminal screen.
  • the window "Apply A&B” is a window shared by the application A and the application B, and the left side of the display area of the window (that is, the left side of the dotted line) is the visual unit of the application A displayed according to the activity of the application A (also The real-time content), on the right side of the display area of the window (that is, to the right of the dotted line) is the visual unit of the application B displayed according to the activity of the application B.
  • the window "App C” is the window of the application C, on the left side of the display area of the window (ie, the dotted line
  • the left side is based on an activity of the application C
  • the first visible unit of the displayed application C on the right side of the display area of the window (ie, to the right of the dotted line) is another activity according to the application C
  • the second visible unit of application C is displayed.
  • each visual unit in the window display area may be in the window attribute of the window.
  • the position and position which may be referred to herein as sub-areas, are predefined so that each visual unit can be correctly displayed in the corresponding sub-area.
  • each visual unit may be completely overlapped or partially overlapped in the same window, or may not be displayed in an overlapping manner.
  • the terminal can instantiate multiple activity stacks to save the activity of each launched application, the terminal can simultaneously display multiple windows according to the display unit at the top of each activity stack, and can be configured according to the set window.
  • the attribute pre-divides a plurality of sub-areas for the window display area, so that one visual unit can be displayed in each sub-area in the same window, so that the visual units of the plurality of applications can be simultaneously displayed on the terminal screen.
  • the embodiment of the present application first provides a method for switching the display object in the multi-window system, and the method includes the following steps as shown in FIG. 4 . :
  • Step 41 Obtain coordinate values of click points included in the input event
  • Step 42 determining whether the display object corresponding to the TouchableRegion containing the coordinate value of the click point is the top display object; when the determination result indicates that the display object is not the top display object, step 43 is performed;
  • the TouchableRegion mentioned herein may be a window attribute in the input list maintained by the input module described in the background art.
  • a window attribute corresponding to a single window represents at least a coordinate range of a clickable area of a single window, that is, a coordinate value of a clickable point located within the area.
  • the window properties can also represent other parameters of the window, such as size, location on the display screen, and/or width and height.
  • the window is clickable The coordinate range of the area and the values of other parameters can be changed.
  • the above TouchableRegion may be a new window attribute obtained by modifying the window attribute described in the background art.
  • the new window attribute may specifically be an attribute of a visual unit in the window.
  • An attribute corresponding to a single visual unit represents at least a coordinate range of a clickable area of a single visual unit, that is, a coordinate value of a clickable point located within the area.
  • the window attribute can also represent other parameters of the visual unit, such as size, location on the display screen, and/or width and height. In the embodiment of the present application, the coordinate range of the clickable area of the visual unit and the values of other parameters may be changed.
  • step 43 the display object is set as the top display object, and the display interface is refreshed.
  • the visual unit is set as the top visual unit (the top visual unit may also be referred to as a focus visible unit), meaning that the window in which the visual unit is located is also Set to the top window (the top window can also be called the focus window).
  • the display object when it is determined that the display object corresponding to the clickable area including the coordinate value of the click point is not the top display object, the display object is set as the top display object for display, thereby solving the problem.
  • the problem of window switching cannot be implemented based on input events in Android native systems.
  • the TouchableRegion in the input list may be updated before determining whether the display object corresponding to the TouchableRegion including the coordinate value of the click point is the top display object.
  • the manner of determining whether the display object corresponding to the clickable area of the coordinate value of the click point is the top display object may include:
  • the update to the input list may be periodic or non-periodic.
  • the update manner may include: after determining that the TouchableRegion of the display object changes, updating the TouchableRegion in the input list according to the changed TouchableRegion.
  • the implementation of setting the display object to the top display object can be accomplished by modifying the list of Z-orders.
  • the Z-order value of the display object is stored in the Z-order list.
  • the multi-window system uses the value of the Z-order stored in the Z-order list as the basis for determining the order in which the display objects are arranged.
  • the non-top display object can be set as the top display object by updating the value of the Z-order of the non-top display object to be greater than the value of the Z-order of other display objects in the multi-window system.
  • the method may further include the step of: transmitting the input event to the display unit of the display object corresponding to the TouchableRegion including the coordinate value of the click point.
  • Another embodiment of the present application taking a display object as a window, as an example, discloses an apparatus 100 for switching a window in a multi-window system, which can be used, for example, on a device such as an all-in-one.
  • the apparatus 100 for switching windows under the multi-window system disclosed in the embodiment of the present application includes an update module 1, an input module 2, a judgment module 3, and a window manager module. .
  • the input module 2 maintains an input list (InputList) 21 in which the window attributes corresponding to each display unit are stored.
  • the input list 21 is related to the list 5 of the Z-order. correspond.
  • the window attribute contained in the input list 21 is specifically O1, O2 until On, where O1 is the window attribute of the window numbered 1, the meaning of O2 ⁇ On, and the like;
  • Z of the Z-order list 5 The value of the sequence is specifically Z1, Z2 up to Zn, where Z1 is the value of the Z-order of the window numbered 1, and the meaning of Z2-Zn is equivalent; then O1 corresponds to Z1, O2 corresponds to Z2, and On corresponds to Zn. .
  • the window attribute maintained by the input module 2 has a window attribute named "Touchable Region", and the information indicates at least the coordinate range of the clickable area of the window, that is, the coordinate value of the clickable point located in the area. .
  • the information may also represent other parameters of the window, such as size, location on the display screen, and/or width and height.
  • the coordinate range of the clickable area of the window and the values of other parameters may be changed.
  • FIG. 7 describes the method for switching between multiple windows of the present application, and the method includes the following steps:
  • WindowPanel the role of WindowPanel is to record the state of the window.
  • step S1 mainly includes: updating the TouchableRegion in the input list 21 according to the current TouchableRegion of the application, so that the TouchableRegion in the input list 21 is synchronized with the current TouchableRegion of the application.
  • S3 the display unit that receives the input event determines whether the corresponding window is the top window; if yes, the display unit processes the event, for example, determines the button position, etc.; if not, the display unit sends a request to the window management module 4;
  • the window management module 4 modifies the order of the window list (WindowList), thereby triggering the Z-order change, and finally modifying the Z-order list 5; then refreshing the user interface (UI), This achieves the switching of multiple windows.
  • the execution timing of step S1 may include: dragging the window, changing the size of the window, etc., to ensure that subsequent click actions can be based on the latest window state.
  • step S2 please refer to FIG. 1b, for example, the activated application is application A and application B, application A is the currently displayed application, and the application B window is applied to the window portion of application A.
  • the occlusion at which point the mouse clicks on the window of application B, the multi-window system 100 of the present application also causes the input event to be correctly passed to the display unit of the window of the partially occluded application B.
  • step S4 after modifying the list 5 of the Z-order, the value of the Z order of the application B may be made larger than the value of the Z order of the application A. Further, in the process of executing the refresh UI, the window management module 4 may determine, according to the modified list of Z-orders 5, that the value of the Z-order of the application B is currently the largest Z-order value, thereby applying The window of B is displayed as the top window, that is, the display unit of all the applications B is swapped with the display unit of the application A, thereby completing the window for switching the application window B to the top window based on the input event (refer to FIG. 8).
  • the parameters of the WindowPanel of the application in the embodiment of the present application can be updated; the application changes the distribution mechanism of the input event, enables the input event to be transmitted to the non-top display unit, and modifies the Z-order Listing 5, the final realization of the function of window switching by mouse.
  • each module of the device 100 for switching windows under the multi-window system is as follows:
  • the update module 1 is configured to update the parameter of the WindowPanel of the application to the clickable area of the corresponding window; wherein the function of the WindowPanel is to record the state of the window;
  • the input module 2 is configured to generate an input event when there is a click action, each input event contains a coordinate value of the click (for example, an x, y coordinate value), and then traverses the input list 21 in order; if a window is found
  • the clickable area of the port contains the coordinates of the input, and the event is distributed to the window even if the window is a non-top display unit;
  • the determining module 3 is configured to determine whether the window corresponding to the event is the current window; if yes, the window is processed, for example, determining the button position, etc.; if not, sending a request to the window management module 4;
  • the window management module 4 is configured to modify the order of the window list (WindowList) after receiving the request, thereby triggering the Z-order change, and finally modifying the Z-order list 5; then notifying the UI to refresh, thus implementing the multi-window Switching.
  • the parameter update of the applied WindowPanel includes dragging the window, changing the size of the window, etc. to ensure that subsequent click actions can be based on the latest window state.
  • the launched application is application A and application B
  • application A is the currently displayed application
  • the application B window is partially blocked by the application A window, at this time the mouse clicks the application B window, this
  • the requested multi-window system 100 also enables input events to be properly passed to the partially occluded application B window.
  • the display unit of the application B is swapped with the display unit of the application A, thus completing the mouse click switching application B.
  • the parameters of the WindowPanel of the application in the embodiment of the present application can be updated; the application changes the distribution mechanism of the input event, enables the click event to be transmitted to the non-top display unit, and modifies the Z-order Listing 5, the final realization of the function of window switching by mouse.
  • the embodiment of the present application further provides a device for switching the display object in the multi-window system.
  • the specific structure of the device is shown in FIG. 9 , and the coordinate value is obtained.
  • a coordinate value obtaining unit 91 configured to obtain a coordinate value of a click point included in the input event
  • a determining unit 92 configured to determine whether a display object (hereinafter referred to as the display object) corresponding to the clickable area of the coordinate value obtained by the coordinate value obtaining unit 91 is a top display object;
  • the interface refreshing unit 93 is configured to set the display object as the top display object and refresh the display interface when the determination result obtained by the determining unit 92 is negative.
  • the interface refresh unit 93 may be configured to: update the value of the Z-order of the display object to be greater than the value of the Z-order of other display objects in the multi-window system.
  • the above apparatus may further include an attribute information updating unit.
  • the unit is configured to update the clickable area TouchableRegion in the input list before the determining unit determines whether the display object corresponding to the clickable area including the coordinate value of the click point is the top display object.
  • the determining unit 92 may be configured to determine the TouchableRegion including the coordinate value by traversing the TouchableRegion in the input list; and determine whether the display object corresponding to the TouchableRegion including the coordinate value of the click point is the top display object.
  • the attribute information updating unit may be configured to: after determining that the TouchableRegion of the display object in the multi-window system changes, update the TouchableRegion in the input list according to the changed TouchableRegion.
  • the apparatus may further include: a sending unit, configured to send an input event to the display unit of the display object.
  • the apparatus shown in FIG. 9 may further include an execution saving unit and a display unit. among them:
  • the saving unit is configured to save, after the coordinate value obtaining unit 91 obtains the coordinate value of the click point included in the input event, the display unit of the application in the corresponding container of the application; wherein, at least There are two applications that have been launched, and different applications have different containers;
  • a display unit configured to display a window of the application according to the set window attribute of the application and each display unit saved in the container corresponding to the application.
  • the device shown in FIG. The resetting may include executing the saving unit and the display unit. among them:
  • Executing a saving unit configured to save the display unit of each application in at least one container for each application that has been activated before the coordinate value obtaining unit 91 obtains the coordinate value of the click point included in the input event;
  • a display unit configured to display a plurality of windows according to the set window attribute and each display unit saved in the container; wherein at least one of the windows displays more than two visual units.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory, such as read only memory (ROM) or flash memory (flashRAM), in a computer readable medium.
  • RAM random access memory
  • ROM read only memory
  • flashRAM flash memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A method for switching a display object in a multi-window system and a device thereof, for addressing the problem of not switching a window on the basis of an input event, the method comprises: obtaining a coordinate value of a touched point comprised in an input event (41); determining whether the display object corresponding to a touchable region comprising the coordinate value is a topmost display object (42); if the result is determined to be NO, setting the display object as the topmost display object, and refreshing a display interface (43).

Description

多窗口***下切换显示对象的方法及其装置Method and device for switching display objects in multi-window system 技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种多窗口***下切换显示对象的方法及其装置。The present application relates to the field of computer technology, and in particular, to a method and device for switching display objects in a multi-window system.
背景技术Background technique
随着计算机信息技术的发展,在多窗口***下,如果用户想要有更好的体验,需要能够实现多个窗口之间的切换。With the development of computer information technology, under the multi-window system, if the user wants to have a better experience, it is necessary to be able to switch between multiple windows.
请参图1a所示,Z-order是指在一堆堆叠的窗口中,这些窗口的堆叠顺序。具体而言,窗口的堆叠是指沿着一条从屏幕里向屏幕外延伸的虚轴(一般称为Z轴)对窗口进行堆叠,在Z-order顶端的窗口(即顶端窗口,例如窗口n)将会压在其他窗口上,而在Z-order底部的窗口(即底部窗口,例如窗口1)将会被其他窗口所压。Referring to Figure 1a, Z-order refers to the stacking order of these windows in a stack of stacked windows. Specifically, the stacking of windows refers to stacking windows along a virtual axis (generally referred to as the Z axis) extending from the screen to the outside of the screen, and the window at the top of the Z-order (ie, the top window, such as window n) It will be pressed on other windows, and the window at the bottom of the Z-order (ie the bottom window, such as window 1) will be pressed by other windows.
现有的安卓原生***(下文简称***)的输入事件分发机制是,如果有点击动作,***的java层会产生含有点击点的坐标值(例如x,y坐标值)的输入(input)事件,并输出给***的输入模块;输入模块按从顶端窗口至底部窗口的顺序,依次遍历输入列表(InputList)中的窗口属性;如果根据窗口属性发现某个窗口为可点击窗口,就把这个事件分发到这个窗口的显示单元并结束遍历;之后,显示单元如果判断出输入事件中包含的点击点的坐标值在显示单元的可点击区域(TouchableRegion)里,则会处理该事件,否则不会对该事件进行做处理。The input event distribution mechanism of the existing Android native system (hereinafter referred to as the system) is that if there is a click action, the java layer of the system generates an input event containing coordinate values of the click point (for example, x, y coordinate values). And output to the input module of the system; the input module traverses the window attribute in the input list (InputList) in order from the top window to the bottom window; if a window is found to be a clickable window according to the window property, the event is distributed Go to the display unit of this window and end the traversal; after that, if the display unit determines that the coordinate value of the click point included in the input event is in the touchable area of the display unit (TouchableRegion), the event will be processed, otherwise the The event is processed.
具体地,请参图1b所示,目前已启动的应用是应用A和应用B,应用A是当前正常显示的应用(即应用A的窗口为顶端窗口),而应用B的窗口被应用A的窗口部分遮挡。在现有的安卓原生***下,鼠标点击应用B的窗口,所产生的输入事件在现有的分发机制下只会发送到顶端窗口,即只发送到应用A的窗口的显示单元。可以理解的是:因为鼠标所点击的位置(坐标)已经超 出了应用A的窗口区域,因此即使所产生的输入事件被发送到应用A的窗口的显示单元,该显示单元也不会处理该输入事件,从而也不会发生窗口切换。Specifically, as shown in FIG. 1b, the currently launched applications are Application A and Application B, Application A is the currently displayed application (ie, the window of Application A is the top window), and the window of Application B is applied by A. The window is partially obscured. Under the existing Android native system, the mouse clicks on the window of the application B, and the generated input event is only sent to the top window under the existing distribution mechanism, that is, only the display unit of the window of the application A is sent. Understandably: because the position (coordinate) of the mouse click has exceeded The window area of the application A is out, so even if the generated input event is sent to the display unit of the window of the application A, the display unit does not process the input event, so that window switching does not occur.
基于上述分析,现有***如果沿用安卓原生Z-order的设计,是不能基于输入事件实现窗口切换的。因此,有必要对现有技术进行改进。Based on the above analysis, if the existing system follows the design of Android native Z-order, it is impossible to implement window switching based on input events. Therefore, it is necessary to improve the prior art.
发明内容Summary of the invention
本申请实施例提供一种多窗口***下切换显示对象的方法,用以解决安卓原生***中不能基于输入事件实现显示对象切换的问题。The embodiment of the present invention provides a method for switching display objects in a multi-window system, which is used to solve the problem that the display object switching cannot be implemented based on input events in the Android native system.
本申请实施例还提供一种多窗口***下切换显示对象的装置,用以解决安卓原生***中不能基于输入事件实现显示对象切换的问题。The embodiment of the present application further provides a device for switching display objects in a multi-window system, which is used to solve the problem that the display object switching cannot be implemented based on input events in the Android native system.
本申请实施例采用下述技术方案:The embodiments of the present application adopt the following technical solutions:
一种多窗口***下切换显示对象的方法,包括:获得输入事件中包含的点击点的坐标值;判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象;在判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面。A method for switching a display object in a multi-window system includes: obtaining a coordinate value of a click point included in an input event; determining whether a display object corresponding to the clickable area including the coordinate value is a top display object; Otherwise, the display object is set as the top display object, and the display interface is refreshed.
一种多窗口***下切换显示对象的装置,包括:坐标值获得单元,用于获得输入事件中包含的点击点的坐标值;判断单元,用于判断包含坐标值获得单元获得的坐标值的可点击区域对应的显示对象是否为顶端显示对象;界面刷新单元,用于在判断单元得到的判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面。A device for switching a display object in a multi-window system, comprising: a coordinate value obtaining unit, configured to obtain a coordinate value of a click point included in an input event; and a determining unit, configured to determine a coordinate value obtained by the coordinate value obtaining unit Whether the display object corresponding to the click area is the top display object; and the interface refreshing unit is configured to set the display object as the top display object and refresh the display interface when the determination result obtained by the determining unit is negative.
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:The above at least one technical solution adopted by the embodiment of the present application can achieve the following beneficial effects:
由于在判断出包含点击点的坐标值的可点击区域对应的显示对象不是顶端显示对象时,会将该显示对象设置为顶端显示对象进行显示,从而解决了安卓原生***中不能基于输入事件实现窗口切换的问题。Since it is determined that the display object corresponding to the clickable area including the coordinate value of the click point is not the top display object, the display object is set as the top display object for display, thereby solving the problem that the Android native system cannot implement the window based on the input event. Switching problems.
附图说明 DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the present application, and are intended to be a part of this application. In the drawing:
图1a为本申请实施例提供的Z-order的列表顺序示意图。FIG. 1 is a schematic diagram of a list sequence of a Z-order according to an embodiment of the present application.
图1b为本申请实施例提供的应用A与应用B在窗口切换前的示意图。FIG. 1b is a schematic diagram of application A and application B before window switching according to an embodiment of the present disclosure.
图2为本申请实施例中应用A和应用B的activity堆栈示意图。FIG. 2 is a schematic diagram of an activity stack of application A and application B in the embodiment of the present application.
图3为本申请实施例中一种多窗口显示示意图。FIG. 3 is a schematic diagram of a multi-window display according to an embodiment of the present application.
图4为本申请实施例提供的一种多窗口***下切换显示对象的方法的实现流程示意图。FIG. 4 is a schematic flowchart of a method for switching a display object in a multi-window system according to an embodiment of the present disclosure.
图5为本申请实施例提供的多窗口***下切换窗口的装置的示意图。FIG. 5 is a schematic diagram of an apparatus for switching a window in a multi-window system according to an embodiment of the present disclosure.
图6为本申请实施例提供的输入列表与Z-order的列表两者之间相互对应的示意图。FIG. 6 is a schematic diagram of a correspondence between an input list and a Z-order list provided by an embodiment of the present application.
图7为本申请实施例提供的多窗口***下切换窗口的方法的步骤示意图。FIG. 7 is a schematic diagram of steps of a method for switching a window in a multi-window system according to an embodiment of the present disclosure.
图8为本申请实施例提供的应用A与应用B在窗口切换后的示意图。FIG. 8 is a schematic diagram of application A and application B after window switching according to an embodiment of the present disclosure.
图9为本申请实施例提供的一种多窗口***下切换显示对象的装置的结构示意图。FIG. 9 is a schematic structural diagram of an apparatus for switching a display object in a multi-window system according to an embodiment of the present disclosure.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions of the present application will be clearly and completely described in the following with reference to the specific embodiments of the present application and the corresponding drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
对本申请实施例提供的方案进行介绍之前,首先对一种多窗口***的实现方式进行介绍。具体地,该方式包括步骤S101和步骤S102:Before introducing the solution provided by the embodiment of the present application, an implementation manner of a multi-window system is first introduced. Specifically, the method includes step S101 and step S102:
S101:终端针对已启动的每个应用,将该应用的各显示单元保存在该应用 对应的容器中,其中,不同的应用对应的容器不同。S101: The terminal saves each display unit of the application in the application for each application that is started. Corresponding containers, in which different applications correspond to different containers.
在本申请实施例中,所述的终端包括但不限于:手机、平板电脑等。In the embodiment of the present application, the terminal includes but is not limited to: a mobile phone, a tablet computer, and the like.
在终端上,每个应用启动后,用于显示该应用的界面的各显示单元会在该应用的运行过程中分别启动。终端可以针对已启动的每个应用,分别为该应用实例化一个容器,然后将该应用已启动的各显示单元保存在对应的容器中,后续用于显示相应的应用界面。On the terminal, after each application is launched, each display unit for displaying the interface of the application is started separately during the running of the application. The terminal may instantiate a container for the application for each application that has been started, and then save each display unit that has been activated by the application in a corresponding container, and subsequently display the corresponding application interface.
其中,所述的容器可以是堆栈,位于该堆栈顶端的显示单元处于活动(Active)状态,处于Active状态的显示单元会被该应用的进程或线程所调用,以向用户显示该显示单元对应的应用界面,该显示单元对应的应用界面上的内容可以实时刷新,并可以通过预设的各种输入指令与用户进行交互,而此时该堆栈中其他的显示单元均处于暂停(Paused)状态或停止(Stopped)状态,处于Paused状态或Stopped状态的显示单元当前未显示给用户。当该应用从当前应用界面跳转至另一个应用界面时,该另一个应用界面所对应的显示单元会从堆栈中弹出并重新保存在堆栈顶端,也即,被激活并切换至Active状态,相应的,原来堆栈顶端原来的显示单元的保存位置向下移动,并切换至Paused状态或Stopped状态,则该另一个应用界面成为当前显示给用户的应用界面。The container may be a stack, and the display unit at the top of the stack is in an active state, and the display unit in the active state is called by the application process or thread to display the corresponding display unit to the user. The application interface, the content on the application interface corresponding to the display unit can be refreshed in real time, and can interact with the user through preset various input commands, and at this time, other display units in the stack are in a Paused state or The Stopped state, the display unit in the Paused state or the Stopped state is not currently displayed to the user. When the application jumps from the current application interface to another application interface, the display unit corresponding to the other application interface is popped from the stack and re-saved at the top of the stack, that is, activated and switched to the Active state, correspondingly The storage location of the original display unit at the top of the stack moves downward and switches to the Paused state or the Stopped state, and the other application interface becomes the application interface currently displayed to the user.
S102:终端根据该应用的窗口属性和该应用对应的容器中保存的各显示单元,显示该应用的窗口。S102: The terminal displays a window of the application according to the window attribute of the application and each display unit saved in the container corresponding to the application.
在本申请实施例中,应用的各显示单元包含预先定义的该应用界面上的各种显示元素,如文字、图片、视频、控件等。一般的,应用的进程调用显示单元显示应用界面时,会获取当前终端屏幕的分辨率信息,然后根据该分辨率信息直接将应用界面自适应地全屏显示在终端屏幕上。而若要以窗口的方式显示各显示单元对应的应用界面,由于还需要确定待显示的窗口的大小以及位置相关信息,因此,可以预先定义窗口属性以保存这些相关信息,并在窗口的生存期(从窗口创建至该窗口被关闭的这段时间)内追踪和更新这些相关信息。In the embodiment of the present application, each display unit of the application includes various display elements, such as text, pictures, videos, controls, and the like, on the application interface defined in advance. Generally, when the application process instructs the display unit to display the application interface, the resolution information of the current terminal screen is obtained, and then the application interface is directly displayed on the terminal screen in an adaptive manner according to the resolution information. If the application interface corresponding to each display unit is to be displayed in a window manner, since the size of the window to be displayed and the position related information need to be determined, the window attribute may be predefined to save the related information, and the lifetime of the window is Track and update these related information (from the time the window is created until the time the window is closed).
其中,所述的窗口属性可以包含窗口长度值、窗口宽度值和窗口坐标值等, 所述的窗口坐标值所参考的坐标是当前终端屏幕上的二维坐标,窗口坐标值用于定位窗口在当前终端屏幕上所处的位置,可以是窗口的两条对角线的交点的坐标,也可以是窗口区域内其他特定点(例如窗口的顶点)的坐标,对于矩形窗口,其窗口长度值、窗口宽度值和窗口坐标值确定时,则窗口的大小和位置确定。Wherein, the window attribute may include a window length value, a window width value, and a window coordinate value, etc. The coordinate referenced by the window coordinate value is a two-dimensional coordinate on the current terminal screen, and the window coordinate value is used to locate the position of the window on the current terminal screen, which may be the coordinate of the intersection of two diagonal lines of the window. It can also be the coordinates of other specific points in the window area (such as the vertices of the window). For the rectangular window whose window length value, window width value and window coordinate value are determined, the size and position of the window are determined.
在本申请实施例中,终端可根据该应用的窗口属性确定窗口在终端屏幕上的大小和位置,然后,通过相应的进程或线程调用该应用对应的容器中保存的相应显示单元,显示该应用的窗口。In the embodiment of the present application, the terminal may determine the size and location of the window on the screen of the terminal according to the window attribute of the application, and then invoke the corresponding display unit saved in the corresponding container of the application by the corresponding process or thread to display the application. Window.
在本申请实施例中,所述的显示单元具体包括activity,所述的容器具体包括activity堆栈。In the embodiment of the present application, the display unit specifically includes an activity, and the container specifically includes an activity stack.
需要说明的是,activity堆栈是一种先进后出(First-In/Last-Out)的数据结构,其保存的有效数据为该activity堆栈所对应的应用的各activity。下面举例说明本申请实施例提供的activity的保存方式,假定终端上已启动了应用A和应用B,其中,应用A已启动了2个activity(activityA1、activityA2),应用B已启动了3个activity(activityB1~activityB3),则终端实例化两个activity堆栈分别用于保存应用A的activity和应用B的activity。It should be noted that the activity stack is a first-in/Last-Out data structure, and the valid data stored is the activity of the application corresponding to the activity stack. The following describes an example of saving the activity provided by the embodiment of the present application. It is assumed that the application A and the application B have been started on the terminal, wherein the application A has started two activities (activityA1, activityA2), and the application B has started three activities. (activityB1 ~ activityB3), the terminal instantiates two activity stacks for saving the activity of application A and the activity of application B respectively.
图2示出了应用A和应用B的activity堆栈,左侧为应用A的堆栈,右侧为应用B的activity堆栈。其中,只有分别位于两个堆栈顶部的activityA2和activityB3是处于active状态,其他的activity均处于Paused状态或Stopped状态。显然,此时应用A正在显示activityA2对应的应用界面,应用B正在显示activityB3对应的应用界面。假定此后应用A由当前应用界面跳转至activityA1所对应的应用界面,则终端可将应用A的activity堆栈中的activityA2和activityA1依次出栈,然后再将activityA2和activityA1依次入栈,使得activityA1位于应用A的堆栈顶部,则activityA1切换至active状态,activityA2切换至Paused状态或Stopped状态,进而,应用A的相关进程或线程可调用activityA1显示对应的应用界面。 Figure 2 shows the activity stack of application A and application B. The left side is the stack of application A, and the right side is the activity stack of application B. Among them, only activityA2 and activityB3 located at the top of the two stacks are in the active state, and other activities are in the Paused state or the Stopped state. Obviously, at this time, application A is displaying the application interface corresponding to activityA2, and application B is displaying the application interface corresponding to activityB3. Assume that after application A jumps from the current application interface to the application interface corresponding to activityA1, the terminal can pop the activityA2 and activityA1 in the activity stack of application A in turn, and then add activityA2 and activityA1 to the stack, so that activityA1 is located in the application. At the top of the stack of A, activityA1 switches to the active state, and activityA2 switches to the Paused state or the Stopped state. Further, the related process or thread of the application A can call activityA1 to display the corresponding application interface.
本申请实施例中,另一种多窗口***的实现方式具体可以包括以下步骤一和步骤二:In the embodiment of the present application, the implementation manner of another multi-window system may specifically include the following steps 1 and 2:
步骤一:针对已启动的各应用,将各应用的显示单元保存在至少一个容器中。Step 1: For each application that has been started, save the display unit of each application in at least one container.
在本申请实施例中,所述的显示单元可以是activity,所述的容器可以是activity堆栈。In the embodiment of the present application, the display unit may be an activity, and the container may be an activity stack.
终端针对已启动的各应用,可以分别为每个应用实例化一个activity堆栈,以保存该应用的activity,也可以直接实例化一个或多个activity堆栈,以供各应用共用这些activity堆栈,则可将各应用的activity保存在这些activity堆栈中,后续用于显示。For each application that has been started, the terminal may instantiate an activity stack for each application to save the activity of the application, or directly instantiate one or more activity stacks for each application to share the activity stack. The activity of each application is saved in these activity stacks, and is subsequently used for display.
步骤二:根据设置的窗口属性和所述容器中保存的各显示单元,显示多个窗口,其中,至少有一个窗口中显示有两个以上的可视单元。Step 2: Display a plurality of windows according to the set window attribute and each display unit saved in the container, wherein at least one window displays two or more visual units.
在本申请实施例中,终端可以根据设置的窗口属性和activity堆栈中保存的各显示单元,分别为每个已启动的应用显示一个窗口,这样的话,每个应用的窗口中只会显示该应用自己的可视单元。In the embodiment of the present application, the terminal may display a window for each activated application according to the set window attribute and each display unit saved in the activity stack, so that only the application is displayed in each application window. Your own visual unit.
终端也可以根据设置的窗口属性,先实例化一个或多个窗口,然后,根据activity堆栈中保存的各显示单元,在每个窗口中显示两个或多个可视单元,从而,可以提高窗口的使用效率。其中,在同一个窗口中显示的两个或多个可视单元可以属于同一个应用,也可以属于不同的应用。The terminal may also first instantiate one or more windows according to the set window property, and then display two or more visual units in each window according to each display unit saved in the activity stack, thereby increasing the window. Use efficiency. The two or more visual units displayed in the same window may belong to the same application or belong to different applications.
图3示出了在这种场景下的多窗口显示示意图,可以看到,在终端屏幕上显示有两个窗口。Fig. 3 shows a schematic diagram of multi-window display in such a scene, and it can be seen that two windows are displayed on the terminal screen.
窗口“应用A&B”是应用A和应用B共用的窗口,在窗口的显示区域的左侧(也即,虚线的左侧)是根据应用A的activity,所显示的应用A的可视单元(也称实时内容),在窗口的显示区域的右侧(也即,虚线的右侧)是根据应用B的activity,所显示的应用B的可视单元。The window "Apply A&B" is a window shared by the application A and the application B, and the left side of the display area of the window (that is, the left side of the dotted line) is the visual unit of the application A displayed according to the activity of the application A (also The real-time content), on the right side of the display area of the window (that is, to the right of the dotted line) is the visual unit of the application B displayed according to the activity of the application B.
窗口“应用C”是应用C的窗口,在窗口的显示区域的左侧(也即,虚线 的左侧)是根据应用C的一个activity,所显示的应用C的第一可视单元,在窗口的显示区域的右侧(也即,虚线的右侧)是根据应用C的另一个activity,所显示的应用C的第二可视单元。The window "App C" is the window of the application C, on the left side of the display area of the window (ie, the dotted line The left side is based on an activity of the application C, the first visible unit of the displayed application C, on the right side of the display area of the window (ie, to the right of the dotted line) is another activity according to the application C, The second visible unit of application C is displayed.
在实际应用中,当终端需要在同一个窗口中同时显示两个以上的可视单元时,可以在该窗口的窗口属性中,对每个可视单元在窗口显示区域中的大小和位置(大小和位置,在这里可称为子区域)预先定义,从而,各可视单元可以正确地显示在对应的子区域中。当前,根据各子区域设置的不同,各可视单元在同一个窗口中既可以完全重叠显示或部分重叠显示,也可以不重叠显示。In practical applications, when the terminal needs to display more than two visual units simultaneously in the same window, the size and position (size) of each visual unit in the window display area may be in the window attribute of the window. The position and position, which may be referred to herein as sub-areas, are predefined so that each visual unit can be correctly displayed in the corresponding sub-area. Currently, depending on the setting of each sub-area, each visual unit may be completely overlapped or partially overlapped in the same window, or may not be displayed in an overlapping manner.
通过上述方法,由于终端可以实例化多个activity堆栈来保存已启动的各应用的activity,因此,终端可以根据各activity堆栈顶部的显示单元,实现同时显示多个窗口,而且,可以根据设置的窗口属性预先对窗口显示区域划分出多个子区域,从而,可以在同一个窗口中的每个子区域中都显示一个可视单元,从而,终端屏幕上可以同时显示多个应用的可视单元。Through the above method, since the terminal can instantiate multiple activity stacks to save the activity of each launched application, the terminal can simultaneously display multiple windows according to the display unit at the top of each activity stack, and can be configured according to the set window. The attribute pre-divides a plurality of sub-areas for the window display area, so that one visual unit can be displayed in each sub-area in the same window, so that the visual units of the plurality of applications can be simultaneously displayed on the terminal screen.
为便于描述,后文将“窗口”和“可视单元”统称为“显示对象”。For convenience of description, "window" and "visual unit" will be collectively referred to as "display object" hereinafter.
基于上述介绍,为解决安卓原生***中不能基于输入事件实现窗口切换的问题,本申请实施例首先提供一种多窗口***下切换显示对象的方法,该方法包括如图4所示的下述步骤:Based on the above description, in order to solve the problem that the window switching cannot be implemented based on the input event in the Android native system, the embodiment of the present application first provides a method for switching the display object in the multi-window system, and the method includes the following steps as shown in FIG. 4 . :
步骤41,获得输入事件中包含的点击点的坐标值;Step 41: Obtain coordinate values of click points included in the input event;
步骤42,判断包含点击点的坐标值的TouchableRegion对应的显示对象是否为顶端显示对象;在判断结果表示该显示对象不是顶端显示对象时,执行步骤43; Step 42, determining whether the display object corresponding to the TouchableRegion containing the coordinate value of the click point is the top display object; when the determination result indicates that the display object is not the top display object, step 43 is performed;
需要说明的是,当显示对象为窗口时,这里所说的TouchableRegion可以是背景技术中所述的输入模块维护的输入列表中的一种窗口属性。对应于单个窗口的窗口属性至少表示单个窗口的可点击区域的坐标范围,即位于该区域内的可点击点的坐标值。此外,该窗口属性还可以表示窗口的其他参数,比如大小、在显示屏幕上所处位置和/或宽高等。在本申请实施例中,窗口的可点击 区域的坐标范围以及其他参数的值均是可以改变的。It should be noted that when the display object is a window, the TouchableRegion mentioned herein may be a window attribute in the input list maintained by the input module described in the background art. A window attribute corresponding to a single window represents at least a coordinate range of a clickable area of a single window, that is, a coordinate value of a clickable point located within the area. In addition, the window properties can also represent other parameters of the window, such as size, location on the display screen, and/or width and height. In the embodiment of the present application, the window is clickable The coordinate range of the area and the values of other parameters can be changed.
当显示对象为可视单元时,上述TouchableRegion可以是对背景技术中所述的窗口属性进行改进后得到的一种新的窗口属性。具体而言,当显示对象为可视单元时,该新的窗口属性具体可以为窗口中的可视单元的属性。对应于单个可视单元的属性至少表示单个可视单元的可点击区域的坐标范围,即位于该区域内的可点击点的坐标值。此外,该窗口属性还可以表示可视单元的其他参数,比如大小、在显示屏幕上所处位置和/或宽高等。在本申请的实施例中,可视单元的可点击区域的坐标范围以及其他参数的值均是可以改变的。When the display object is a visual unit, the above TouchableRegion may be a new window attribute obtained by modifying the window attribute described in the background art. Specifically, when the display object is a visual unit, the new window attribute may specifically be an attribute of a visual unit in the window. An attribute corresponding to a single visual unit represents at least a coordinate range of a clickable area of a single visual unit, that is, a coordinate value of a clickable point located within the area. In addition, the window attribute can also represent other parameters of the visual unit, such as size, location on the display screen, and/or width and height. In the embodiment of the present application, the coordinate range of the clickable area of the visual unit and the values of other parameters may be changed.
步骤43,将该显示对象设置为顶端显示对象,并刷新显示界面。In step 43, the display object is set as the top display object, and the display interface is refreshed.
需要说明的是,当显示对象为可视单元时,将可视单元设置为顶端可视单元(顶端可视单元也可以称为焦点可视单元),意味着该可视单元所在的窗口也被设置为顶端窗口(顶端窗口也可以称为焦点窗口)。It should be noted that when the display object is a visual unit, the visual unit is set as the top visual unit (the top visual unit may also be referred to as a focus visible unit), meaning that the window in which the visual unit is located is also Set to the top window (the top window can also be called the focus window).
采用本申请实施例提供的上述方法,由于在判断出包含点击点的坐标值的可点击区域对应的显示对象不是顶端显示对象时,会将该显示对象设置为顶端显示对象进行显示,从而解决了安卓原生***中不能基于输入事件实现窗口切换的问题。According to the above method provided in the embodiment of the present application, when it is determined that the display object corresponding to the clickable area including the coordinate value of the click point is not the top display object, the display object is set as the top display object for display, thereby solving the problem. The problem of window switching cannot be implemented based on input events in Android native systems.
以下对上述步骤的一些可选实施方式进行详细说明。Some optional embodiments of the above steps are described in detail below.
针对步骤42而言,考虑到显示对象被执行拖动、放大或缩小等操作后,会导致显示对象的TouchableRegion发生变化,因此,为了保证通过执行步骤42得到的判断结果的准确性,在一种实施方式中,可以在判断包含点击点的坐标值的TouchableRegion对应的显示对象是否为顶端显示对象之前,对输入列表中的TouchableRegion进行更新。For step 42 , considering that the display object is dragged, zoomed in or out, etc., the touchableRegion of the display object is changed. Therefore, in order to ensure the accuracy of the judgment result obtained by performing step 42, In the embodiment, the TouchableRegion in the input list may be updated before determining whether the display object corresponding to the TouchableRegion including the coordinate value of the click point is the top display object.
基于更新后的输入列表,判断包含点击点的坐标值的可点击区域对应的显示对象是否为顶端显示对象的方式可以包括:Based on the updated input list, the manner of determining whether the display object corresponding to the clickable area of the coordinate value of the click point is the top display object may include:
通过遍历更新后的输入列表中的TouchableRegion,确定包含点击点的坐标值的TouchableRegion;判断包含该坐标值的TouchableRegion对应的显示对 象是否为顶端显示对象。Determine the TouchableRegion containing the coordinate value of the click point by traversing the TouchableRegion in the updated input list; determine the display pair corresponding to the TouchableRegion containing the coordinate value Whether the object is displayed at the top.
本申请实施例中,对于输入列表的更新可以是周期性的,也可以是非周期性的。针对非周期性的更新方式而言,比如,在一种实施方式中,更新方式可以包括:确定显示对象的TouchableRegion发生变化后,根据发生变化的TouchableRegion,更新输入列表中的TouchableRegion。In the embodiment of the present application, the update to the input list may be periodic or non-periodic. For an aperiodic update manner, for example, in an implementation manner, the update manner may include: after determining that the TouchableRegion of the display object changes, updating the TouchableRegion in the input list according to the changed TouchableRegion.
针对步骤43而言:For step 43:
在一种实施方式中,将显示对象设置为顶端显示对象的实现方式可以通过修订Z-order的列表来实现。In one embodiment, the implementation of setting the display object to the top display object can be accomplished by modifying the list of Z-orders.
其中,Z-order的列表中保存有显示对象的Z序的值。一般地,显示对象的Z序的值越大,显示对象在Z-order中越靠近顶端;显示对象的Z序的值越小,显示对象在Z-order中越靠近底端。在显示多显示对象时,多窗口***会以Z-order的列表中保存的Z序的值,作为确定显示对象排列顺序的依据。基于这样的特点,本申请实施例中,可以通过将非顶端显示对象的Z序的值更新为大于多窗口***中其他显示对象的Z序的值,使得非顶端显示对象被设置为顶端显示对象。Among them, the Z-order value of the display object is stored in the Z-order list. In general, the larger the value of the Z-order of the display object, the closer the display object is to the top in the Z-order; the smaller the value of the Z-order of the display object, the closer the display object is to the bottom end in the Z-order. When displaying multiple display objects, the multi-window system uses the value of the Z-order stored in the Z-order list as the basis for determining the order in which the display objects are arranged. Based on such a feature, in the embodiment of the present application, the non-top display object can be set as the top display object by updating the value of the Z-order of the non-top display object to be greater than the value of the Z-order of other display objects in the multi-window system. .
本申请实施例中,为了实现对输入事件的处理,上述方法还可以包括步骤:将输入事件发送给包含点击点的坐标值的TouchableRegion对应的显示对象的显示单元。In the embodiment of the present application, in order to implement the processing of the input event, the method may further include the step of: transmitting the input event to the display unit of the display object corresponding to the TouchableRegion including the coordinate value of the click point.
本申请的另一种实施例以显示对象为窗口为例,揭示了一种多窗口***下切换窗口的装置100,能够用于例如一体机等装置上。请参图5所示,本申请的实施例所揭示的多窗口***下切换窗口的装置100包括更新模块1、输入模块(Input Module)2、判断模块3以及窗口管理模块(Window Manager Module)4。Another embodiment of the present application, taking a display object as a window, as an example, discloses an apparatus 100 for switching a window in a multi-window system, which can be used, for example, on a device such as an all-in-one. As shown in FIG. 5, the apparatus 100 for switching windows under the multi-window system disclosed in the embodiment of the present application includes an update module 1, an input module 2, a judgment module 3, and a window manager module. .
输入模块2中维护有输入列表(InputList)21,输入列表21里存放着每个显示单元所对应的窗口属性。请参图6示,输入列表21与Z-order的列表5相 对应。例如,输入列表21中包含的窗口属性具体为O1,O2直到On,其中,O1为编号为1的窗口的窗口属性,O2~On的含义依此类推;Z-order的列表5中包含的Z序的值具体为Z1,Z2直到Zn,其中,Z1为编号为1的窗口的Z序的值,Z2~Zn的含义依此类推;那么O1与Z1对应,O2与Z2对应,On与Zn对应。The input module 2 maintains an input list (InputList) 21 in which the window attributes corresponding to each display unit are stored. Referring to FIG. 6, the input list 21 is related to the list 5 of the Z-order. correspond. For example, the window attribute contained in the input list 21 is specifically O1, O2 until On, where O1 is the window attribute of the window numbered 1, the meaning of O2~On, and the like; Z of the Z-order list 5 The value of the sequence is specifically Z1, Z2 up to Zn, where Z1 is the value of the Z-order of the window numbered 1, and the meaning of Z2-Zn is equivalent; then O1 corresponds to Z1, O2 corresponds to Z2, and On corresponds to Zn. .
输入模块2所维护的窗口属性中,有名为“可点击区域(TouchableRegion)”的窗口属性,该信息至少表示该窗口的可点击区域的坐标范围,即位于该区域内的可点击点的坐标值。此外,该信息还可以表示窗口的其他参数,比如大小、在显示屏幕上所处位置和/或宽高等。在本申请的实施例中,窗口的可点击区域的坐标范围以及其他参数的值均是可以改变的。The window attribute maintained by the input module 2 has a window attribute named "Touchable Region", and the information indicates at least the coordinate range of the clickable area of the window, that is, the coordinate value of the clickable point located in the area. . In addition, the information may also represent other parameters of the window, such as size, location on the display screen, and/or width and height. In the embodiment of the present application, the coordinate range of the clickable area of the window and the values of other parameters may be changed.
基于上述介绍,请参图7所示,以下先就本申请的多窗口之间进行切换的方法进行描述,该方法包括如下步骤:Based on the above description, please refer to FIG. 7. The following describes the method for switching between multiple windows of the present application, and the method includes the following steps:
S1:根据应用的WindowPanel的参数,更新输入模块2所维护的输入列表21;S1: updating the input list 21 maintained by the input module 2 according to the parameters of the WindowPanel of the application;
其中,WindowPanel的作用是用以记录该窗口的状态。Among them, the role of WindowPanel is to record the state of the window.
本申请实施例中,步骤S1的实现方式主要包括:根据应用的当前的TouchableRegion,更新输入列表21中的TouchableRegion,从而使得输入列表21中的TouchableRegion与应用的当前的TouchableRegion同步。In the embodiment of the present application, the implementation of step S1 mainly includes: updating the TouchableRegion in the input list 21 according to the current TouchableRegion of the application, so that the TouchableRegion in the input list 21 is synchronized with the current TouchableRegion of the application.
S2:当检测到点击动作时,***的java层会产生输入事件并发送给输入模块2,每个输入事件里含有点击点的坐标值;然后,输入模块2按顺序遍历输入列表21;如果发现某个窗口的TouchableRegion中包含了这个输入事件中包含的坐标值,那就把这个事件分发到这个窗口的显示单元,即使该窗口是非顶端窗口;S2: When a click action is detected, the java layer of the system generates an input event and sends it to the input module 2, each input event contains the coordinate value of the click point; then, the input module 2 traverses the input list 21 in order; if found The TouchableRegion of a window contains the coordinate values contained in the input event, and the event is distributed to the display unit of the window, even if the window is a non-top window;
S3:接收到输入事件的显示单元判断对应的窗口是否为顶端窗口;如果是,则显示单元对该事件进行处理,例如判断按钮位置等;如果不是,则显示单元向窗口管理模块4发送请求; S3: the display unit that receives the input event determines whether the corresponding window is the top window; if yes, the display unit processes the event, for example, determines the button position, etc.; if not, the display unit sends a request to the window management module 4;
S4:窗口管理模块4在收到请求之后,修改窗口列表(WindowList)的排序,进而触发Z-order的改动,并最终修改Z-order的列表5;然后刷新用户界面(User Interface,UI),这样就实现了多窗口的切换。S4: After receiving the request, the window management module 4 modifies the order of the window list (WindowList), thereby triggering the Z-order change, and finally modifying the Z-order list 5; then refreshing the user interface (UI), This achieves the switching of multiple windows.
以下详述上述步骤的一些可选的实施方式:Some optional implementations of the above steps are detailed below:
在一种实施方式中,步骤S1的执行时机可以包括:拖动窗口、改变窗口的大小等,以确保后续的点击动作能够以最新的窗口状态为基础。In an embodiment, the execution timing of step S1 may include: dragging the window, changing the size of the window, etc., to ensure that subsequent click actions can be based on the latest window state.
在一种实施方式中,在步骤S2中,请参图1b示,比如已启动的应用是应用A和应用B,应用A是当前正常显示的应用,而应用B的窗口被应用A的窗口部分遮挡,此时鼠标点击应用B的窗口,本申请的多窗口***100也会使得输入事件可以正确地传递到被部分遮挡的应用B的窗口的显示单元。In an embodiment, in step S2, please refer to FIG. 1b, for example, the activated application is application A and application B, application A is the currently displayed application, and the application B window is applied to the window portion of application A. The occlusion, at which point the mouse clicks on the window of application B, the multi-window system 100 of the present application also causes the input event to be correctly passed to the display unit of the window of the partially occluded application B.
仍然以上述应用A和应用B为例,在一种实施方式中,在步骤S4中,在修改Z-order的列表5后,可以使得应用B的Z序的值大于应用A的Z序的值;进一步地,在执行刷新UI的过程中,窗口管理模块4可以根据被修改后的Z-order的列表5,确定出应用B的Z序的值当前为最大的Z序的值,从而将应用B的窗口作为顶端窗口进行显示,即,把应用B所有的显示单元与应用A的显示单元对换,从而完成基于输入事件将顶端窗口切换应用B的窗口(参图8)。Still taking the above application A and application B as an example, in an embodiment, in step S4, after modifying the list 5 of the Z-order, the value of the Z order of the application B may be made larger than the value of the Z order of the application A. Further, in the process of executing the refresh UI, the window management module 4 may determine, according to the modified list of Z-orders 5, that the value of the Z-order of the application B is currently the largest Z-order value, thereby applying The window of B is displayed as the top window, that is, the display unit of all the applications B is swapped with the display unit of the application A, thereby completing the window for switching the application window B to the top window based on the input event (refer to FIG. 8).
相较于安卓原生***,本申请的实施例中的应用的WindowPanel的参数能够更新;本申请更改了输入事件的分发机制,能够使得输入事件可以传送给非顶端显示单元,并修改Z-order的列表5,最终实现通过鼠标进行窗口切换的功能。Compared with the Android native system, the parameters of the WindowPanel of the application in the embodiment of the present application can be updated; the application changes the distribution mechanism of the input event, enables the input event to be transmitted to the non-top display unit, and modifies the Z-order Listing 5, the final realization of the function of window switching by mouse.
请参图5示,多窗口***下切换窗口的装置100的各个模块的功能如下:Referring to FIG. 5, the functions of each module of the device 100 for switching windows under the multi-window system are as follows:
更新模块1用以把应用的WindowPanel的参数更新到对应窗口的可点击区域中;其中,WindowPanel的作用是用以记录该窗口的状态;The update module 1 is configured to update the parameter of the WindowPanel of the application to the clickable area of the corresponding window; wherein the function of the WindowPanel is to record the state of the window;
输入模块2用以在有点击动作时产生输入事件,每个输入事件里含有点击的坐标值(例如x,y坐标值),然后按顺序遍历输入列表21;如果发现某个窗 口的可点击区域中包含了这个输入的坐标,那就把这个事件分发到这个窗口,即使该窗口是非顶端的显示单元;The input module 2 is configured to generate an input event when there is a click action, each input event contains a coordinate value of the click (for example, an x, y coordinate value), and then traverses the input list 21 in order; if a window is found The clickable area of the port contains the coordinates of the input, and the event is distributed to the window even if the window is a non-top display unit;
判断模块3用以判断对应这个事件的窗口是否为当前窗口;如果是,则由该窗口进行处理,例如判断按钮位置等;如果不是,则向窗口管理模块4发送请求;The determining module 3 is configured to determine whether the window corresponding to the event is the current window; if yes, the window is processed, for example, determining the button position, etc.; if not, sending a request to the window management module 4;
窗口管理模块4用以在收到请求之后,修改窗口列表(WindowList)的排序,进而触发Z-order的改动,并最终修改Z-order的列表5;然后通知UI刷新,这样就实现了多窗口的切换。The window management module 4 is configured to modify the order of the window list (WindowList) after receiving the request, thereby triggering the Z-order change, and finally modifying the Z-order list 5; then notifying the UI to refresh, thus implementing the multi-window Switching.
其中:among them:
应用的WindowPanel的参数更新包括拖动窗口、改变窗口的大小等,以确保后续的点击动作能够以最新的窗口状态为基础。The parameter update of the applied WindowPanel includes dragging the window, changing the size of the window, etc. to ensure that subsequent click actions can be based on the latest window state.
请参图2示,比如已启动的应用是应用A和应用B,应用A是当前正常显示的应用,而应用B的窗口被应用A的窗口部分遮挡,此时鼠标点击应用B的窗口,本申请的多窗口***100也会使得输入事件可以正确地传递到被部分遮挡的应用B的窗口上。Please refer to FIG. 2, for example, the launched application is application A and application B, application A is the currently displayed application, and the application B window is partially blocked by the application A window, at this time the mouse clicks the application B window, this The requested multi-window system 100 also enables input events to be properly passed to the partially occluded application B window.
请参图8示,在修改Z-order的列表5后,把应用B所有的显示单元与应用A的显示单元对换,这样就完成了鼠标点击切换应用B。Referring to FIG. 8, after modifying the list 5 of the Z-order, the display unit of the application B is swapped with the display unit of the application A, thus completing the mouse click switching application B.
相较于安卓原生***,本申请的实施例中的应用的WindowPanel的参数能够更新;本申请更改了输入事件的分发机制,能够使得点击事件可以传送给非顶端显示单元,并修改Z-order的列表5,最终实现通过鼠标进行窗口切换的功能。Compared with the Android native system, the parameters of the WindowPanel of the application in the embodiment of the present application can be updated; the application changes the distribution mechanism of the input event, enables the click event to be transmitted to the non-top display unit, and modifies the Z-order Listing 5, the final realization of the function of window switching by mouse.
为解决安卓原生***中不能基于输入事件实现窗口切换的问题,本申请实施例还提供一种多窗口***下切换显示对象的装置,该装置的具体结构示意图如图9所示,包括坐标值获得单元91、判断单元92和界面刷新单元93。以下分别介绍各单元的功能: In order to solve the problem that the window switching cannot be implemented based on the input event in the Android native system, the embodiment of the present application further provides a device for switching the display object in the multi-window system. The specific structure of the device is shown in FIG. 9 , and the coordinate value is obtained. The unit 91, the judging unit 92, and the interface refreshing unit 93. The functions of each unit are described below:
坐标值获得单元91,用于获得输入事件中包含的点击点的坐标值;a coordinate value obtaining unit 91, configured to obtain a coordinate value of a click point included in the input event;
判断单元92,用于判断包含坐标值获得单元91获得的坐标值的可点击区域对应的显示对象(下文简称所述显示对象)是否为顶端显示对象;a determining unit 92, configured to determine whether a display object (hereinafter referred to as the display object) corresponding to the clickable area of the coordinate value obtained by the coordinate value obtaining unit 91 is a top display object;
界面刷新单元93,用于在判断单元92得到的判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面。The interface refreshing unit 93 is configured to set the display object as the top display object and refresh the display interface when the determination result obtained by the determining unit 92 is negative.
在一种实施方式中,界面刷新单元93可以用于:将所述显示对象的Z序的值更新为大于多窗口***中其他显示对象的Z序的值。In an embodiment, the interface refresh unit 93 may be configured to: update the value of the Z-order of the display object to be greater than the value of the Z-order of other display objects in the multi-window system.
在一种实施方式中,上述装置还可以包括属性信息更新单元。该单元用于在判断单元判断包含点击点的坐标值的可点击区域对应的显示对象是否为顶端显示对象前,更新输入列表中的可点击区域TouchableRegion。In an embodiment, the above apparatus may further include an attribute information updating unit. The unit is configured to update the clickable area TouchableRegion in the input list before the determining unit determines whether the display object corresponding to the clickable area including the coordinate value of the click point is the top display object.
基于属性信息更新单元的功能,判断单元92可以用于通过遍历输入列表中的TouchableRegion,确定包含坐标值的TouchableRegion;并判断包含点击点的坐标值的TouchableRegion对应的显示对象是否为顶端显示对象。Based on the function of the attribute information updating unit, the determining unit 92 may be configured to determine the TouchableRegion including the coordinate value by traversing the TouchableRegion in the input list; and determine whether the display object corresponding to the TouchableRegion including the coordinate value of the click point is the top display object.
在一种实施方式中,属性信息更新单元可以用于:在确定多窗口***中的显示对象的TouchableRegion发生变化后,根据发生变化的TouchableRegion,更新输入列表中的TouchableRegion。In an embodiment, the attribute information updating unit may be configured to: after determining that the TouchableRegion of the display object in the multi-window system changes, update the TouchableRegion in the input list according to the changed TouchableRegion.
在一种实施方式中,上述装置还可以包括:发送单元,用于将输入事件发送给所述显示对象的显示单元。In an embodiment, the apparatus may further include: a sending unit, configured to send an input event to the display unit of the display object.
在一种实施方式中,当显示对象为窗口时,图9所示的该装置还可以包括执行保存单元和显示单元。其中:In an embodiment, when the display object is a window, the apparatus shown in FIG. 9 may further include an execution saving unit and a display unit. among them:
执行保存单元,用于在坐标值获得单元91获得输入事件中包含的点击点的坐标值之前,针对已启动的应用,将该应用的各显示单元保存在该应用对应的容器中;其中,至少有两个已启动的应用,不同的应用对应的容器不同;The saving unit is configured to save, after the coordinate value obtaining unit 91 obtains the coordinate value of the click point included in the input event, the display unit of the application in the corresponding container of the application; wherein, at least There are two applications that have been launched, and different applications have different containers;
显示单元,用于根据设置的该应用的窗口属性和该应用对应的容器中保存的各显示单元,显示该应用的窗口。a display unit, configured to display a window of the application according to the set window attribute of the application and each display unit saved in the container corresponding to the application.
在一种实施方式中,当显示对象为窗口中的可视单元时,图9所示的该装 置还可以包括执行保存单元和显示单元。其中:In one embodiment, when the display object is a visual unit in the window, the device shown in FIG. The resetting may include executing the saving unit and the display unit. among them:
执行保存单元,用于在坐标值获得单元91获得输入事件中包含的点击点的坐标值之前,针对已启动的各应用,将各应用的显示单元保存在至少一个容器中;Executing a saving unit, configured to save the display unit of each application in at least one container for each application that has been activated before the coordinate value obtaining unit 91 obtains the coordinate value of the click point included in the input event;
显示单元,用于根据设置的窗口属性和所述容器中保存的各显示单元,显示多个窗口;其中,至少有一个窗口中显示有两个以上的可视单元。a display unit, configured to display a plurality of windows according to the set window attribute and each display unit saved in the container; wherein at least one of the windows displays more than two visual units.
本领域内的技术人员应明白,本发明的实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。 These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flashRAM)。内存是计算机可读介质的示例。The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory, such as read only memory (ROM) or flash memory (flashRAM), in a computer readable medium. Memory is an example of a computer readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。It is also to be understood that the terms "comprises" or "comprising" or "comprising" or any other variations are intended to encompass a non-exclusive inclusion, such that a process, method, article, Other elements not explicitly listed, or elements that are inherent to such a process, method, commodity, or equipment. An element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in a process, method, article, or device that comprises the element, without further limitation.
本领域技术人员应明白,本申请的实施例可提供为方法、***或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。 Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Thus, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。 The above is only an embodiment of the present application and is not intended to limit the application. Various changes and modifications can be made to the present application by those skilled in the art. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the present application are intended to be included within the scope of the appended claims.

Claims (16)

  1. 一种多窗口***下切换显示对象的方法,其特征在于,包括:A method for switching display objects in a multi-window system, comprising:
    获得输入事件中包含的点击点的坐标值;Get the coordinate value of the click point contained in the input event;
    判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象;Determining whether the display object corresponding to the clickable area including the coordinate value is a top display object;
    在判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面。When the determination result is no, the display object is set as the top display object, and the display interface is refreshed.
  2. 如权利要求1所述的方法,其特征在于,将所述显示对象设置为顶端显示对象,包括:The method of claim 1 wherein setting the display object to a top display object comprises:
    将所述显示对象的Z序的值更新为大于所述多窗口***中其他显示对象的Z序的值。Updating the value of the Z-order of the display object to a value greater than the Z-order of other display objects in the multi-window system.
  3. 如权利要求1所述的方法,其特征在于,判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象前,所述方法还包括:The method of claim 1, wherein before the determining whether the display object corresponding to the clickable area of the coordinate value is the top display object, the method further comprises:
    更新输入列表中的可点击区域TouchableRegion;Update the clickable area TouchableRegion in the input list;
    判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象,包括:Determining whether the display object corresponding to the clickable area including the coordinate value is a top display object, including:
    通过遍历所述输入列表中的TouchableRegion,确定包含所述坐标值的TouchableRegion;Determining a TouchableRegion containing the coordinate value by traversing the TouchableRegion in the input list;
    判断包含所述坐标值的TouchableRegion对应的显示对象是否为顶端显示对象。It is determined whether the display object corresponding to the TouchableRegion including the coordinate value is the top display object.
  4. 如权利要求3所述的方法,其特征在于,更新输入列表中的可点击区域TouchableRegion,包括:The method of claim 3 wherein updating the clickable region TouchableRegion in the input list comprises:
    在确定所述多窗口***中的显示对象的TouchableRegion发生变化后,根据发生变化的TouchableRegion,更新输入列表中的TouchableRegion。After determining that the TouchableRegion of the display object in the multi-window system has changed, the TouchableRegion in the input list is updated according to the changed TouchableRegion.
  5. 如权利要求1~4任一权项所述的方法,其特征在于,所述方法还包括:The method of any of claims 1 to 4, wherein the method further comprises:
    将所述输入事件发送给所述显示对象的显示单元。The input event is sent to a display unit of the display object.
  6. 如权利要求1~4任一权项所述的方法,其特征在于,所述显示对象为 窗口或者窗口中的可视单元。The method according to any one of claims 1 to 4, wherein the display object is A visual unit in a window or window.
  7. 如权利要求6所述的方法,其特征在于,所述显示对象为窗口;The method of claim 6 wherein said display object is a window;
    获得输入事件中包含的点击点的坐标值之前,所述方法还包括:Before obtaining the coordinate values of the click points included in the input event, the method further includes:
    针对已启动的应用,将该应用的各显示单元保存在该应用对应的容器中;其中,至少有两个已启动的应用,不同的应用对应的容器不同;For the launched application, each display unit of the application is saved in a container corresponding to the application; wherein there are at least two activated applications, and different containers correspond to different containers;
    根据设置的该应用的窗口属性和该应用对应的容器中保存的各显示单元,显示该应用的窗口。The window of the application is displayed according to the set window property of the application and each display unit saved in the container corresponding to the application.
  8. 如权利要求6所述的方法,其特征在于,所述显示对象为窗口中的可视单元;The method of claim 6 wherein said display object is a visual unit in a window;
    获得输入事件中包含的点击点的坐标值之前,所述方法还包括:Before obtaining the coordinate values of the click points included in the input event, the method further includes:
    针对已启动的各应用,将所述各应用的显示单元保存在至少一个容器中;Displaying, for each application that has been started, the display unit of each application in at least one container;
    根据设置的窗口属性和所述容器中保存的各显示单元,显示多个窗口;Displaying a plurality of windows according to the set window property and each display unit saved in the container;
    其中,至少有一个窗口中显示有两个以上的可视单元。Among them, at least one window displays more than two visual units.
  9. 一种多窗口***下切换显示对象的装置,其特征在于,包括:An apparatus for switching display objects in a multi-window system, comprising:
    坐标值获得单元,用于获得输入事件中包含的点击点的坐标值;a coordinate value obtaining unit, configured to obtain a coordinate value of a click point included in the input event;
    判断单元,用于判断包含坐标值获得单元获得的坐标值的可点击区域对应的显示对象是否为顶端显示对象;a determining unit, configured to determine whether the display object corresponding to the clickable area of the coordinate value obtained by the coordinate value obtaining unit is the top display object;
    界面刷新单元,用于在判断单元得到的判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面。The interface refreshing unit is configured to set the display object as the top display object and refresh the display interface when the determination result obtained by the determining unit is negative.
  10. 如权利要求9所述的装置,其特征在于,界面刷新单元,用于:The device according to claim 9, wherein the interface refreshing unit is configured to:
    将所述显示对象的Z序的值更新为大于所述多窗口***中其他显示对象的Z序的值。Updating the value of the Z-order of the display object to a value greater than the Z-order of other display objects in the multi-window system.
  11. 如权利要求9所述的装置,其特征在于,所述装置还包括:The device of claim 9 wherein said device further comprises:
    属性信息更新单元,用于在判断单元判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象前,更新输入列表中的可点击区域TouchableRegion;则 The attribute information updating unit is configured to update the clickable area TouchableRegion in the input list before the determining unit determines whether the display object corresponding to the clickable area including the coordinate value is the top display object;
    判断单元,用于通过遍历所述输入列表中的TouchableRegion,确定包含所述坐标值的TouchableRegion;判断包含所述坐标值的TouchableRegion对应的显示对象是否为顶端显示对象。The determining unit is configured to determine a TouchableRegion including the coordinate value by traversing the TouchableRegion in the input list, and determine whether the display object corresponding to the TouchableRegion including the coordinate value is a top display object.
  12. 如权利要求11所述的装置,其特征在于,属性信息更新单元,用于:The device according to claim 11, wherein the attribute information updating unit is configured to:
    在确定所述多窗口***中的显示对象的TouchableRegion发生变化后,根据发生变化的TouchableRegion,更新输入列表中的TouchableRegion。After determining that the TouchableRegion of the display object in the multi-window system has changed, the TouchableRegion in the input list is updated according to the changed TouchableRegion.
  13. 如权利要求9~12任一权项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 9 to 12, wherein the device further comprises:
    发送单元,用于将所述输入事件发送给所述显示对象的显示单元。And a sending unit, configured to send the input event to a display unit of the display object.
  14. 如权利要求9~12任一权项所述的装置,其特征在于,所述显示对象为窗口或者窗口中的可视单元。The apparatus according to any one of claims 9 to 12, wherein the display object is a visual unit in a window or a window.
  15. 如权利要求14所述的装置,其特征在于,所述显示对象为窗口;所述装置还包括:The device according to claim 14, wherein the display object is a window; the device further comprises:
    执行保存单元,用于在坐标值获得单元获得输入事件中包含的点击点的坐标值之前,针对已启动的应用,将该应用的各显示单元保存在该应用对应的容器中;其中,至少有两个已启动的应用,不同的应用对应的容器不同;The saving unit is configured to save, after the coordinate value obtaining unit obtains the coordinate value of the click point included in the input event, the display unit of the application in the corresponding container of the application; wherein, at least Two started applications, different containers corresponding to different applications;
    显示单元,用于根据设置的该应用的窗口属性和该应用对应的容器中保存的各显示单元,显示该应用的窗口。a display unit, configured to display a window of the application according to the set window attribute of the application and each display unit saved in the container corresponding to the application.
  16. 如权利要求14所述的装置,其特征在于,所述显示对象为窗口中的可视单元;所述装置还包括:The device of claim 14, wherein the display object is a visual unit in a window; the device further comprising:
    执行保存单元,用于在坐标值获得单元获得输入事件中包含的点击点的坐标值之前,针对已启动的各应用,将所述各应用的显示单元保存在至少一个容器中;The saving unit is configured to save the display unit of each application in at least one container for each application that has been activated before the coordinate value obtaining unit obtains the coordinate value of the click point included in the input event;
    显示单元,用于根据设置的窗口属性和所述容器中保存的各显示单元,显示多个窗口;a display unit, configured to display a plurality of windows according to the set window attribute and each display unit saved in the container;
    其中,至少有一个窗口中显示有两个以上的可视单元。 Among them, at least one window displays more than two visual units.
PCT/CN2015/097479 2014-12-23 2015-12-15 Method for switching display object in multi-window system and device thereof WO2016101810A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410812069.4 2014-12-23
CN201410812069.4A CN105786301B (en) 2014-12-23 2014-12-23 Method and device for switching display object under multi-window system

Publications (1)

Publication Number Publication Date
WO2016101810A1 true WO2016101810A1 (en) 2016-06-30

Family

ID=56149235

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/097479 WO2016101810A1 (en) 2014-12-23 2015-12-15 Method for switching display object in multi-window system and device thereof

Country Status (2)

Country Link
CN (1) CN105786301B (en)
WO (1) WO2016101810A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108279963A (en) * 2018-01-05 2018-07-13 郑州信大捷安信息技术股份有限公司 A kind of intelligent terminal of the more android systems of list linux kernel shows virtual method
WO2019091467A1 (en) * 2017-11-09 2019-05-16 北京众纳鑫海网络技术有限公司 Method, apparatus, and device for quickly starting application program, and storage medium

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107765943B (en) * 2017-10-16 2020-05-12 北京点石经纬科技有限公司 Method for realizing simultaneous operation of double APPs on double-screen intelligent terminal
CN109710343B (en) * 2017-10-25 2023-01-17 北京众纳鑫海网络技术有限公司 Method, device and equipment for switching windows of computer desktop and storage medium
CN107885437A (en) * 2017-11-29 2018-04-06 广州视源电子科技股份有限公司 multi-element interaction method, device, equipment and storage medium
CN108279826A (en) * 2018-03-07 2018-07-13 北京布卡互动科技有限公司 A kind of more videos and Multiple Document Interface alignment placement method
CN109151582A (en) * 2018-08-16 2019-01-04 海信电子科技(深圳)有限公司 More application management methods, device and terminal based on Linux set-top box
CN113312125B (en) * 2021-04-30 2022-11-25 北京仁光科技有限公司 Multi-window adjusting method, system, readable storage medium and electronic equipment
CN114415877A (en) * 2022-01-25 2022-04-29 深圳Tcl新技术有限公司 Multi-window interaction method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488989A (en) * 2008-01-18 2009-07-22 德信智能手机技术(北京)有限公司 Method for managing tasks on mobile phone
CN102063302A (en) * 2010-12-20 2011-05-18 北京握奇数据***有限公司 Window management method, system and terminal
CN102214060A (en) * 2010-04-12 2011-10-12 宏碁股份有限公司 Touch electronic device and window control method thereof
CN103309555A (en) * 2012-10-31 2013-09-18 中兴通讯股份有限公司 Focus switching method and device based on multiple windows
CN104077016A (en) * 2013-03-29 2014-10-01 中兴通讯股份有限公司 Method and device for displaying and switching multiple windows

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013131190A (en) * 2011-12-22 2013-07-04 Aisin Aw Co Ltd Input system, input method and input program
CN102917118A (en) * 2012-09-13 2013-02-06 东莞宇龙通信科技有限公司 Terminal and task display method
WO2014157908A1 (en) * 2013-03-27 2014-10-02 Samsung Electronics Co., Ltd. Device and method for displaying execution result of application
TWI496069B (en) * 2013-06-28 2015-08-11 Insyde Software Corp Method of Judging Electronic Device and Multi - window Touch Command

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488989A (en) * 2008-01-18 2009-07-22 德信智能手机技术(北京)有限公司 Method for managing tasks on mobile phone
CN102214060A (en) * 2010-04-12 2011-10-12 宏碁股份有限公司 Touch electronic device and window control method thereof
CN102063302A (en) * 2010-12-20 2011-05-18 北京握奇数据***有限公司 Window management method, system and terminal
CN103309555A (en) * 2012-10-31 2013-09-18 中兴通讯股份有限公司 Focus switching method and device based on multiple windows
CN104077016A (en) * 2013-03-29 2014-10-01 中兴通讯股份有限公司 Method and device for displaying and switching multiple windows

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019091467A1 (en) * 2017-11-09 2019-05-16 北京众纳鑫海网络技术有限公司 Method, apparatus, and device for quickly starting application program, and storage medium
CN108279963A (en) * 2018-01-05 2018-07-13 郑州信大捷安信息技术股份有限公司 A kind of intelligent terminal of the more android systems of list linux kernel shows virtual method
CN108279963B (en) * 2018-01-05 2020-11-20 郑州信大捷安信息技术股份有限公司 Single Linux kernel multi-Android system intelligent terminal display virtualization method

Also Published As

Publication number Publication date
CN105786301A (en) 2016-07-20
CN105786301B (en) 2020-03-10

Similar Documents

Publication Publication Date Title
WO2016101810A1 (en) Method for switching display object in multi-window system and device thereof
US11164280B2 (en) Graphics layer processing in a multiple operating systems framework
WO2016095728A1 (en) Multi-window display method and device
US9912724B2 (en) Moving objects of a remote desktop in unstable network environments
CN109032390B (en) Handwriting data caching method, device, equipment and storage medium
WO2021072912A1 (en) File sharing method, apparatus, and system, interactive smart device, source end device, and storage medium
US11556235B2 (en) Interacting with nonconforming applications in a windowing environment
CN107656759B (en) Rendering method and device for user interface
US20230338842A1 (en) Rendering processing method and electronic device
CN111767002B (en) Page display method, device, equipment and storage medium
TWI649695B (en) Method and device for combined operating system
WO2016101816A1 (en) Method and device for information display in instant messaging
US20160378272A1 (en) Systems and methods for providing multi-focus to applications for collaboration
US11024257B2 (en) Android platform based display device and image display method thereof
CN107077347B (en) View management architecture
JP2017538202A (en) Method and apparatus for displaying object information on a screen display device
WO2016141597A1 (en) Touch control method, device, terminal and graphical user interface thereof
WO2019001373A1 (en) Method and device for processing gesture command
WO2021068405A1 (en) Element transfer method, apparatus and device, and storage medium
WO2022242628A1 (en) Screen casting method, apparatus, and device, and storage medium
US9483171B1 (en) Low latency touch input rendering
CN113093961B (en) Window switching method, storage medium and related equipment
CN112667410A (en) Cross-process communication method, terminal and computer readable storage medium
CN110780788A (en) Method and equipment for executing touch operation
CN113763459B (en) Element position updating method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15871878

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15871878

Country of ref document: EP

Kind code of ref document: A1