WO2016101810A1 - 多窗口系统下切换显示对象的方法及其装置 - Google Patents
多窗口系统下切换显示对象的方法及其装置 Download PDFInfo
- 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
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction 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
一种多窗口系统下切换显示对象的方法及其装置,用以解决安卓原生系统中不能基于输入事件实现窗口切换的问题。该方法包括:获得输入事件中包含的点击点的坐标值(41);判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象(42);在判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面(43)。
Description
本申请涉及计算机技术领域,尤其涉及一种多窗口系统下切换显示对象的方法及其装置。
随着计算机信息技术的发展,在多窗口系统下,如果用户想要有更好的体验,需要能够实现多个窗口之间的切换。
请参图1a所示,Z-order是指在一堆堆叠的窗口中,这些窗口的堆叠顺序。具体而言,窗口的堆叠是指沿着一条从屏幕里向屏幕外延伸的虚轴(一般称为Z轴)对窗口进行堆叠,在Z-order顶端的窗口(即顶端窗口,例如窗口n)将会压在其他窗口上,而在Z-order底部的窗口(即底部窗口,例如窗口1)将会被其他窗口所压。
现有的安卓原生系统(下文简称系统)的输入事件分发机制是,如果有点击动作,系统的java层会产生含有点击点的坐标值(例如x,y坐标值)的输入(input)事件,并输出给系统的输入模块;输入模块按从顶端窗口至底部窗口的顺序,依次遍历输入列表(InputList)中的窗口属性;如果根据窗口属性发现某个窗口为可点击窗口,就把这个事件分发到这个窗口的显示单元并结束遍历;之后,显示单元如果判断出输入事件中包含的点击点的坐标值在显示单元的可点击区域(TouchableRegion)里,则会处理该事件,否则不会对该事件进行做处理。
具体地,请参图1b所示,目前已启动的应用是应用A和应用B,应用A是当前正常显示的应用(即应用A的窗口为顶端窗口),而应用B的窗口被应用A的窗口部分遮挡。在现有的安卓原生系统下,鼠标点击应用B的窗口,所产生的输入事件在现有的分发机制下只会发送到顶端窗口,即只发送到应用A的窗口的显示单元。可以理解的是:因为鼠标所点击的位置(坐标)已经超
出了应用A的窗口区域,因此即使所产生的输入事件被发送到应用A的窗口的显示单元,该显示单元也不会处理该输入事件,从而也不会发生窗口切换。
基于上述分析,现有系统如果沿用安卓原生Z-order的设计,是不能基于输入事件实现窗口切换的。因此,有必要对现有技术进行改进。
发明内容
本申请实施例提供一种多窗口系统下切换显示对象的方法,用以解决安卓原生系统中不能基于输入事件实现显示对象切换的问题。
本申请实施例还提供一种多窗口系统下切换显示对象的装置,用以解决安卓原生系统中不能基于输入事件实现显示对象切换的问题。
本申请实施例采用下述技术方案:
一种多窗口系统下切换显示对象的方法,包括:获得输入事件中包含的点击点的坐标值;判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象;在判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面。
一种多窗口系统下切换显示对象的装置,包括:坐标值获得单元,用于获得输入事件中包含的点击点的坐标值;判断单元,用于判断包含坐标值获得单元获得的坐标值的可点击区域对应的显示对象是否为顶端显示对象;界面刷新单元,用于在判断单元得到的判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面。
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:
由于在判断出包含点击点的坐标值的可点击区域对应的显示对象不是顶端显示对象时,会将该显示对象设置为顶端显示对象进行显示,从而解决了安卓原生系统中不能基于输入事件实现窗口切换的问题。
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1a为本申请实施例提供的Z-order的列表顺序示意图。
图1b为本申请实施例提供的应用A与应用B在窗口切换前的示意图。
图2为本申请实施例中应用A和应用B的activity堆栈示意图。
图3为本申请实施例中一种多窗口显示示意图。
图4为本申请实施例提供的一种多窗口系统下切换显示对象的方法的实现流程示意图。
图5为本申请实施例提供的多窗口系统下切换窗口的装置的示意图。
图6为本申请实施例提供的输入列表与Z-order的列表两者之间相互对应的示意图。
图7为本申请实施例提供的多窗口系统下切换窗口的方法的步骤示意图。
图8为本申请实施例提供的应用A与应用B在窗口切换后的示意图。
图9为本申请实施例提供的一种多窗口系统下切换显示对象的装置的结构示意图。
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
对本申请实施例提供的方案进行介绍之前,首先对一种多窗口系统的实现方式进行介绍。具体地,该方式包括步骤S101和步骤S102:
S101:终端针对已启动的每个应用,将该应用的各显示单元保存在该应用
对应的容器中,其中,不同的应用对应的容器不同。
在本申请实施例中,所述的终端包括但不限于:手机、平板电脑等。
在终端上,每个应用启动后,用于显示该应用的界面的各显示单元会在该应用的运行过程中分别启动。终端可以针对已启动的每个应用,分别为该应用实例化一个容器,然后将该应用已启动的各显示单元保存在对应的容器中,后续用于显示相应的应用界面。
其中,所述的容器可以是堆栈,位于该堆栈顶端的显示单元处于活动(Active)状态,处于Active状态的显示单元会被该应用的进程或线程所调用,以向用户显示该显示单元对应的应用界面,该显示单元对应的应用界面上的内容可以实时刷新,并可以通过预设的各种输入指令与用户进行交互,而此时该堆栈中其他的显示单元均处于暂停(Paused)状态或停止(Stopped)状态,处于Paused状态或Stopped状态的显示单元当前未显示给用户。当该应用从当前应用界面跳转至另一个应用界面时,该另一个应用界面所对应的显示单元会从堆栈中弹出并重新保存在堆栈顶端,也即,被激活并切换至Active状态,相应的,原来堆栈顶端原来的显示单元的保存位置向下移动,并切换至Paused状态或Stopped状态,则该另一个应用界面成为当前显示给用户的应用界面。
S102:终端根据该应用的窗口属性和该应用对应的容器中保存的各显示单元,显示该应用的窗口。
在本申请实施例中,应用的各显示单元包含预先定义的该应用界面上的各种显示元素,如文字、图片、视频、控件等。一般的,应用的进程调用显示单元显示应用界面时,会获取当前终端屏幕的分辨率信息,然后根据该分辨率信息直接将应用界面自适应地全屏显示在终端屏幕上。而若要以窗口的方式显示各显示单元对应的应用界面,由于还需要确定待显示的窗口的大小以及位置相关信息,因此,可以预先定义窗口属性以保存这些相关信息,并在窗口的生存期(从窗口创建至该窗口被关闭的这段时间)内追踪和更新这些相关信息。
其中,所述的窗口属性可以包含窗口长度值、窗口宽度值和窗口坐标值等,
所述的窗口坐标值所参考的坐标是当前终端屏幕上的二维坐标,窗口坐标值用于定位窗口在当前终端屏幕上所处的位置,可以是窗口的两条对角线的交点的坐标,也可以是窗口区域内其他特定点(例如窗口的顶点)的坐标,对于矩形窗口,其窗口长度值、窗口宽度值和窗口坐标值确定时,则窗口的大小和位置确定。
在本申请实施例中,终端可根据该应用的窗口属性确定窗口在终端屏幕上的大小和位置,然后,通过相应的进程或线程调用该应用对应的容器中保存的相应显示单元,显示该应用的窗口。
在本申请实施例中,所述的显示单元具体包括activity,所述的容器具体包括activity堆栈。
需要说明的是,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。
图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显示对应的应用界面。
本申请实施例中,另一种多窗口系统的实现方式具体可以包括以下步骤一和步骤二:
步骤一:针对已启动的各应用,将各应用的显示单元保存在至少一个容器中。
在本申请实施例中,所述的显示单元可以是activity,所述的容器可以是activity堆栈。
终端针对已启动的各应用,可以分别为每个应用实例化一个activity堆栈,以保存该应用的activity,也可以直接实例化一个或多个activity堆栈,以供各应用共用这些activity堆栈,则可将各应用的activity保存在这些activity堆栈中,后续用于显示。
步骤二:根据设置的窗口属性和所述容器中保存的各显示单元,显示多个窗口,其中,至少有一个窗口中显示有两个以上的可视单元。
在本申请实施例中,终端可以根据设置的窗口属性和activity堆栈中保存的各显示单元,分别为每个已启动的应用显示一个窗口,这样的话,每个应用的窗口中只会显示该应用自己的可视单元。
终端也可以根据设置的窗口属性,先实例化一个或多个窗口,然后,根据activity堆栈中保存的各显示单元,在每个窗口中显示两个或多个可视单元,从而,可以提高窗口的使用效率。其中,在同一个窗口中显示的两个或多个可视单元可以属于同一个应用,也可以属于不同的应用。
图3示出了在这种场景下的多窗口显示示意图,可以看到,在终端屏幕上显示有两个窗口。
窗口“应用A&B”是应用A和应用B共用的窗口,在窗口的显示区域的左侧(也即,虚线的左侧)是根据应用A的activity,所显示的应用A的可视单元(也称实时内容),在窗口的显示区域的右侧(也即,虚线的右侧)是根据应用B的activity,所显示的应用B的可视单元。
窗口“应用C”是应用C的窗口,在窗口的显示区域的左侧(也即,虚线
的左侧)是根据应用C的一个activity,所显示的应用C的第一可视单元,在窗口的显示区域的右侧(也即,虚线的右侧)是根据应用C的另一个activity,所显示的应用C的第二可视单元。
在实际应用中,当终端需要在同一个窗口中同时显示两个以上的可视单元时,可以在该窗口的窗口属性中,对每个可视单元在窗口显示区域中的大小和位置(大小和位置,在这里可称为子区域)预先定义,从而,各可视单元可以正确地显示在对应的子区域中。当前,根据各子区域设置的不同,各可视单元在同一个窗口中既可以完全重叠显示或部分重叠显示,也可以不重叠显示。
通过上述方法,由于终端可以实例化多个activity堆栈来保存已启动的各应用的activity,因此,终端可以根据各activity堆栈顶部的显示单元,实现同时显示多个窗口,而且,可以根据设置的窗口属性预先对窗口显示区域划分出多个子区域,从而,可以在同一个窗口中的每个子区域中都显示一个可视单元,从而,终端屏幕上可以同时显示多个应用的可视单元。
为便于描述,后文将“窗口”和“可视单元”统称为“显示对象”。
基于上述介绍,为解决安卓原生系统中不能基于输入事件实现窗口切换的问题,本申请实施例首先提供一种多窗口系统下切换显示对象的方法,该方法包括如图4所示的下述步骤:
步骤41,获得输入事件中包含的点击点的坐标值;
步骤42,判断包含点击点的坐标值的TouchableRegion对应的显示对象是否为顶端显示对象;在判断结果表示该显示对象不是顶端显示对象时,执行步骤43;
需要说明的是,当显示对象为窗口时,这里所说的TouchableRegion可以是背景技术中所述的输入模块维护的输入列表中的一种窗口属性。对应于单个窗口的窗口属性至少表示单个窗口的可点击区域的坐标范围,即位于该区域内的可点击点的坐标值。此外,该窗口属性还可以表示窗口的其他参数,比如大小、在显示屏幕上所处位置和/或宽高等。在本申请实施例中,窗口的可点击
区域的坐标范围以及其他参数的值均是可以改变的。
当显示对象为可视单元时,上述TouchableRegion可以是对背景技术中所述的窗口属性进行改进后得到的一种新的窗口属性。具体而言,当显示对象为可视单元时,该新的窗口属性具体可以为窗口中的可视单元的属性。对应于单个可视单元的属性至少表示单个可视单元的可点击区域的坐标范围,即位于该区域内的可点击点的坐标值。此外,该窗口属性还可以表示可视单元的其他参数,比如大小、在显示屏幕上所处位置和/或宽高等。在本申请的实施例中,可视单元的可点击区域的坐标范围以及其他参数的值均是可以改变的。
步骤43,将该显示对象设置为顶端显示对象,并刷新显示界面。
需要说明的是,当显示对象为可视单元时,将可视单元设置为顶端可视单元(顶端可视单元也可以称为焦点可视单元),意味着该可视单元所在的窗口也被设置为顶端窗口(顶端窗口也可以称为焦点窗口)。
采用本申请实施例提供的上述方法,由于在判断出包含点击点的坐标值的可点击区域对应的显示对象不是顶端显示对象时,会将该显示对象设置为顶端显示对象进行显示,从而解决了安卓原生系统中不能基于输入事件实现窗口切换的问题。
以下对上述步骤的一些可选实施方式进行详细说明。
针对步骤42而言,考虑到显示对象被执行拖动、放大或缩小等操作后,会导致显示对象的TouchableRegion发生变化,因此,为了保证通过执行步骤42得到的判断结果的准确性,在一种实施方式中,可以在判断包含点击点的坐标值的TouchableRegion对应的显示对象是否为顶端显示对象之前,对输入列表中的TouchableRegion进行更新。
基于更新后的输入列表,判断包含点击点的坐标值的可点击区域对应的显示对象是否为顶端显示对象的方式可以包括:
通过遍历更新后的输入列表中的TouchableRegion,确定包含点击点的坐标值的TouchableRegion;判断包含该坐标值的TouchableRegion对应的显示对
象是否为顶端显示对象。
本申请实施例中,对于输入列表的更新可以是周期性的,也可以是非周期性的。针对非周期性的更新方式而言,比如,在一种实施方式中,更新方式可以包括:确定显示对象的TouchableRegion发生变化后,根据发生变化的TouchableRegion,更新输入列表中的TouchableRegion。
针对步骤43而言:
在一种实施方式中,将显示对象设置为顶端显示对象的实现方式可以通过修订Z-order的列表来实现。
其中,Z-order的列表中保存有显示对象的Z序的值。一般地,显示对象的Z序的值越大,显示对象在Z-order中越靠近顶端;显示对象的Z序的值越小,显示对象在Z-order中越靠近底端。在显示多显示对象时,多窗口系统会以Z-order的列表中保存的Z序的值,作为确定显示对象排列顺序的依据。基于这样的特点,本申请实施例中,可以通过将非顶端显示对象的Z序的值更新为大于多窗口系统中其他显示对象的Z序的值,使得非顶端显示对象被设置为顶端显示对象。
本申请实施例中,为了实现对输入事件的处理,上述方法还可以包括步骤:将输入事件发送给包含点击点的坐标值的TouchableRegion对应的显示对象的显示单元。
本申请的另一种实施例以显示对象为窗口为例,揭示了一种多窗口系统下切换窗口的装置100,能够用于例如一体机等装置上。请参图5所示,本申请的实施例所揭示的多窗口系统下切换窗口的装置100包括更新模块1、输入模块(Input Module)2、判断模块3以及窗口管理模块(Window Manager Module)4。
输入模块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对应。
输入模块2所维护的窗口属性中,有名为“可点击区域(TouchableRegion)”的窗口属性,该信息至少表示该窗口的可点击区域的坐标范围,即位于该区域内的可点击点的坐标值。此外,该信息还可以表示窗口的其他参数,比如大小、在显示屏幕上所处位置和/或宽高等。在本申请的实施例中,窗口的可点击区域的坐标范围以及其他参数的值均是可以改变的。
基于上述介绍,请参图7所示,以下先就本申请的多窗口之间进行切换的方法进行描述,该方法包括如下步骤:
S1:根据应用的WindowPanel的参数,更新输入模块2所维护的输入列表21;
其中,WindowPanel的作用是用以记录该窗口的状态。
本申请实施例中,步骤S1的实现方式主要包括:根据应用的当前的TouchableRegion,更新输入列表21中的TouchableRegion,从而使得输入列表21中的TouchableRegion与应用的当前的TouchableRegion同步。
S2:当检测到点击动作时,系统的java层会产生输入事件并发送给输入模块2,每个输入事件里含有点击点的坐标值;然后,输入模块2按顺序遍历输入列表21;如果发现某个窗口的TouchableRegion中包含了这个输入事件中包含的坐标值,那就把这个事件分发到这个窗口的显示单元,即使该窗口是非顶端窗口;
S3:接收到输入事件的显示单元判断对应的窗口是否为顶端窗口;如果是,则显示单元对该事件进行处理,例如判断按钮位置等;如果不是,则显示单元向窗口管理模块4发送请求;
S4:窗口管理模块4在收到请求之后,修改窗口列表(WindowList)的排序,进而触发Z-order的改动,并最终修改Z-order的列表5;然后刷新用户界面(User Interface,UI),这样就实现了多窗口的切换。
以下详述上述步骤的一些可选的实施方式:
在一种实施方式中,步骤S1的执行时机可以包括:拖动窗口、改变窗口的大小等,以确保后续的点击动作能够以最新的窗口状态为基础。
在一种实施方式中,在步骤S2中,请参图1b示,比如已启动的应用是应用A和应用B,应用A是当前正常显示的应用,而应用B的窗口被应用A的窗口部分遮挡,此时鼠标点击应用B的窗口,本申请的多窗口系统100也会使得输入事件可以正确地传递到被部分遮挡的应用B的窗口的显示单元。
仍然以上述应用A和应用B为例,在一种实施方式中,在步骤S4中,在修改Z-order的列表5后,可以使得应用B的Z序的值大于应用A的Z序的值;进一步地,在执行刷新UI的过程中,窗口管理模块4可以根据被修改后的Z-order的列表5,确定出应用B的Z序的值当前为最大的Z序的值,从而将应用B的窗口作为顶端窗口进行显示,即,把应用B所有的显示单元与应用A的显示单元对换,从而完成基于输入事件将顶端窗口切换应用B的窗口(参图8)。
相较于安卓原生系统,本申请的实施例中的应用的WindowPanel的参数能够更新;本申请更改了输入事件的分发机制,能够使得输入事件可以传送给非顶端显示单元,并修改Z-order的列表5,最终实现通过鼠标进行窗口切换的功能。
请参图5示,多窗口系统下切换窗口的装置100的各个模块的功能如下:
更新模块1用以把应用的WindowPanel的参数更新到对应窗口的可点击区域中;其中,WindowPanel的作用是用以记录该窗口的状态;
输入模块2用以在有点击动作时产生输入事件,每个输入事件里含有点击的坐标值(例如x,y坐标值),然后按顺序遍历输入列表21;如果发现某个窗
口的可点击区域中包含了这个输入的坐标,那就把这个事件分发到这个窗口,即使该窗口是非顶端的显示单元;
判断模块3用以判断对应这个事件的窗口是否为当前窗口;如果是,则由该窗口进行处理,例如判断按钮位置等;如果不是,则向窗口管理模块4发送请求;
窗口管理模块4用以在收到请求之后,修改窗口列表(WindowList)的排序,进而触发Z-order的改动,并最终修改Z-order的列表5;然后通知UI刷新,这样就实现了多窗口的切换。
其中:
应用的WindowPanel的参数更新包括拖动窗口、改变窗口的大小等,以确保后续的点击动作能够以最新的窗口状态为基础。
请参图2示,比如已启动的应用是应用A和应用B,应用A是当前正常显示的应用,而应用B的窗口被应用A的窗口部分遮挡,此时鼠标点击应用B的窗口,本申请的多窗口系统100也会使得输入事件可以正确地传递到被部分遮挡的应用B的窗口上。
请参图8示,在修改Z-order的列表5后,把应用B所有的显示单元与应用A的显示单元对换,这样就完成了鼠标点击切换应用B。
相较于安卓原生系统,本申请的实施例中的应用的WindowPanel的参数能够更新;本申请更改了输入事件的分发机制,能够使得点击事件可以传送给非顶端显示单元,并修改Z-order的列表5,最终实现通过鼠标进行窗口切换的功能。
为解决安卓原生系统中不能基于输入事件实现窗口切换的问题,本申请实施例还提供一种多窗口系统下切换显示对象的装置,该装置的具体结构示意图如图9所示,包括坐标值获得单元91、判断单元92和界面刷新单元93。以下分别介绍各单元的功能:
坐标值获得单元91,用于获得输入事件中包含的点击点的坐标值;
判断单元92,用于判断包含坐标值获得单元91获得的坐标值的可点击区域对应的显示对象(下文简称所述显示对象)是否为顶端显示对象;
界面刷新单元93,用于在判断单元92得到的判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面。
在一种实施方式中,界面刷新单元93可以用于:将所述显示对象的Z序的值更新为大于多窗口系统中其他显示对象的Z序的值。
在一种实施方式中,上述装置还可以包括属性信息更新单元。该单元用于在判断单元判断包含点击点的坐标值的可点击区域对应的显示对象是否为顶端显示对象前,更新输入列表中的可点击区域TouchableRegion。
基于属性信息更新单元的功能,判断单元92可以用于通过遍历输入列表中的TouchableRegion,确定包含坐标值的TouchableRegion;并判断包含点击点的坐标值的TouchableRegion对应的显示对象是否为顶端显示对象。
在一种实施方式中,属性信息更新单元可以用于:在确定多窗口系统中的显示对象的TouchableRegion发生变化后,根据发生变化的TouchableRegion,更新输入列表中的TouchableRegion。
在一种实施方式中,上述装置还可以包括:发送单元,用于将输入事件发送给所述显示对象的显示单元。
在一种实施方式中,当显示对象为窗口时,图9所示的该装置还可以包括执行保存单元和显示单元。其中:
执行保存单元,用于在坐标值获得单元91获得输入事件中包含的点击点的坐标值之前,针对已启动的应用,将该应用的各显示单元保存在该应用对应的容器中;其中,至少有两个已启动的应用,不同的应用对应的容器不同;
显示单元,用于根据设置的该应用的窗口属性和该应用对应的容器中保存的各显示单元,显示该应用的窗口。
在一种实施方式中,当显示对象为窗口中的可视单元时,图9所示的该装
置还可以包括执行保存单元和显示单元。其中:
执行保存单元,用于在坐标值获得单元91获得输入事件中包含的点击点的坐标值之前,针对已启动的各应用,将各应用的显示单元保存在至少一个容器中;
显示单元,用于根据设置的窗口属性和所述容器中保存的各显示单元,显示多个窗口;其中,至少有一个窗口中显示有两个以上的可视单元。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flashRAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。
Claims (16)
- 一种多窗口系统下切换显示对象的方法,其特征在于,包括:获得输入事件中包含的点击点的坐标值;判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象;在判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面。
- 如权利要求1所述的方法,其特征在于,将所述显示对象设置为顶端显示对象,包括:将所述显示对象的Z序的值更新为大于所述多窗口系统中其他显示对象的Z序的值。
- 如权利要求1所述的方法,其特征在于,判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象前,所述方法还包括:更新输入列表中的可点击区域TouchableRegion;判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象,包括:通过遍历所述输入列表中的TouchableRegion,确定包含所述坐标值的TouchableRegion;判断包含所述坐标值的TouchableRegion对应的显示对象是否为顶端显示对象。
- 如权利要求3所述的方法,其特征在于,更新输入列表中的可点击区域TouchableRegion,包括:在确定所述多窗口系统中的显示对象的TouchableRegion发生变化后,根据发生变化的TouchableRegion,更新输入列表中的TouchableRegion。
- 如权利要求1~4任一权项所述的方法,其特征在于,所述方法还包括:将所述输入事件发送给所述显示对象的显示单元。
- 如权利要求1~4任一权项所述的方法,其特征在于,所述显示对象为 窗口或者窗口中的可视单元。
- 如权利要求6所述的方法,其特征在于,所述显示对象为窗口;获得输入事件中包含的点击点的坐标值之前,所述方法还包括:针对已启动的应用,将该应用的各显示单元保存在该应用对应的容器中;其中,至少有两个已启动的应用,不同的应用对应的容器不同;根据设置的该应用的窗口属性和该应用对应的容器中保存的各显示单元,显示该应用的窗口。
- 如权利要求6所述的方法,其特征在于,所述显示对象为窗口中的可视单元;获得输入事件中包含的点击点的坐标值之前,所述方法还包括:针对已启动的各应用,将所述各应用的显示单元保存在至少一个容器中;根据设置的窗口属性和所述容器中保存的各显示单元,显示多个窗口;其中,至少有一个窗口中显示有两个以上的可视单元。
- 一种多窗口系统下切换显示对象的装置,其特征在于,包括:坐标值获得单元,用于获得输入事件中包含的点击点的坐标值;判断单元,用于判断包含坐标值获得单元获得的坐标值的可点击区域对应的显示对象是否为顶端显示对象;界面刷新单元,用于在判断单元得到的判断结果为否时,将所述显示对象设置为顶端显示对象,并刷新显示界面。
- 如权利要求9所述的装置,其特征在于,界面刷新单元,用于:将所述显示对象的Z序的值更新为大于所述多窗口系统中其他显示对象的Z序的值。
- 如权利要求9所述的装置,其特征在于,所述装置还包括:属性信息更新单元,用于在判断单元判断包含所述坐标值的可点击区域对应的显示对象是否为顶端显示对象前,更新输入列表中的可点击区域TouchableRegion;则判断单元,用于通过遍历所述输入列表中的TouchableRegion,确定包含所述坐标值的TouchableRegion;判断包含所述坐标值的TouchableRegion对应的显示对象是否为顶端显示对象。
- 如权利要求11所述的装置,其特征在于,属性信息更新单元,用于:在确定所述多窗口系统中的显示对象的TouchableRegion发生变化后,根据发生变化的TouchableRegion,更新输入列表中的TouchableRegion。
- 如权利要求9~12任一权项所述的装置,其特征在于,所述装置还包括:发送单元,用于将所述输入事件发送给所述显示对象的显示单元。
- 如权利要求9~12任一权项所述的装置,其特征在于,所述显示对象为窗口或者窗口中的可视单元。
- 如权利要求14所述的装置,其特征在于,所述显示对象为窗口;所述装置还包括:执行保存单元,用于在坐标值获得单元获得输入事件中包含的点击点的坐标值之前,针对已启动的应用,将该应用的各显示单元保存在该应用对应的容器中;其中,至少有两个已启动的应用,不同的应用对应的容器不同;显示单元,用于根据设置的该应用的窗口属性和该应用对应的容器中保存的各显示单元,显示该应用的窗口。
- 如权利要求14所述的装置,其特征在于,所述显示对象为窗口中的可视单元;所述装置还包括:执行保存单元,用于在坐标值获得单元获得输入事件中包含的点击点的坐标值之前,针对已启动的各应用,将所述各应用的显示单元保存在至少一个容器中;显示单元,用于根据设置的窗口属性和所述容器中保存的各显示单元,显示多个窗口;其中,至少有一个窗口中显示有两个以上的可视单元。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410812069.4A CN105786301B (zh) | 2014-12-23 | 2014-12-23 | 多窗口系统下切换显示对象的方法及其装置 |
| CN201410812069.4 | 2014-12-23 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016101810A1 true WO2016101810A1 (zh) | 2016-06-30 |
Family
ID=56149235
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2015/097479 Ceased WO2016101810A1 (zh) | 2014-12-23 | 2015-12-15 | 多窗口系统下切换显示对象的方法及其装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN105786301B (zh) |
| WO (1) | WO2016101810A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108279963A (zh) * | 2018-01-05 | 2018-07-13 | 郑州信大捷安信息技术股份有限公司 | 一种单Linux内核多Android系统的智能终端显示虚拟化方法 |
| WO2019091467A1 (zh) * | 2017-11-09 | 2019-05-16 | 北京众纳鑫海网络技术有限公司 | 快捷启动应用程序的方法、装置、设备以及存储介质 |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107765943B (zh) * | 2017-10-16 | 2020-05-12 | 北京点石经纬科技有限公司 | 一种在双屏智能终端上实现双app同时运行的方法 |
| CN109710343B (zh) * | 2017-10-25 | 2023-01-17 | 北京众纳鑫海网络技术有限公司 | 计算机桌面的窗口切换方法、装置、设备以及存储介质 |
| CN107885437A (zh) * | 2017-11-29 | 2018-04-06 | 广州视源电子科技股份有限公司 | 多元素交互方法、装置、设备和存储介质 |
| CN108279826A (zh) * | 2018-03-07 | 2018-07-13 | 北京布卡互动科技有限公司 | 一种多视频和多文档窗口排列布局方法 |
| CN109151582A (zh) * | 2018-08-16 | 2019-01-04 | 海信电子科技(深圳)有限公司 | 基于Linux机顶盒的多应用管理方法、装置及终端 |
| CN113312125B (zh) * | 2021-04-30 | 2022-11-25 | 北京仁光科技有限公司 | 多窗口调整方法、系统、可读存储介质和电子设备 |
| CN114415877B (zh) * | 2022-01-25 | 2024-10-25 | 深圳Tcl新技术有限公司 | 多窗口交互方法、装置、设备和存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101488989A (zh) * | 2008-01-18 | 2009-07-22 | 德信智能手机技术(北京)有限公司 | 一种在手机上管理任务的方法 |
| CN102063302A (zh) * | 2010-12-20 | 2011-05-18 | 北京握奇数据系统有限公司 | 窗口管理方法、系统及终端 |
| CN102214060A (zh) * | 2010-04-12 | 2011-10-12 | 宏碁股份有限公司 | 触控式电子装置及其窗口操控方法 |
| CN103309555A (zh) * | 2012-10-31 | 2013-09-18 | 中兴通讯股份有限公司 | 基于多窗口的焦点切换的方法及装置 |
| CN104077016A (zh) * | 2013-03-29 | 2014-10-01 | 中兴通讯股份有限公司 | 一种多窗口显示和切换方法及装置 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013131190A (ja) * | 2011-12-22 | 2013-07-04 | Aisin Aw Co Ltd | 入力システム、入力方法、及び入力プログラム |
| CN102917118A (zh) * | 2012-09-13 | 2013-02-06 | 东莞宇龙通信科技有限公司 | 终端和任务显示方法 |
| WO2014157908A1 (en) * | 2013-03-27 | 2014-10-02 | Samsung Electronics Co., Ltd. | Device and method for displaying execution result of application |
| TWI496069B (zh) * | 2013-06-28 | 2015-08-11 | Insyde Software Corp | Method of Judging Electronic Device and Multi - window Touch Command |
-
2014
- 2014-12-23 CN CN201410812069.4A patent/CN105786301B/zh active Active
-
2015
- 2015-12-15 WO PCT/CN2015/097479 patent/WO2016101810A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101488989A (zh) * | 2008-01-18 | 2009-07-22 | 德信智能手机技术(北京)有限公司 | 一种在手机上管理任务的方法 |
| CN102214060A (zh) * | 2010-04-12 | 2011-10-12 | 宏碁股份有限公司 | 触控式电子装置及其窗口操控方法 |
| CN102063302A (zh) * | 2010-12-20 | 2011-05-18 | 北京握奇数据系统有限公司 | 窗口管理方法、系统及终端 |
| CN103309555A (zh) * | 2012-10-31 | 2013-09-18 | 中兴通讯股份有限公司 | 基于多窗口的焦点切换的方法及装置 |
| CN104077016A (zh) * | 2013-03-29 | 2014-10-01 | 中兴通讯股份有限公司 | 一种多窗口显示和切换方法及装置 |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019091467A1 (zh) * | 2017-11-09 | 2019-05-16 | 北京众纳鑫海网络技术有限公司 | 快捷启动应用程序的方法、装置、设备以及存储介质 |
| CN108279963A (zh) * | 2018-01-05 | 2018-07-13 | 郑州信大捷安信息技术股份有限公司 | 一种单Linux内核多Android系统的智能终端显示虚拟化方法 |
| CN108279963B (zh) * | 2018-01-05 | 2020-11-20 | 郑州信大捷安信息技术股份有限公司 | 一种单Linux内核多Android系统的智能终端显示虚拟化方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105786301B (zh) | 2020-03-10 |
| CN105786301A (zh) | 2016-07-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105786301B (zh) | 多窗口系统下切换显示对象的方法及其装置 | |
| US11164280B2 (en) | Graphics layer processing in a multiple operating systems framework | |
| US9912724B2 (en) | Moving objects of a remote desktop in unstable network environments | |
| WO2016095728A1 (zh) | 一种多窗口显示方法及装置 | |
| WO2020052496A1 (zh) | 应用性能管理的展示方法及装置 | |
| US11556235B2 (en) | Interacting with nonconforming applications in a windowing environment | |
| US12508503B2 (en) | Rendering processing method and electronic device | |
| CN107077347B (zh) | 视图管理架构 | |
| CN111767002B (zh) | 页面展示方法、装置、设备及存储介质 | |
| US20160378272A1 (en) | Systems and methods for providing multi-focus to applications for collaboration | |
| WO2016101816A1 (zh) | 一种即时通讯中的信息显示方法及装置 | |
| US11024257B2 (en) | Android platform based display device and image display method thereof | |
| WO2022242628A1 (zh) | 投屏方法、装置、设备及存储介质 | |
| WO2021068405A1 (zh) | 元素传递方法、装置、设备及存储介质 | |
| CN112462991A (zh) | 智能交互平板的控制方法、存储介质及相关设备 | |
| CN114510159B (zh) | 书写轨迹显示方法、装置及存储介质 | |
| CN106899489A (zh) | 一种信息处理方法及装置 | |
| CN107092410A (zh) | 一种触摸屏的界面交互方法、设备以及智能终端设备 | |
| WO2019001373A1 (zh) | 一种对手势命令的处理方法和装置 | |
| US9483171B1 (en) | Low latency touch input rendering | |
| CN115550735B (zh) | 一种显示设备和媒资更新方法 | |
| CN113093961B (zh) | 窗口切换方法、存储介质及相关设备 | |
| HK1226172B (zh) | 多窗口系统下切换显示对象的方法及其装置 | |
| HK1226172A1 (zh) | 多窗口系统下切换显示对象的方法及其装置 | |
| CN113873294A (zh) | 视频处理方法、装置、计算机存储介质及电子设备 |
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 |