Desktop window display method, device, terminal and storage medium
By obtaining and sorting logical canvases in Linux POS devices, the problem that Linux POS devices cannot support desktop management and dynamic switching of views is solved, and the management and dynamic switching of desktop views are realized to meet the interface application requirements.
Patent Information
- Application Number
- CN202211424559.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2042-11-15
AI Technical Summary
Linux POS devices cannot support desktop management and dynamic view switching functions, making it difficult to meet interface application requirements.
By obtaining the logical canvases associated with multiple applications, based on the set display layer hierarchy list, the logical canvases are mounted to the corresponding target display layer, sorted based on the hierarchical order, and the canvas synthesis instructions are sent to the server for synthetic display.
It realizes desktop view management and dynamic switching of Linux POS devices to meet interface application requirements.
Smart Images

Figure CN115756690B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of computer display control, and particularly relates to a desktop window display method and device, a terminal and a storage medium. BACKGROUND
[0002] With the increasing popularity of Android smart phones, people have higher and higher experience in using terminals, which is not only reflected in Android products, but also gradually increases the intelligent design of other Linux, RTOS (Real Time Operating System) products, which is reflected in beautiful UI (User Interface), convenient human-computer interaction, interconnection between devices, etc.
[0003] POS (point of sale) is usually based on a widely recognized open source operating system when selecting an operating system, such as Linux for traditional POS and Android for smart POS. In the domestic payment terminal market, Android POS dominates, but Linux POS still accounts for a large proportion in the overseas payment market.
[0004] Linux POS belongs to an embedded device and cannot run an open source X86 architecture desktop system. The existing open source GUI (Graphical User Interface) framework of Linux also does not support the intelligent desktop management and multi-application view dynamic switching function in the Android system, and it is difficult to support the interface application requirements under the desktop management and view dynamic switching. SUMMARY
[0005] The embodiments of the present application provide a desktop window display method, device, terminal and storage medium, to solve the problem that the existing Linux-based smart terminal is difficult to support the interface application requirements under the desktop management and view dynamic switching.
[0006] The first aspect of the embodiments of the present application provides a desktop window display method, comprising:
[0007] Obtaining a plurality of application programs associated with a logical canvas, the logical canvas having a to-be-displayed view corresponding to the application program laid out therein;
[0008] Based on a set display layer hierarchy list, the logical canvas is mounted into a corresponding target display layer respectively;
[0009] Based on the hierarchy order of the target display layer having the logical canvas mounted therein in the display layer hierarchy list, the logical canvas is hierarchically sorted to obtain a view sequence.
[0010] A canvas synthesis instruction is sent to the server, where the canvas synthesis instruction instructs the server to synthesize and display the logical canvas based on the view sequence.
[0011] A second aspect of an embodiment of the present application provides a desktop window display device, comprising:
[0012] An acquisition module, configured to acquire a logical canvas associated with a plurality of applications, wherein the logical canvas is provided with views to be displayed corresponding to the applications;
[0013] A first processing module is configured to mount the logical canvas to a corresponding target display layer based on a set display layer hierarchy list;
[0014] A second processing module is configured to hierarchically sort the logical canvas based on the hierarchical order of the target display layer on which the logical canvas is mounted in the display layer hierarchy list to obtain a view sequence;
[0015] The instruction output module is configured to send a canvas synthesis instruction to the server, wherein the canvas synthesis instruction instructs the server to synthesize and display the logical canvas based on the view sequence.
[0016] A third aspect of an embodiment of the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.
[0017] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0018] A fifth aspect of the present application provides a computer program product, which, when executed on a terminal, enables the terminal to execute the steps of the method described in the first aspect.
[0019] As can be seen from the above, in an embodiment of the present application, by obtaining logical canvases associated with multiple applications and arranged with views to be displayed corresponding to the applications, the logical canvases are respectively mounted to the corresponding target display layers based on the set display layer hierarchy list, and the logical canvases are hierarchically sorted based on the hierarchical order of the target display layers on which the logical canvases are mounted in the display layer hierarchy list to obtain a view sequence, and a canvas synthesis instruction is sent to the server to instruct the server to synthesize and display the logical canvas based on the view sequence. This process can determine the display order of different display layers and finally synthesize the display based on the hierarchical order of the display layers in the display layer hierarchy list and the logical canvases on which the views to be displayed are corresponding to different applications, so as to realize display management and dynamic switching of desktop views based on different applications and meet interface application requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 This is a process of a desktop window display method provided by an embodiment of the present application Figure 1 ;
[0022] Figure 2 This is a schematic diagram of generating a window list provided in an embodiment of the present application;
[0023] Figure 3 This is a schematic diagram of icon display provided by an embodiment of the present application;
[0024] Figure 4 This is a schematic diagram of the navigation bar display provided in an embodiment of the present application;
[0025] Figure 5 This is a schematic diagram of power management display provided by an embodiment of the present application;
[0026] Figure 6 This is a process of a desktop window display method provided by an embodiment of the present application Figure 2 ;
[0027] Figure 7 This is a structural diagram of a desktop window display device provided by an embodiment of the present application;
[0028] Figure 8 This is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0030] It will be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0031] It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0032] It should be further understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0033] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0034] In specific implementations, the terminals described in the embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).
[0035] In the following discussion, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and / or joystick.
[0036] The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a phone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital video camera application, a web browsing application, a digital music player application, and / or a digital video player application.
[0037] Various applications that can be executed on the terminal can use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within a corresponding application. In this way, the common physical architecture of the terminal (e.g., the touch-sensitive surface) can support a variety of applications with user interfaces that are intuitive and transparent to the user.
[0038] It should be understood that the size of the serial numbers of each step in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of this application.
[0039] In order to illustrate the technical solution described in this application, specific embodiments are provided below.
[0040] See also Figure 1 , Figure 1 This is a process of a desktop window display method provided by an embodiment of the present application Figure 1 .like Figure 1 As shown, a desktop window display method includes the following steps:
[0041] Step 101: Acquire a plurality of logic canvases associated with the application program.
[0042] The logic canvas is arranged with views to be displayed corresponding to the application.
[0043] The logical canvas is specifically a logical virtual canvas. Different logical canvases can be used to arrange application views that need to be displayed. Such views include application icons, display interfaces, virtual touch buttons, etc.
[0044] By means of the association relationship between the logical canvas and the application, views to be displayed corresponding to different applications are laid out on the logical canvas, so that view integration is performed based on the logical canvas in subsequent processing.
[0045] In one embodiment, obtaining a logical canvas associated with multiple applications includes:
[0046] Monitor the application's installation directory;
[0047] When a structural change of the installation directory is detected, based on the addition and deletion of the first application corresponding to the structural change, the first logical canvas associated with the first application is updated, and the icon of the target application is added to or removed from the updated first logical canvas.
[0048] This process monitors the installation directory structure changes corresponding to the installation or uninstallation of the application program, so as to add or delete the application program icon in the corresponding logical canvas.
[0049] In an optional embodiment, the updating of the first logic canvas associated with the first application based on the addition and deletion of the first application corresponding to the structural change includes:
[0050] If the addition or deletion process of the target application corresponding to the structural change is a creation process operation of the target application, determining a display icon corresponding to the target application;
[0051] assigning icon display coordinates to the display icon;
[0052] The display icon is added in the first logical canvas associated with the target application according to the icon display coordinates.
[0053] In the specific implementation process, this process involves front-end desktop display design.
[0054] Linux desktop management systems need to support multi-application display. To avoid conflicts in the use of Linux video memory frame buffers, in the embodiments of this application, each application draws its own view to be displayed, which is then integrated and displayed by a component. A GUI framework with a client-server structure meets this requirement. The client is responsible for adjusting and drawing its own view, which is then rendered and synthesized by the server for display.
[0055] In the embodiment of the present application, in the specific implementation process, the GUI framework that can be based on the Linux open source C / S structure includes Wayland, etc. Wayland removes some unnecessary middle layers and is better adapted to mobile devices.
[0056] Wayland is a communication protocol between a display server (Wayland compositor) and a client, and Weston is the reference implementation of the Wayland compositor.
[0057] Desktop is a special client of weston. When implementing it, you can use the following system layers.
[0058] Among them, the Lock layer can be used mainly for lock screen display, the FullScreen Layer is the layer displayed after the application is full screen, the Panel layer is the title bar display layer, the Workspace layer is the layer displayed by ordinary applications, the Bottom ui layer is the App icon display layer, and the Background layer is the background image display layer.
[0059] In the embodiment of the present application, based on the above default system layer, three layers are further expanded on this basis, namely, the task_manager layer is a layer for displaying the running application queue, the navigation layer is a layer for displaying the system navigation button, and the power_off_ui layer is a layer for displaying the power shutdown interface.
[0060] Desktop can be divided into four main modules according to its functions: application management, task management, system navigation, and power management.
[0061] Among them, in the application management module, in order to realize application management, combined with Figure 3 As shown, it mainly provides an interactive interface for displaying currently installed applications. Specifically, it can display icons corresponding to applications through layers, associate callback functions with icons, and control the startup and exit of applications through icons.
[0062] In the above process, Desktop extends weston_desktop's Wayland protocol based on application management capabilities. During Desktop startup and initialization, a new Set_app(output, surface) protocol request is added to allocate a logical canvas and bind it to the Bottom UI layer. This allows applications to be displayed within layers. Because there are multiple layers, applications must be bound to the layers to determine which layer to display on and ensure proper display. Set_app primarily allocates a logical canvas and initializes the layer on which it is displayed.
[0063] An application package mainly contains: App info file, application executable file, and icon. App info file is used to record the name and path of the executable file and icon.
[0064] Desktop uses the inotify mechanism (a mechanism used by the Linux kernel to notify user space file system changes) to monitor the App installation directory. Once the App installation directory structure changes, that is, an application is installed or uninstalled, Desktop will receive an event notification and perform corresponding actions based on the event type.
[0065] The event is, for example:
[0066] CREATE event: Creates an App object based on the App info file, records the names of the executable file and icon file, allocates icon display coordinates, binds the touch screen callback function, draws the icon on the previously allocated logical canvas based on the icon display coordinates, and notifies the server to re-synthesize the display.
[0067] DELETE event: According to the name parameter of the event, find the corresponding App object to delete and redraw the logical canvas.
[0068] When the arranged icon is finally clicked in the future, weston sends the touch screen event to the desktop. The desktop finds the corresponding App object based on the icon display coordinate parameters of the touch screen event, calls the touch screen callback bound in the early stage, and starts the App.
[0069] That is, in the above process, the client sends a request to the display server, requesting the allocation of a logical canvas. The display server allocates a logical canvas and binds the bottom UI layer. The client monitors the App installation directory through the inotify mechanism of the operating system. If the App installation directory structure is detected to have changed, the operating system notifies the client. The client finds the corresponding icon based on the newly added installation file directory and draws it on the canvas. After the client finishes drawing, it notifies the display server, and the display server synthesizes the icons layer by layer and displays the synthesis results on the display screen.
[0070] In another optional embodiment, obtaining a plurality of logic canvases associated with the application includes:
[0071] Creating a task object corresponding to each running second application program, and allocating a shared buff to each task object;
[0072] Obtaining a currently displayed screen frame of each of the second applications;
[0073] The currently displayed picture frame is filled into the corresponding shared buff to obtain a second logical canvas including the shared buff.
[0074] The task objects are, for example, various window views, such as a login window, a main interface display window, a dialog window, and the like.
[0075] When there are multiple running second applications, each running second application corresponds to its own task object, and a shared buff needs to be allocated to each task object; all shared buffs correspond to the same logical canvas.
[0076] Each shared buff is used to fill the current display screen frame of the corresponding second application program, and all shared buffs are included in the same logical canvas.
[0077] The shared buff is a view frame buffer coexisting in the same logical canvas, so that the current display screen frames corresponding to the running second applications can be arranged in the same canvas through multiple shared buffs.
[0078] The above process corresponds to the task management module function of Desktop. In the task management module, it is mainly used to visualize the running applications, switch applications, and terminate applications.
[0079] In the above process, Desktop adds a new Wayland protocol interface based on the application management function. The newly added Wayland protocol interface specifically includes the following contents:
[0080] set_task_manager_surface is used to allocate a logical canvas and bind it to task_managerlayer. This canvas is used to display the window views of each application.
[0081] task_startup, weston is used to notify the desktop that the application has started. After receiving the event, the desktop will create a task object and assign a logical canvas and a buff shared by weston to each task object. The buff is subsequently used to fill the current display frame of the application.
[0082] task_exit, weston is used to notify the desktop that the application has terminated. After receiving the event, the desktop will release the allocated resources.
[0083] get_task_surface_content, obtains the current display frame of each application and fills it into the shared buff allocated in the early stage.
[0084] show_task_views links the task_manager layer to the compositor list to visualize the running applications.
[0085] hide_task_views, remove the task_manager layer from the compositor list.
[0086] task_views_move, multiple application views start an interactive interface movement, and when used with active_task, the application switching function can be realized.
[0087] Among them, each task object corresponds to a view window, but one screen cannot accommodate the windows corresponding to all task objects, so the task object view needs to be moved. task_views_move is used to realize the movement of the interactive interface. The mobile task object view is used to select the task object. Clicking the task object window will trigger the corresponding event, and active_task will be called to send a request to weston. After receiving the request, weston will find the corresponding application according to the pid (process identifier) parameter carried by the request, and restore the application to the foreground display to realize the application switching function.
[0088] active_task, restores the application of the corresponding pid to display and allows interaction.
[0089] In general, when the user clicks the menu button for the first time, an event callback is triggered. The desktop calls get_task_surface_content to obtain the current display frame of each application. It then redraws the logical canvas based on the frame data. Finally, it notifies weston to display the multi-application view through show_task_views.
[0090] When the user drags a multi-application view, task_views_move is triggered, and the multi-application view begins an interactive interface movement. Weston will successively receive touch motion events reported by the driver and adjust the coordinates of each application view according to the event coordinates, thus achieving the drag effect. When the drag ends and the view is lifted, weston will receive a touch up event reported by the driver. At this time, a timer will be started. According to the source and destination coordinates, the coordinates are adjusted at regular intervals until each view stops after the destination coordinates, thus achieving the sliding effect.
[0091] When you directly click on an application window view, the desktop event callback will be triggered, active_task will be called, and the application will be restored to display.
[0092] When you click the menu button again, hide_task_views will be triggered, the multi-application view will be canceled, and the user will return to the desktop.
[0093] Furthermore, in yet another different embodiment, obtaining a plurality of logic canvases associated with the application programs includes:
[0094] Determining function icons corresponding to respective function keys in a third application, where the function keys include a navigation function key or a power key;
[0095] The function icon is drawn in a logic canvas corresponding to the third application program to obtain a third logic canvas.
[0096] Among them, the above processing steps can correspond to the system navigation function in the specific application process.
[0097] Among them, combined Figure 4 As shown, you can set up a system navigation bar in the user interface, which mainly consists of three buttons: the Back button, the Home button, and the Menu button. The Back button is mainly used to return to the previous operation of the application, and the application needs to respond to this key value; the Home button is used to hide the application display and return to the main interface; the Menu button is used to display applications running in the background.
[0098] In the above process, Desktop extends the wayland protocol of weston_desktop based on the system navigation function and adds a new navigation protocol interface. The new navigation protocol interface includes the following content:
[0099] set_navigation_bar allocates a logical canvas and binds it to the navigation layer. This canvas is used to draw the back button, home button, and menu button. These three navigation buttons are bound to corresponding touch event callbacks.
[0100] Key_home sends a request to weston. This interface is the event callback of the HOME key. After receiving this request, Weston will remove all application views from the workspace layer. Finally, when weston synthesizes, all application views will not be displayed.
[0101] Key_cancel is the event callback for the return key. When the return key is clicked, the corresponding event callback is triggered and a request is sent to weston. After receiving the request, weston finds the corresponding view window and sends the Key_cancel key event to the application client corresponding to the window.
[0102] Specifically, during the implementation of the above function, the key is on the desktop, and the key event will first be passed from weston to the desktop. The desktop then sends a Key_cancel request to weston. After receiving the request, weston searches for the corresponding application currently running in the foreground, passes it to the application currently running in the foreground, and sends the key event to this application.
[0103] The above processing steps may correspond to a power management function in another specific application process. Figure 5 As shown, power management mainly provides an interactive interface for controlling machine shutdown and restart, etc.
[0104] In the above process, Desktop extends the wayland protocol of weston_desktop based on the power management function and adds a new power management interface. The new navigation protocol interface includes the following content:
[0105] set_poweroff_ui allocates a logical canvas and binds it to the poweroff ui layer. This canvas is used to draw the shutdown, restart, and return icons, each of which is bound to its own event callback.
[0106] active_poweroff_ui, links the poweroff ui layer to the compositor list and displays the power management interactive interface.
[0107] deactive_poweroff_ui, remove the poweroff ui layer from the compositor list.
[0108] When you long-press the power button, the desktop detects the driver's reported event and calls active_poweroff_ui to display the power management interface. Clicking the shutdown icon triggers a shutdown event callback, and the desktop directly calls reboot(RB_POWER_OFF) to shut down the system. Clicking the restart icon causes the desktop to call reboot(RB_AUTOBOOT) to reboot the system. Clicking the return icon calls deactive_poweroff_ui to hide the power management interface.
[0109] In the above process, the communication protocol between the GUI server and the client is based on the mature Wayland protocol, with added multi-application switching, system navigation key interaction and power management protocols. The widely used and mature GUI Server Weston is selected to implement Android Desktop-like and multi-application dynamic switching functions.
[0110] Step 102 : Based on the set display layer hierarchy list, the logic canvas is mounted to the corresponding target display layer.
[0111] The order of the target display layers of the logical canvas in the display layer hierarchy list is positively correlated with the display priority of the to-be-displayed view corresponding to the application program laid out in the logical canvas.
[0112] Mounting refers to connecting a directory in a device file to a directory under the Linux root directory. Accessing this directory is equivalent to accessing the device file. In this step, the logical canvas is mounted to the corresponding target display layer. Specifically, the logical canvas directory is connected to the target display layer directory under the Linux root directory. Accessing the target display layer is equivalent to accessing the logical canvas.
[0113] From the perspective of the internal system, Weston is mainly divided into several modules: window management (shell), compositor and input management.
[0114] From the general process, the input management module transmits the input event to the window at the top of the window stack or the client (APP) corresponding to the currently running window. After receiving it, the client will take corresponding actions, such as adjusting the view position and redrawing. Figure 2 As shown, if redrawing occurs, the new view content buffer in each Layer ( Figure 2 After the rendering of the multiple views contained in Layer 1-3 on the left is completed, the client sends the new content buffer to the server, which then generates a window list ( Figure 2 The server then composites the canvases corresponding to the windows and outputs them to the framebuffer (frame buffer). The logical canvases of each layer are drawn into the video memory.
[0115] The display layers included in the display layer hierarchy list include, for example, from top to bottom:
[0116] Fade Layer (fading layer, fading, gradually disappearing); Lock layer (lock layer, used to display lock screen wallpaper, etc.); Cursor layer (cursor layer, used to display the mouse); Input panel layer (input panel layer, used to display the system keyboard); FullScreen layer (full screen layer); Panel layer (used to display the title bar); Workspace layer (workspace layer, used to display applications); Background layer (background layer, used to display the desktop background).
[0117] Step 103 : Based on the hierarchical order of the target display layer on which the logical canvas is mounted in the display layer hierarchy list, the logical canvas is hierarchically sorted to obtain a view sequence.
[0118] Step 104: Send a canvas synthesis instruction to the server.
[0119] The canvas synthesis instruction instructs the server to synthesize and display the logical canvas based on the view sequence.
[0120] All of these layers are linked into the compositor layer list. Each time a composite is created, the views of the layers in the compositor layer list are first merged into a single view list. This allows the compositor to access only this view list during the view composition process.
[0121] In this process, the front-end desktop determines the content of the logical canvas and finally notifies the server to render and synthesize the logical canvas for display.
[0122] In an embodiment of the present application, by obtaining logical canvases associated with multiple applications and arranged with views to be displayed corresponding to the applications, the logical canvases are respectively mounted to the corresponding target display layers based on the set display layer hierarchy list, and the logical canvases are hierarchically sorted based on the hierarchical order of the target display layers on which the logical canvases are mounted in the display layer hierarchy list to obtain a view sequence, and a canvas synthesis instruction is sent to the server to instruct the server to synthesize and display the logical canvas based on the view sequence. This process can determine the display order of different display layers and finally synthesize the display based on the hierarchical order of the display layers in the display layer hierarchy list and the logical canvases on which the views to be displayed are corresponding to different applications, so as to realize display management and dynamic switching of desktop views based on different applications and meet interface application requirements.
[0123] The embodiments of the present application also provide different implementations of the desktop window display method.
[0124] See also Figure 6 , Figure 6 This is a process of a desktop window display method provided by an embodiment of the present application Figure 2 .like Figure 6 As shown, a desktop window display method includes the following steps:
[0125] Step 601: Acquire a plurality of logic canvases associated with the application programs.
[0126] The logic canvas is arranged with views to be displayed corresponding to the application;
[0127] The implementation process of this step is the same as the implementation process of step 101 in the aforementioned embodiment, and will not be repeated here.
[0128] Step 602: Based on the set display layer hierarchy list, the logical canvas is mounted to the corresponding target display layer respectively;
[0129] The implementation process of this step is the same as the implementation process of step 102 in the aforementioned embodiment, and will not be repeated here.
[0130] Step 603 , based on the hierarchical order of the target display layer on which the logical canvas is mounted in the display layer hierarchy list, hierarchically sort the logical canvas to obtain a view sequence;
[0131] The implementation process of this step is the same as the implementation process of step 103 in the aforementioned embodiment, and will not be repeated here.
[0132] Step 604: Send a canvas synthesis instruction to the server.
[0133] The canvas synthesis instruction instructs the server to synthesize and display the logical canvas based on the view sequence.
[0134] The implementation process of this step is the same as the implementation process of step 104 in the aforementioned embodiment, and will not be repeated here.
[0135] Optionally, the view to be displayed laid out in the logic canvas is associated with a touch callback function; correspondingly, the method further includes:
[0136] Step 605: If a touch event is detected, based on the view to be displayed arranged in the target logic canvas at the top level in the hierarchical sorting, determine the target view to be displayed that matches the touch event position and the target application corresponding to the target view to be displayed.
[0137] Step 606: Execute the touch callback function on the target application.
[0138] The touch callback function includes:
[0139] A callback function for power on or off control; or a callback function for navigation control of view return, main interface display, or menu display; or a callback function for display control of a running application.
[0140] In an embodiment of the present application, by obtaining logical canvases associated with multiple applications and arranged with views to be displayed corresponding to the applications, the logical canvases are respectively mounted to the corresponding target display layers based on the set display layer hierarchy list, and the logical canvases are hierarchically sorted based on the hierarchical order of the target display layers on which the logical canvases are mounted in the display layer hierarchy list to obtain a view sequence, and a canvas synthesis instruction is sent to the server to instruct the server to synthesize and display the logical canvas based on the view sequence. This process can determine the display order and finally synthesize different display layers based on the hierarchical order of the display layers in the display layer hierarchy list and the logical canvases on which the views to be displayed are arranged, so as to realize display management and dynamic switching of desktop views based on different applications, and further, based on the display views in the synthesized display interface, execute the touch callback function corresponding to the target application in response to a touch event to meet the interface display and control requirements.
[0141] See also Figure 7 , Figure 7 This is a structural diagram of a desktop window display device provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0142] The desktop window display device 700 includes:
[0143] An acquisition module 701 is configured to acquire a logical canvas associated with a plurality of applications, wherein the logical canvas contains views to be displayed corresponding to the applications;
[0144] The first processing module 702 is configured to mount the logical canvas to the corresponding target display layer based on a set display layer hierarchy list;
[0145] The second processing module 707 is configured to hierarchically sort the logical canvas based on the hierarchical order of the target display layer on which the logical canvas is mounted in the display layer hierarchy list to obtain a view sequence;
[0146] The instruction output module 704 is configured to send a canvas synthesis instruction to a server, where the canvas synthesis instruction instructs the server to synthesize and display the logical canvas based on the view sequence.
[0147] The obtaining module 701 is configured to:
[0148] monitor the installation directory of the application program;
[0149] In a case where a structural change occurs in the installation directory, based on an addition and deletion process of a first application program corresponding to the structural change, a first logical canvas associated with the first application program is updated, and the updated first logical canvas has an icon of the target application program added or the icon of the target application program removed.
[0150] The obtaining module 701 is more specifically configured to:
[0151] If the addition and deletion process of the target application program corresponding to the structural change is a creation process of the target application program, a display icon corresponding to the target application program is determined.
[0152] The display icon is assigned an icon display coordinate.
[0153] The display icon is added to the first logical canvas associated with the target application program according to the icon display coordinate.
[0154] The obtaining module 701 is configured to:
[0155] A task object corresponding to each running second application program is created, and each task object is assigned a shared buff.
[0156] A current display frame of each second application program is obtained.
[0157] The current display frame is filled into the corresponding shared buff, and a second logical canvas containing the shared buff is obtained.
[0158] The obtaining module 701 is configured to:
[0159] A function icon corresponding to each function key of a third application program is determined, where the function key includes a navigation function key or a power key.
[0160] The function icon is drawn in a logical canvas corresponding to the third application program, and a third logical canvas is obtained.
[0161] The to-be-displayed view arranged in the logical canvas is associated with a touch callback function, and the apparatus further comprises:
[0162] a touch response module configured to, upon detecting a touch event, determine, based on the view to be displayed that is laid out in the target logic canvas at the top level in the hierarchical order, a target view to be displayed that matches the position of the touch event and a target application corresponding to the target view to be displayed;
[0163] The touch callback function is executed on the target application.
[0164] The touch callback function includes:
[0165] A callback function for power on or off control; or,
[0166] The callback function for navigation control used for view return, main interface display or menu display; or,
[0167] Callback function for display control of the running application.
[0168] The desktop window display device provided in the embodiment of the present application can implement each process of the embodiment of the above-mentioned desktop window display method and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0169] Figure 8 This is a structural diagram of a terminal provided by an embodiment of the present application. As shown in the figure, the terminal 8 of this embodiment includes: at least one processor 80 ( Figure 8 Only one is shown), a memory 81 and a computer program 82 stored in the memory 81 and executable on the at least one processor 80, wherein the processor 80 implements the steps of any of the above-mentioned method embodiments when executing the computer program 82.
[0170] The terminal 8 can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 8 can include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will understand that Figure 8 It is only an example of terminal 8 and does not constitute a limitation on terminal 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0171] The processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0172] The memory 81 may be an internal storage unit of the terminal 8, such as a hard disk or memory of the terminal 8. The memory 81 may also be an external storage device of the terminal 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc. equipped on the terminal 8. Furthermore, the memory 81 may include both an internal storage unit of the terminal 8 and an external storage device. The memory 81 is used to store the computer program and other programs and data required by the terminal. The memory 81 may also be used to temporarily store data that has been output or is about to be output.
[0173] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0174] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0175] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0176] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / terminal and method can be implemented in other ways. For example, the apparatus / terminal embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or in other forms.
[0177] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place, or distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0178] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0179] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0180] The present application implements all or part of the processes in the above-mentioned embodiment method, and can also be implemented through a computer program product. When the computer program product runs on a terminal, the terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0181] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A desktop window display method, characterized in that: include: Acquire a logic canvas associated with a plurality of applications, wherein the logic canvas is provided with views to be displayed corresponding to the applications, and the views to be displayed are associated with a touch callback function; Based on the set display layer hierarchy list, the logical canvas is mounted to the corresponding target display layer respectively; Based on the hierarchical order of the target display layer on which the logical canvas is mounted in the display layer hierarchy list, the logical canvas is hierarchically sorted to obtain a view sequence; Sending a canvas synthesis instruction to the server, wherein the canvas synthesis instruction instructs the server to synthesize and display the logical canvas based on the view sequence; If a touch event is detected, determining a target view to be displayed that matches the position of the touch event and a target application corresponding to the target view to be displayed based on the view to be displayed laid out in the target logical canvas at the top level in the hierarchical order; The touch callback function is executed on the target application.
2. The method according to claim 1, characterized in that The step of obtaining the logical canvas associated with multiple applications includes: Monitor the application's installation directory; When a structural change of the installation directory is detected, based on the addition and deletion of the first application corresponding to the structural change, the first logical canvas associated with the first application is updated, and the icon of the first application is added to or removed from the updated first logical canvas.
3. The method according to claim 2, characterized in that The updating of the first logic canvas associated with the first application based on the addition and deletion processing of the first application corresponding to the structural change includes: If the addition or deletion process of the target application corresponding to the structural change is a creation process operation of the target application, determining a display icon corresponding to the target application; assigning icon display coordinates to the display icon; The display icon is added in the first logical canvas associated with the target application according to the icon display coordinates.
4. The method according to claim 1, wherein The step of obtaining the logical canvas associated with multiple applications includes: Creating a task object corresponding to each running second application program, and allocating a shared buff to each task object; Obtaining a currently displayed screen frame of each of the second applications; The currently displayed picture frame is filled into the corresponding shared buff to obtain a second logical canvas including the shared buff.
5. The method according to claim 1, wherein The step of obtaining the logical canvas associated with multiple applications includes: Determining function icons corresponding to respective function keys in a third application, where the function keys include a navigation function key or a power key; The function icon is drawn in a logic canvas corresponding to the third application program to obtain a third logic canvas.
6. The method according to claim 1, characterized in that The touch callback function includes: A callback function for power on or off control; or, The callback function for navigation control used for view return, main interface display or menu display; or, Callback function for display control of the running application.
7. A desktop window display device, characterized in that: include: An acquisition module, configured to acquire a logic canvas associated with a plurality of applications, wherein the logic canvas is provided with views to be displayed corresponding to the applications, and the views to be displayed are associated with a touch callback function; A first processing module is configured to mount the logical canvas to a corresponding target display layer based on a set display layer hierarchy list; A second processing module is configured to hierarchically sort the logical canvas based on the hierarchical order of the target display layer on which the logical canvas is mounted in the display layer hierarchy list to obtain a view sequence; An instruction output module, configured to send a canvas synthesis instruction to a server, wherein the canvas synthesis instruction instructs the server to synthesize and display the logical canvas based on the view sequence; A touch response module is used to determine, if a touch event is detected, a target view to be displayed that matches the touch event position and a target application corresponding to the target view to be displayed based on the view to be displayed laid out in the target logic canvas at the top level in the hierarchical sorting, and execute the touch callback function on the target application.
8. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the desktop window display method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the desktop window display method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Graphic processing method, graphic processing device and terminal device
CN103268620A
Graphic display method and device of heterogeneous dual-system
CN107547474A