Window control method and device, storage medium, electronic equipment and vehicle
By detecting and reusing the target control bar in the operating system, the problem of system burden and resource waste in multi-task and multi-window environments is solved, and resource saving and window management efficiency are improved.
Patent Information
- Application Number
- CN202311126762.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2024-08-23
AI Technical Summary
Existing window control technology leads to increased system burden and waste of resources, especially in multi-tasking and multi-window environments, and lacks effective resource management and reuse mechanisms.
A window control method is proposed. By detecting the existence of the target control bar in the current operating system, creating it if it does not exist, and reusing it and moving it to the preset position if it exists, ensuring that each application window has only a unique target control bar. Avoid resource waste and system burden.
It saves system resources and reduces the burden, improves the efficiency of window management and user experience, and optimizes system resource utilization through the creation and reuse of a unique target control bar.
Smart Images

Figure CN118535258A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of window control technology, and in particular to a window control method, device and storage medium, electronic equipment, and vehicle. Background Art
[0002] The window control bar is based on each interface of each task. There are as many control bars as there are interfaces in a task. At the same time, there are also multiple small window tasks in the system. Whether it is a control bar based on the task window or a control bar based on the small window, there are multiple control bars in the system, which seriously increases the system burden. Summary of the invention
[0003] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, one object of the present invention is to provide a window control method, which has the advantages of saving system resources and reducing system burden.
[0004] A second objective of the present invention is to provide a window control device.
[0005] A third object of the present invention is to provide a computer-readable storage medium.
[0006] A fourth objective of the present invention is to provide an electronic device.
[0007] A fifth object of the present invention is to provide a vehicle.
[0008] To achieve the above-mentioned purpose, the first aspect of the embodiment of the present invention proposes a window control method, which includes: after the current application window is started, determining whether there is a target control bar in the current operating system; if not, creating the target control bar at the preset position of the current application window; if it exists, reusing the target control bar and moving the target control bar to the preset position of the current application window.
[0009] According to the window control method of the embodiment of the present invention, a target control bar unique to the current operating system is created, and the waste of system resources is avoided and the system burden is reduced by reusing the created target control bar.
[0010] In addition, the window control method proposed in the above embodiment of the present invention may also have the following additional technical features:
[0011] According to one embodiment of the present invention, determining whether a target control bar exists in the current operating system includes: obtaining a window list, wherein the window list is composed of application windows that are in a startup state in the current operating system; if there is an element in the window list, it is determined that the target control bar does not exist, otherwise, it is determined that the target control bar exists.
[0012] According to one embodiment of the present invention, the types of application windows include large windows and small windows, and the window list includes a large window list and a small window list; wherein, if the current application window is a large window and there is an element in the large window list, it is determined that the target control bar does not exist, otherwise, it is determined that the target control bar exists and the target control bar is a large window control bar; if the current application window is a small window and there is an element in the small window list, it is determined that the target control bar does not exist, otherwise, it is determined that the target control bar exists and the target control bar is a small window control bar.
[0013] According to an embodiment of the present invention, a control is provided in the target control bar, and the method further comprises: monitoring a trigger operation of the control; and controlling the application window and the control bar in the current operating system in response to the trigger operation.
[0014] According to one embodiment of the present invention, when the target control bar is the small window control bar, the control of the application window and control bar in the current operating system includes: if the trigger operation is to close the current window, then the current application window is closed, and the updated small window queue is adjusted, and the target control bar is moved to the preset position of the topmost small window in the adjusted small window queue; if the trigger operation is to close all windows, then all small windows in the current operating system are closed, and the target control bar is hidden.
[0015] According to one embodiment of the present invention, the control of the application window and control bar in the current operating system includes: if the trigger operation is to enlarge the current window, the current application window is changed to a large window, and the updated large window queue and small window queue are adjusted respectively, and the target control bar is moved to the preset position of the topmost small window in the adjusted small window queue, and the large window control bar is moved to the preset position of the topmost large window in the adjusted large window queue; if the trigger operation is to enlarge all windows, all small windows in the current operating system are changed to large windows, and the updated large window queue is adjusted, and the target control bar is hidden, and the large window control bar is moved to the preset position of the topmost large window in the adjusted large window queue.
[0016] According to one embodiment of the present invention, when the target control bar is a large window control bar, the control of the application window and control bar in the current operating system includes: if the trigger operation is to close the current window, then the current application window is closed, and the updated large window queue is adjusted, and the target control bar is moved to the preset position of the topmost large window in the adjusted large window queue; if the trigger operation is to close all windows, then all large windows in the current operating system are closed, and the target control bar is hidden.
[0017] According to one embodiment of the present invention, the control of the application windows and control bar in the current operating system includes: if the trigger operation is to shrink the current window, the current application window is changed to a small window, and the updated large window queue and small window queue are adjusted respectively, and the target control bar is moved to the preset position of the top large window in the adjusted large window queue, and the small window control bar is moved to the preset position of the top large window in the adjusted small window queue; if the trigger operation is to shrink all windows, all large windows in the current operating system are changed to small windows, and the updated small window queue is adjusted, and the target control bar is hidden, and the small window control bar is moved to the preset position of the top small window in the adjusted small window queue.
[0018] According to an embodiment of the present invention, the preset position is the left position of the current application window.
[0019] According to an embodiment of the present invention, the method further includes: when the current application window is a small window and there is an activated small window, moving the boundary of the current application window to the left by a preset unit based on the boundary of the activated small window.
[0020] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present invention proposes a window control device, which includes: a detection module, used to determine whether a target control bar exists in the current operating system after the current application window is started; a control module, used to create the target control bar at a preset position of the current application window if it does not exist; if it exists, reuse the target control bar and move the target control bar to the preset position of the current application window.
[0021] To achieve the above objectives, a third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the window control method provided in the first aspect of the present invention is implemented.
[0022] To achieve the above-mentioned purpose, the fourth aspect of the present invention proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the window control method proposed in the first aspect of the present invention is implemented.
[0023] To achieve the above-mentioned purpose, a fifth embodiment of the present invention provides a vehicle, comprising the electronic device provided by the fourth embodiment of the present invention.
[0024] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a flow chart of a window control method according to an embodiment of the present invention;
[0026] Figure 2 is a flow chart of determining whether a target control bar exists in the current operating system according to an embodiment of the present invention;
[0027] Figure 3 is a flow chart of a window control method according to a specific embodiment of the present invention;
[0028] Figure 4 is a schematic diagram of a large window and a small window in a current operating system according to an embodiment of the present invention;
[0029] Figure 5 is a flow chart of monitoring a touch event of a small window control bar according to an embodiment of the present invention;
[0030] Figure 6 is a flow chart of a window control method according to another specific embodiment of the present invention;
[0031] Figure 7 is a flow chart of monitoring a touch event of a large window control bar according to an embodiment of the present invention;
[0032] Figure 8 is a schematic diagram of a window control device according to an embodiment of the present invention;
[0033] Fig. 9 is a structural block diagram of an electronic device according to an embodiment of the present invention;
[0034] Fig.10 Schematic diagram of a vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0036] The following is attached to the instruction manual Figure 1 - Attachment Fig.10 And specific implementation methods are described in detail for the window control method, device and storage medium, electronic device, and vehicle of the embodiments of the present invention.
[0037] Figure 1 FIG. 1 is a flow chart of a window control method according to an embodiment of the present invention. Figure 1 As shown, the window control method may include:
[0038] S101, after the current application window is started, determining whether there is a target control bar in the current operating system;
[0039] S102, if it does not exist, create a target control bar at a preset position of the current application window;
[0040] S103: If it exists, reuse the target control bar and move the target control bar to a preset position of the current application window.
[0041] In order to avoid wasting system resources and reduce system burden, after starting the current application window, the embodiment of the present invention detects whether there is a target control bar corresponding to the current application window in the current operating system. If there is no corresponding target control bar, the target control bar is created at the preset position of the current application window. If there is a corresponding target control bar, the existing target control bar is reused and moved to the preset position of the current application window.
[0042] It should be noted that when the current application window launched is the first application window in the current operating system, the current operating system does not have a target control bar, and a target control bar needs to be created for the current application window. When the current application window launched is not the first application window in the current operating system, the current operating system has already created a target control bar for the first application window. At this time, the current operating system already has a target control bar, and the current application window reuses the created target control bar.
[0043] The embodiment of the present invention creates a unique target control bar for the current operating system, and configures a control bar for a window by reusing the created target control bar, thereby avoiding waste of system resources and reducing system burden.
[0044] In one embodiment of the present invention, Figure 2 As shown, determine whether the target control bar exists in the current operating system, including:
[0045] S201, obtaining a window list, wherein the window list is composed of application windows in the current operating system that are in the startup state;
[0046] S202: If there is an element in the window list, it is determined that there is no target control bar; otherwise, it is determined that there is a target control bar.
[0047] Specifically, after the current application window is started, the window list is obtained and the number of elements in the window list is detected. It should be noted that the elements in the window list are composed of application windows in the current operating system that are in the started state. Therefore, after the current application window is started, it will also exist in the window list.
[0048] If there is an element in the acquired window list, it means that the element is the launched current application window, that is, before the current application window is launched, there is no launched application window, and the launched current application window is the first application window. Therefore, when there is an element in the window list, it can be determined that the target control bar does not exist in the previous operating system.
[0049] If there are multiple (greater than or equal to two) elements in the window list, it means that in addition to the launched current application window, there are other launched application windows, and the launched current application window is not the first application window. Therefore, when there are multiple elements in the window list, it can be determined that there is a target control bar in the previous operating system.
[0050] In one embodiment of the present invention, Figure 3 As shown, the types of application windows include large windows and small windows, and the window list includes a large window list and a small window list; wherein,
[0051] If the current application window is a large window and there is an element in the large window list, it is determined that there is no target control bar, otherwise, it is determined that there is a target control bar and the target control bar is a large window control bar;
[0052] If the current application window is a small window and there is an element in the small window list, it is determined that there is no target control bar. Otherwise, it is determined that there is a target control bar and the target control bar is a small window control bar.
[0053] In an embodiment of the present invention, the types of application windows include large windows and small windows, wherein the large window is an application interface displayed in full screen on an electronic screen, and the small window is an application interface displayed in a partial area divided from the electronic screen. The corresponding window list includes a large window list and a small window list, and the corresponding target control bar includes a large window control bar and a small window control bar.
[0054] Specifically, if the launched current application window is a large window and there is an element in the large window list, it means that before launching the current application window, there is no launched large window in the current operating system, and the launched current application window is the first large window. It can be determined that there is no large window control bar in the previous operating system, and a large window control bar is created at the preset position of the large window. Otherwise, it is determined that there is a large window control bar, and the existing large window control bar is reused and moved to the preset position of the large window.
[0055] Specifically, if the launched current application window is a small window and there is an element in the small window list, it means that before the current application window is launched, there is no launched small window in the current operating system, and the launched current application window is the first small window. It can be determined that there is no small window control bar in the previous operating system, and a small window control bar is created at the preset position of the small window. Otherwise, it is determined that there is a small window control bar, and the existing small window control bar is reused and moved to the preset position of the small window.
[0056] In one embodiment of the present invention, the preset position is the left position of the current application window.
[0057] As a specific example, create a target control bar at the left position of the current application window. Figure 4 It should be noted that the embodiment of the present invention does not limit the preset position, and the target control bar can also be located at other positions of the current application window.
[0058] In one embodiment of the present invention, a control is provided in the target control bar, and the window control method further includes:
[0059] Monitor the triggering operation of the control;
[0060] In response to the triggering operation, the application window and the control bar in the current operating system are controlled.
[0061] To achieve control over the current application window, the embodiment of the present invention sets a control in the target control bar, monitors the triggering operation of the control, and controls the application window and the control bar in the current operating system in response to the triggering operation.
[0062] In an embodiment of the present invention, the controls in the small window control bar at least include closing the current window, closing all windows, enlarging the current window, and enlarging all windows. The controls in the large window control bar at least include closing the current window, closing all windows, shrinking the current window, and shrinking all windows.
[0063] In one embodiment of the present invention, Figure 5 and Figure 6 As shown, when the target control bar is a small window control bar, controlling the application window and control bar in the current operating system may include:
[0064] If the triggering operation is to close the current window, the current application window is closed, the updated small window queue is adjusted, and the target control bar is moved to the preset position of the topmost small window in the adjusted small window queue;
[0065] If the triggering operation is to close all windows, all small windows in the current operating system will be closed and the target control bar will be hidden.
[0066] Specifically, when the touch operation of the control in the small window control bar is monitored:
[0067] When the monitored trigger operation is to close the current window, close the current application window. Since there may be a small window that has been started in the current operating system after the current application window is closed, therefore, after the current application window is closed, check whether there is a small window that has been started in the current operating system. If there is a small window that has been started, adjust the updated small window queue and move the target control bar to the preset position of the topmost small window in the adjusted small window queue. If there is no small window that has been started, hide the small window control bar.
[0068] When the monitored trigger operation is to close all windows, all small windows in the current operating system are closed and the small window control bar is hidden.
[0069] In one embodiment of the present invention, the preset position is the left position of the current application window.
[0070] As a specific example, create a target control bar at the left position of the current application window. Figure 4 It should be noted that the embodiment of the present invention does not limit the preset position, and the target control bar can also be located at other positions of the current application window.
[0071] In one embodiment of the present invention, Figure 5 and Figure 6 As shown, the application window and control bar in the current operating system are controlled, including:
[0072] If the triggering operation is to enlarge the current window, the current application window is changed to a large window, and the updated large window queue and small window queue are adjusted respectively, and the target control bar is moved to the preset position of the topmost small window in the adjusted small window queue, and the large window control bar is moved to the preset position of the topmost large window in the adjusted large window queue;
[0073] If the triggering operation is to enlarge all windows, all small windows in the current operating system are changed to large windows, the updated large window queue is adjusted, the target control bar is hidden, and the large window control bar is moved to the preset position of the top large window in the adjusted large window queue.
[0074] Specifically, when the trigger operation monitored is to enlarge the current window, the current application window which is a small window is changed to a large window, and the updated large window queue and small window queue are adjusted respectively, and the large window control bar is moved to the preset position of the top large window in the adjusted large window queue.
[0075] It should be noted that before changing the current application window to a large window, if there is only one small window in the current operating system, that is, only the current application window which is a small window, after the current application window is changed to a large window, there is no small window in the current operating system, and there is no need to adjust the small window queue, and the small window control bar needs to be hidden.
[0076] When the detected trigger operation is to enlarge all windows, all small windows in the current operating system are changed to large windows, and the updated large window queue is adjusted, the small window control bar is hidden, and the large window control bar is moved to the preset position of the top large window in the adjusted large window queue.
[0077] It should be noted that before the large window control bar is moved to the preset position of the top large window in the adjusted large window queue, the above method is used to detect whether the large window control bar exists in the current operating system. If the large window control bar does not exist in the current operating system, the large window control bar is created; if the large window control bar exists in the current operating system, the existing large window control bar is reused.
[0078] In one embodiment of the present invention, Figure 6 and Figure 7 As shown, when the target control bar is a large window control bar, the application window and control bar in the current operating system are controlled, including:
[0079] If the triggering operation is to close the current window, the current application window is closed, the updated large window queue is adjusted, and the target control bar is moved to the preset position of the topmost large window in the adjusted large window queue;
[0080] If the triggering operation is to close all windows, all large windows in the current operating system will be closed and the target control bar will be hidden.
[0081] Specifically, when the touch operation of the controls in the large window control bar is monitored:
[0082] When the monitored trigger operation is to close the current window, close the current application window. Since there may be a large window started in the current operating system after closing the current application window, after closing the current application window, check whether there is a large window started in the current operating system. If there is a large window started, adjust the updated large window queue and move the target control bar to the preset position of the top large window in the adjusted large window queue. If there is no large window started, hide the large window control bar.
[0083] When the monitored trigger operation is to close all windows, all large windows in the current operating system are closed and the large window control bar is hidden.
[0084] In one embodiment of the present invention, Figure 6 and Figure 7 As shown, the application window and control bar in the current operating system are controlled, including:
[0085] If the triggering operation is to reduce the current window, the current application window is changed to a small window, and the updated large window queue and small window queue are adjusted respectively, and the target control bar is moved to the preset position of the top large window in the adjusted large window queue, and the small window control bar is moved to the preset position of the top large window in the adjusted small window queue;
[0086] If the triggering operation is to shrink all windows, all large windows in the current operating system are changed to small windows, the updated small window queue is adjusted, the target control bar is hidden, and the small window control bar is moved to the preset position of the topmost small window in the adjusted small window queue.
[0087] When the trigger operation monitored is to reduce the current window, the current application window which is a large window is changed to a small window, and the updated large window queue and small window queue are adjusted respectively, and the small window control bar is moved to the preset position of the top large window in the adjusted small window queue.
[0088] It should be noted that before changing the current application window to a small window, if there is only one large window in the current operating system, that is, only the current application window which is a large window, after the current application window is changed to a small window, there is no large window in the current operating system. Therefore, there is no need to adjust the large window queue, and the large window control bar needs to be hidden.
[0089] When the trigger operation monitored is to shrink all windows, all large windows in the current operating system are changed to small windows, the updated small window queue is adjusted, the large window control bar is hidden, and the small window control bar is moved to the preset position of the topmost small window in the adjusted large window queue.
[0090] It should be noted that before the small window control bar is moved to the preset position of the topmost large window in the adjusted small window queue, the above method is used to detect whether the small window control bar exists in the current operating system. If the small window control bar does not exist in the current operating system, the small window control bar is created; if the small window control bar exists in the current operating system, the existing small window control bar is reused.
[0091] In one embodiment of the present invention, the window control method may further include:
[0092] When the current application window is a small window and there is an activated small window, the boundary of the current application window is moved left by a preset unit based on the boundary of the activated small window.
[0093] Specifically, when multiple small windows are started, in order to avoid small window occlusion, the border of the current application window is moved left by a preset unit based on the border of the topmost small window that has been started, as shown in FIG4 .
[0094] The window control method of the embodiment of the present invention is applicable to operating systems such as Android and Windows.
[0095] The following is an example of developing a control bar based on Task in an Android system to illustrate an embodiment of the present invention:
[0096] In the Android system, generally, when an application window is started, a Task is created, and the Activities in it are all managed by this Task. Task specifies the display area of the Activities it contains, and different Activities in the same Task are displayed in the same area of the Task. In this embodiment, the display area corresponding to this Task is considered to be a window. Therefore, creating a control bar for a Task is to create a control bar for the app display window corresponding to the Task. Operations on the window are also operations on the Task.
[0097] Based on the above, when the application window is launched, it is divided into two modes: large window and small window. The size of the application window can be controlled by the startup parameter Activities Options.m Launch Windowing Mode. Parameter m LaunchWindowing Mode == 1 represents a large window, giving the boundary of the Task large window corresponding to this window; parameter m LaunchWindowing Mode == 5 represents a small window, giving the boundary of the Task small window corresponding to this window. If the current small window is not the first small window, the boundary of the small window is moved to the left by several units to avoid being blocked by the small window. In Android, Task is a collection of a series of Activities, and Task specifies the boundaries of all Activities within the collection. In the Activity Starter class, according to the Activity Options.m Launch Windowing Mode parameter, use the Task.set Bounds() method to set the boundaries of the current application window.
[0098] When switching the size of a single window, you can change the window mode of the current window through the Task.setWindowingMode() method of the task corresponding to the current window. Passing in parameter 1 means switching to a large window, and passing in parameter 5 means switching the window to a small window. After that, the window management module receives the change of the window mode corresponding to the Task, and the window management module will call Task.setBounds() to adjust the boundary range of the Task window according to the current window mode to achieve the purpose of enlarging or reducing.
[0099] When you need to switch all windows to large / small, you can call the interface added in the Activity Task Manager class, and then in the implementation of the interface, traverse all tasks in the current system through the for All Root Tasks() method of the Display Content class, return a list of all application tasks, and then traverse the list and call the set Windowing Mode() method for each task to change its window mode. After the window management module receives the change of the window mode corresponding to the Task, the window management module will call Task.set Bounds() to adjust the boundary range of the Task window according to the current window mode to achieve the purpose of enlarging or reducing it.
[0100] When you need to close all large or small windows, you can use the getTasks() method of the Activity Task Manager class to find the Task list corresponding to all large or small windows that meet the requirements, and then compile the list and send it to each Task using methods such as remove Task() to end the current application.
[0101] For large windows and small windows, two unique control bars are created in the system: large window control bar and small window control bar. Because it is a global display, a system service is added to display the two control bars through Window Manager.add View(), and hide the two control bars through Window Manager.remove View Immediate() or View.setVisibili ty(View.INVISIBLE). In addition, the level of the large window control bar window is adjusted to Window Manager.Layout Params.TYPE_PHONE, and the level of the small window control bar window is adjusted to WindowManager.Layout Params.TYPE_SYSTEM_DIALOG, so that the control bar can be displayed above the bottom application window, and the small window control bar is displayed above the large window control bar. The window management module monitors the state changes of the window and notifies the window creation judgment module. After judgment, it sends a message to the control bar creation module, which adjusts its own display state and position according to the received message.
[0102] The Android system already has a dedicated window management module Window Manager Service. This embodiment adds logic to monitor the window level and state (open, close, enlarge, shrink) changes in this service. After the change occurs, the control bar is notified to create a judgment module. The creation judgment module obtains all tasks through for All Root Tasks() of the Display Content class, and then divides them into two lists (large window list and small window list) in order;
[0103] If the top large window in the large window list is visible, the large window control bar display request and the left position information of the current large window are sent to the control bar drawing module. The control bar drawing module adjusts its own display position and status according to the received status information and position information.
[0104] If the large window list is empty, a large window control bar hiding request message is sent to the control bar drawing module, and the control bar drawing module sets itself to be invisible according to the received status information.
[0105] If the topmost small window in the small window list is visible, the small window control bar display request and the left position information of the current small window are sent to the control bar drawing module. The control bar drawing module adjusts its own display position and status according to the received status information and position information.
[0106] If the small window list is empty, a small window control bar hiding request message is sent to the control bar drawing module, and the control bar drawing module sets itself to be invisible according to the received status information.
[0107] The window control method of the embodiment of the present invention creates a unique target control bar in the current operating system, and different application windows reuse this target control bar. The embodiment of the present invention adds batch operation controls for application windows of the same type to the target control bar, so that the target control bar can not only operate the current application window but also control application windows of the same type as the current application window in the current operating system, thereby batch processing the status of application windows of the same type. The window control method of the embodiment of the present invention has the advantages of saving system resources, improving user experience, and improving window management efficiency.
[0108] The invention provides a window control device.
[0109] Figure 8 Schematic diagram of a window control device according to an embodiment of the present invention. Figure 8 As shown, the window control device 100 may include: a detection module 10, used to determine whether a target control bar exists in the current operating system after the current application window is started; a control module 20, used to create a target control bar at a preset position of the current application window if it does not exist; if it exists, reuse the target control bar and move the target control bar to the preset position of the current application window.
[0110] It should be noted that other specific implementations of the window control device provided in the embodiment of the present invention may refer to other specific implementations of the window control method in the above embodiment of the present invention.
[0111] The window control device of the embodiment of the present invention creates a unique target control bar for the current operating system, and avoids waste of system resources and reduces system burden by reusing the created target control bar.
[0112] The present invention provides a computer-readable storage medium.
[0113] In this embodiment, a computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned window control method is implemented.
[0114] The invention provides an electronic device.
[0115] In this embodiment, the electronic device may include a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the above-mentioned window control method is implemented.
[0116] Fig. 9 It is a structural block diagram of an electronic device according to an embodiment of the present invention.
[0117] like Fig. 9As shown, the electronic device 500 includes: a processor 501 and a memory 503. The processor 501 and the memory 503 are connected, such as through a bus 502. Optionally, the electronic device 500 may also include a transceiver 504. It should be noted that in actual applications, the transceiver 504 is not limited to one, and the structure of the electronic device 500 does not constitute a limitation on the embodiments of the present invention.
[0118] Processor 501 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of the present invention. Processor 501 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0119] The bus 502 may include a path to transmit information between the above components. The bus 502 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0120] The memory 503 is used to store a computer program corresponding to the window control method of the above embodiment of the present invention, and the computer program is controlled and executed by the processor 501. The processor 501 is used to execute the computer program stored in the memory 503 to implement the contents shown in the above method embodiment.
[0121] Among them, the electronic device 500 includes but is not limited to: mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9The electronic device 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0122] The computer-readable storage medium and electronic device of the embodiments of the present invention use the above-mentioned window control method to control the windows in the current operating system, thereby saving system resources, improving user experience, and improving window management efficiency.
[0123] The present invention provides a vehicle.
[0124] Fig.10 Schematic diagram of a vehicle according to an embodiment of the present invention. Fig.10 As shown, vehicle 1000 includes the electronic device 500 described above.
[0125] The vehicle of the embodiment of the present invention creates a unique target control bar for the current operating system, and avoids waste of system resources and reduces system burden by reusing the created target control bar.
[0126] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0127] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0128] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0129] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0130] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0131] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0132] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0133] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A window control method, characterized in that: The method comprises: After the current application window is started, determine whether there is a target control bar in the current operating system; If it does not exist, creating the target control bar at a preset position of the current application window; If it exists, the target control bar is reused and moved to a preset position of the current application window.
2. The window control method according to claim 1, characterized in that: The step of determining whether a target control bar exists in the current operating system includes: Acquire a window list, wherein the window list is composed of application windows in the current operating system that are in the started state; If there is an element in the window list, it is determined that the target control bar does not exist; otherwise, it is determined that the target control bar exists.
3. The window control method according to claim 2, characterized in that: The types of the application windows include large windows and small windows, and the window list includes a large window list and a small window list; wherein, If the current application window is a large window and there is an element in the large window list, it is determined that the target control bar does not exist; otherwise, it is determined that the target control bar exists and the target control bar is a large window control bar; If the current application window is a small window and there is an element in the small window list, it is determined that the target control bar does not exist; otherwise, it is determined that the target control bar exists and the target control bar is a small window control bar.
4. The window control method according to claim 3, characterized in that: The target control bar is provided with a control, and the method further comprises: Monitoring the triggering operation of the control; In response to the trigger operation, the application window and the control bar in the current operating system are controlled.
5. The window control method according to claim 4, characterized in that: When the target control bar is the small window control bar, controlling the application window and the control bar in the current operating system includes: If the trigger operation is to close the current window, then the current application window is closed, the updated small window queue is adjusted, and the target control bar is moved to the preset position of the topmost small window in the adjusted small window queue; If the trigger operation is to close all windows, all small windows in the current operating system are closed, and the target control bar is hidden.
6. The window control method according to claim 5, characterized in that: The controlling of the application window and the control bar in the current operating system includes: If the trigger operation is to enlarge the current window, the current application window is changed to a large window, and the updated large window queue and small window queue are adjusted respectively, and the target control bar is moved to the preset position of the topmost small window in the adjusted small window queue, and the large window control bar is moved to the preset position of the topmost large window in the adjusted large window queue; If the trigger operation is to enlarge all windows, all small windows in the current operating system are changed to large windows, the updated large window queue is adjusted, the target control bar is hidden, and the large window control bar is moved to the preset position of the top large window in the adjusted large window queue.
7. The window control method according to claim 4, characterized in that: When the target control bar is a large window control bar, controlling the application window and the control bar in the current operating system includes: If the trigger operation is to close the current window, then the current application window is closed, the updated large window queue is adjusted, and the target control bar is moved to the preset position of the topmost large window in the adjusted large window queue; If the trigger operation is to close all windows, all large windows in the current operating system are closed, and the target control bar is hidden.
8. The window control method according to claim 7, characterized in that: The controlling of the application window and the control bar in the current operating system includes: If the trigger operation is to reduce the current window, the current application window is changed to a small window, and the updated large window queue and small window queue are adjusted respectively, and the target control bar is moved to the preset position of the top large window in the adjusted large window queue, and the small window control bar is moved to the preset position of the top large window in the adjusted small window queue; If the trigger operation is to shrink all windows, all large windows in the current operating system are changed to small windows, the updated small window queue is adjusted, the target control bar is hidden, and the small window control bar is moved to the preset position of the topmost small window in the adjusted small window queue.
9. The window control method according to claim 1, characterized in that: The preset position is the left position of the current application window.
10. The window control method according to claim 1, characterized in that: The method further comprises: When the current application window is a small window and there is an activated small window, the boundary of the current application window is moved left by a preset unit based on the boundary of the activated small window.
11. A window control device, characterized in that: The device comprises: A detection module, used to determine whether a target control bar exists in the current operating system after the current application window is started; The control module is used to create the target control bar at a preset position of the current application window if it does not exist; if it exists, reuse the target control bar and move the target control bar to the preset position of the current application window.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the window control method according to any one of claims 1 to 10 is implemented.
13. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the window control method according to any one of claims 1 to 10 is implemented.
14. A vehicle, characterized in that: Comprising the electronic device as claimed in claim 13.
