CN114816609B - Method and device for displaying window, electronic equipment and computer readable storage medium - Google Patents

Method and device for displaying window, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN114816609B
CN114816609B CN202110130099.7A CN202110130099A CN114816609B CN 114816609 B CN114816609 B CN 114816609B CN 202110130099 A CN202110130099 A CN 202110130099A CN 114816609 B CN114816609 B CN 114816609B
Authority
CN
China
Prior art keywords
window
style
native
preset
title bar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110130099.7A
Other languages
Chinese (zh)
Other versions
CN114816609A (en
Inventor
魏炎桐
陶曙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202110130099.7A priority Critical patent/CN114816609B/en
Publication of CN114816609A publication Critical patent/CN114816609A/en
Application granted granted Critical
Publication of CN114816609B publication Critical patent/CN114816609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Landscapes

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

Abstract

The disclosure provides a method, a device, electronic equipment and a computer readable storage medium for displaying a window, and relates to the field of computers. The method is applied to an iOS system, and comprises the following steps: when an opening instruction for a native window is received, detecting whether the style of the native window is the same as a preset style; when the style of the original window is different from the preset style, replacing the original title bar in the original window with a preset target title bar in the original window to obtain a target window containing the target title bar; and displaying the target window. According to the method and the device, when the style of the native window changes, the native title bar in the native window can be replaced by the preset target title bar, so that automatic adaptation of the style of the native window is realized.

Description

Method and device for displaying window, electronic equipment and computer readable storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a method, a device, electronic equipment and a computer readable storage medium for displaying windows.
Background
Running the iOS system in the terminal, especially at the PC (Personal Computer ) side, requires interaction with the user through separate windows. For example, a user may want to browse a file and open a folder storing the file, and then the folder interacts with the user in the form of a window.
The iOS system has a native window through which the iOS system interacts with the user. However, in practical application, a designer can design the style of the native window autonomously, and the style of the designed window changes, so that the next time the designed window is displayed. However, the title bar of the native window does not match the style of the designed window, resulting in abnormal display of the changed window.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The disclosure provides a method, a device, an electronic device and a computer readable storage medium for displaying a window, which can solve the problem that when the style of the window is changed in an iOS system, a title bar cannot be matched with the changed window, so that the changed window is displayed abnormally. The technical scheme is as follows:
In a first aspect, there is provided a method of displaying a window, the method being applied to an iOS system, the method comprising:
When an opening instruction for a native window is received, detecting whether the style of the native window is the same as a preset style;
When the style of the original window is different from the preset style, replacing the original title bar in the original window with a preset target title bar in the original window to obtain a target window containing the target title bar;
and displaying the target window.
In a second aspect, there is provided an apparatus for displaying a window, the apparatus being applied to an iOS system, the apparatus comprising:
the receiving module is used for receiving an opening instruction for the native window;
the detection module is used for detecting whether the style of the native window is the same as a preset style;
a replacing module, configured to replace a native title bar in the native window with a preset target title bar in the native window when the style of the native window is different from the preset style, so as to obtain a target window including the target title bar;
And the display module is used for displaying the target window.
In a third aspect, an electronic device is provided, the electronic device comprising:
a processor, a memory, and a bus;
the bus is used for connecting the processor and the memory;
the memory is used for storing operation instructions;
The processor is configured to, by invoking the operation instruction, cause the processor to perform an operation corresponding to a method for displaying a window as shown in the first aspect of the present disclosure.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method of presenting a window as shown in the first aspect of the present disclosure.
The beneficial effects that this disclosure provided technical scheme brought are:
When an opening instruction for a native window is received, detecting whether the style of the native window is the same as a preset style, and when the style of the native window is different from the preset style, replacing a native title bar in the native window with a preset target title bar in the native window to obtain a target window containing the target title bar, and displaying the target window. Therefore, when the style of the original window changes, the original title bar in the original window can be replaced by the preset target title bar, and the automatic adaptation of the style of the original window is realized, so that the problem that abnormal display of the original title bar occurs when the style of the original window changes is solved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of a method for displaying a window according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method for displaying a window according to another embodiment of the present disclosure;
FIG. 3 is a schematic diagram of the effect of the present disclosure of opening a native window;
FIG. 4 is a schematic diagram showing the effect of the native window after adjustment according to the present disclosure;
FIG. 5 is a schematic illustration of the effect of the native window after auto-adaptation of the present disclosure;
Fig. 6 is a schematic structural view of a device for displaying a window according to another embodiment of the present disclosure;
Fig. 7 is a schematic structural diagram of an electronic device with a display window according to another embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are used merely to distinguish one from another device, module, or unit, and are not intended to limit the device, module, or unit to the particular device, module, or unit or to limit the order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
For the purposes of clarity, technical solutions and advantages of the present disclosure, the following further details the embodiments of the present disclosure with reference to the accompanying drawings.
The present disclosure provides a method, an apparatus, an electronic device, and a computer readable storage medium for displaying a window, which aim to solve the above technical problems in the prior art.
The following describes the technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
In one embodiment, a method for displaying a window is provided, where the method is applied to an iOS system, as shown in fig. 1, and includes:
step S101, when an opening instruction for a native window is received, detecting whether the style of the native window is the same as a preset style;
Wherein the native window (NSWindow) is a window generated based on the original settings of the iOS system, which may include, but is not limited to, the style of the native window, and the style of the native title bar TitleBar of the native window. In practical applications, the iOS system is run in the terminal, especially at the PC (Personal Computer ) end, and interacts with the user through separate windows. For example, a user may want to browse a file and open a folder storing the file, and then the folder interacts with the user in the form of a window.
In the embodiment of the present disclosure, when a user initiates an opening instruction for opening any native window at a PC end, for example, initiates an opening instruction for a certain folder, whether a style of the native window is the same as a preset style may be detected first, and if so, the native title bar may be replaced; if not, the native window may be presented directly to the user.
Step S102, when the style of the original window is different from the preset style, replacing the original title bar in the original window with a preset target title bar in the original window to obtain a target window containing the target title bar;
When the style of the original window is detected to be different from the preset style, the original title bar of the original window can be replaced by the preset target title bar in the original window, so that the target window containing the target title bar is obtained.
Step S103, displaying the target window.
After the target window containing the target title bar is obtained, the target window is displayed to the user.
In the embodiment of the disclosure, when an opening instruction for a native window is received, whether the style of the native window is the same as a preset style is detected, when the style of the native window is different from the preset style, a preset target title bar is adopted in the native window to replace the native title bar in the native window, so that a target window containing the target title bar is obtained, and then the target window is displayed. Therefore, when the style of the original window changes, the original title bar in the original window can be replaced by the preset target title bar, and the automatic adaptation of the style of the original window is realized, so that the problem that abnormal display of the original title bar occurs when the style of the original window changes is solved.
In another embodiment, a method for displaying a window is provided, where the method is applied to an iOS system, as shown in fig. 2, and includes:
step S201, when an opening instruction for a native window is received, detecting whether the style of the native window is the same as a preset style;
Wherein the native window (NSWindow) is a window generated based on the original settings of the iOS system, which may include, but is not limited to, the style of the native window, and the style of the native title bar TitleBar of the native window. In practical applications, the iOS system is run in the terminal, especially at the PC (Personal Computer ) end, and interacts with the user through separate windows. For example, a user may want to browse a file and open a folder storing the file, and then the folder interacts with the user in the form of a window.
In the embodiment of the present disclosure, when a user initiates an opening instruction for opening any native window at a PC end, for example, initiates an opening instruction for a certain folder, whether a style of the native window is the same as a preset style may be detected first, and if so, the native title bar may be replaced; if not, the native window may be presented directly to the user.
In a preferred embodiment of the present disclosure, detecting whether the style of the native window is the same as the preset style includes:
Generating a native window and generating a base view of the iOS system;
acquiring style parameters of a native window based on the basic view;
when the style parameter is different from the preset style parameter, judging that the style of the native window is different from the preset style.
Specifically, the iOS system may generate a native window based on the native style parameters when a user opens any of the native windows, and then present the native window to the user. However, in practical application, a designer can design the style of the native window autonomously, and the style of the designed window changes, so that the next time the designed window is displayed. However, the title bar of the native window is not matched with the designed window style, so that the changed window is displayed abnormally, for example, the changed native window cannot display the native title bar, or the native title bar is displayed incorrectly, and the like.
Therefore, after receiving the opening instruction, the native window can be generated first, meanwhile, the basic view NSView of the iOS system is generated, then the style parameters of the native window are obtained by using the basic view, the obtained style parameters are compared with the preset style parameters, and if the obtained style parameters are the same as the preset style parameters, the preset replacement condition is not met, namely the native title bar of the native window is not required to be replaced; if the acquired style parameters are different from the preset style parameters, the preset replacement conditions are met, namely the original title bar of the original window needs to be replaced.
Further, the base view NSView may monitor style changes of the native window in real time, in addition to obtaining style parameters of the native window. Because in practical applications, a case may occur in which the native window is generated based on the native style parameters when the user opens the native window, but the style of the native window is adjusted by the user after the opening, in this case, the native title bar is normally displayed before the style of the native window is adjusted, but may be abnormally displayed after the adjustment. Therefore, for this situation, the style change of the native window is monitored in real time through the base view NSView, so that when the style of the native window changes, whether the native title bar of the native window meets the replacement condition can be detected in real time, and when the replacement condition is met, the native title bar is replaced in real time, thereby solving the problem of abnormal display of the native title bar.
It should be noted that, the base view NSView may be generated by the window style windowStyle in the iOS system, and the window style windowStyle is an attribute in a native window style management module of the iOS system, and the native window style management module is attached to the window view model WindowViewModel.
The preset style parameters comprise preset full-screen state parameters and mark parameters; the preset style parameters are obtained based on preset cross-platform system settings, the full-screen state parameters are used for representing whether the window is in a full-screen state or not, and the identification parameters are used for representing various parameters of the style of the window;
When the style parameter is different from the preset style parameter, determining that the style of the native window is different from the preset style includes:
When the full-screen state parameter of the original window is different from the preset full-screen state parameter, and the sign parameter of the original window is different from the preset sign parameter, judging that the style of the original window is different from the preset style.
In particular, the style parameters may include a full screen status parameter for indicating whether the native window is currently in full screen status and a logo parameter flags for indicating various parameters of the native window style. Wherein, the parameter value of the preset full-screen state parameter in the preset style parameter is in a non-full-screen state, and each parameter in the preset mark parameter also has a preset parameter value.
Further, when detecting whether the style parameters of the native window are the same as the preset style parameters, whether the full-screen state parameters of the native window are the same as the preset full-screen state parameters or not can be detected, and meanwhile, whether the sign parameters of the native window are the same as the preset sign parameters or not can be detected, and if the sign parameters are different from the preset style, the style of the native window can be judged to be different from the preset style.
Wherein the full screen status parameter has a higher priority than the flag parameter. This is because in practical applications, when the native window in the iOS system is displayed in a full-screen state, the iOS system will automatically hide the native title bar, so that in the full-screen state, no replacement of the native title bar is required, regardless of whether the flag parameter of the native window is the same as the preset flag parameter.
It should be noted that, the preset style parameter may be set in a configuration file, where a flag parameter in the configuration file is used to set a User Interface (UI), and the configuration file may be bound with the window view model described above. The configuration file setting and the binding of the configuration file with the window view model are performed in a cross-platform system (Qt system), i.e. in other systems than the iOS system, such as Windows system, linux system, etc. Thus, the user can perform custom setting on the style of the original window in the iOS system in the non-iOS system.
Step S202, when the style of the original window is different from the preset style, replacing the original title bar in the original window with a preset target title bar in the original window to obtain a target window containing the target title bar;
When the style of the original window is detected to be different from the preset style, the original title bar of the original window can be replaced by the preset target title bar in the original window, so that the target window containing the target title bar is obtained.
In a preferred embodiment of the present disclosure, the target title bar is generated by:
acquiring a native component in a native title bar of a native window;
And setting the style of the basic view based on preset style parameters, and adding the native component into the basic view to obtain a target title bar.
In particular, a native component may be included in the native title bar through which a user may interact with the native window. For example, the native component is used to close, maximize, minimize, etc. the native window, then the user may close, maximize, minimize, etc. the native window through the native component.
Therefore, when the native title bar is replaced, the native component in the native title bar can be obtained first, then the native title bar in the native window is removed, then the base view is rotated on the position of the native title bar, meanwhile, the style of the base view is set based on the mark parameter in the preset style parameter, and then the obtained native component is added into the base view, so that the base view containing the native component, namely the target title bar, can be obtained.
It should be noted that, the native component in the native title bar may be one or multiple, and any native component may be used for interaction with a user, or may have other purposes, for example, display window information, and may be set according to actual requirements in practical applications, which is not limited in the embodiments of the present disclosure.
Step S203, displaying a target window;
after the target window containing the target title bar is obtained, the target window is displayed to the user.
In step S204, when a closing instruction for the target window is received, the target title bar is destroyed.
When the user initiates a close instruction to close the target window, for example, the user clicks "close" in the native component, then the native window and the target title bar may be destroyed.
In the embodiment of the disclosure, when an opening instruction for a native window is received, whether the style of the native window is the same as a preset style is detected, when the style of the native window is different from the preset style, a preset target title bar is adopted in the native window to replace the native title bar in the native window, so that a target window containing the target title bar is obtained, and then the target window is displayed. Therefore, when the style of the original window changes, the original title bar in the original window can be replaced by the preset target title bar, and the automatic adaptation of the style of the original window is realized, so that the problem that abnormal display of the original title bar occurs when the style of the original window changes is solved.
Further, the preset target title bar is generated based on preset style parameters, the preset style parameters can be set in a configuration file, and the configuration file can be bound with the window view model. While setting up the configuration file and binding the configuration file with the window view model is performed in a cross-platform system (Qt system), i.e. in a system other than the iOS system. Therefore, the user can carry out custom setting on the style of the original window in the iOS system in the non-iOS system, and convenience is provided for the management of the user.
In the embodiments of the present disclosure, a method for displaying windows is fully illustrated.
As shown in fig. 3, assuming that a user initiates an open instruction to open a native window in the iOS system, the iOS system generates a native window 300 after receiving the system, the folder window includes a native title bar 301, virtual function buttons of "close", "maximize" and "minimize" are included in the native title bar, and a base view is generated, and the native window is found not to meet a preset replacement condition through the base view detection, so that the native window and the native title bar are directly presented to the user.
The user then adjusts, e.g., stretches, the style of the native window to obtain an adjusted native window 400, which is not adapted to the native title bar because the native title bar 301 is adapted to the native window 300, as shown in fig. 4.
At this point, the iOS system generates the target title bar 500 and removes the native title bar 301, then places the target title bar in the adapted position, resulting in the native window 400 and the target title bar 500, as shown in fig. 5.
Fig. 6 is a schematic structural diagram of a device for displaying a window according to another embodiment of the present disclosure, where, as shown in fig. 6, the device is applied to an iOS system, and the device of this embodiment may include:
A receiving module 601, configured to receive an open instruction for a native window;
the detection module 602 is configured to detect whether a style of the native window is the same as a preset style;
a replacing module 603, configured to replace a native title bar in the native window with a preset target title bar in the native window when the style of the native window is different from the preset style, so as to obtain a target window including the target title bar;
And the display module 604 is used for displaying the target window.
In a preferred embodiment of the present disclosure, the detection module comprises:
The generation sub-module is used for generating a native window and generating a basic view of the iOS system;
The acquisition sub-module is used for acquiring style parameters of the native window based on the basic view;
And the judging sub-module is used for judging that the style of the original window is different from the preset style when the style parameter is different from the preset style parameter.
In a preferred embodiment of the present disclosure, the method further includes a target title bar generating module, specifically configured to:
Acquiring a native component in a native title bar of a native window; and setting the style of the basic view based on preset style parameters, and adding the native component into the basic view to obtain a target title bar.
In a preferred embodiment of the present disclosure, the preset style parameters include preset full screen status parameters and logo parameters; the preset style parameters are obtained based on preset cross-platform system settings, the full-screen state parameters are used for representing whether the window is in a full-screen state or not, and the identification parameters are used for representing various parameters of the style of the window;
The judging submodule is specifically used for:
When the full-screen state parameter of the original window is different from the preset full-screen state parameter, and the sign parameter of the original window is different from the preset sign parameter, judging that the style of the original window is different from the preset style.
In a preferred embodiment of the present disclosure, further comprising:
the destroying module is used for destroying the target title bar when receiving a closing instruction for the target window.
The window display device of the present embodiment may perform the window display methods shown in the first embodiment and the second embodiment of the present disclosure, and the implementation principle is similar, and will not be described herein.
In the embodiment of the disclosure, when an opening instruction for a native window is received, whether the style of the native window is the same as a preset style is detected, when the style of the native window is different from the preset style, a preset target title bar is adopted in the native window to replace the native title bar in the native window, so that a target window containing the target title bar is obtained, and then the target window is displayed. Therefore, when the style of the original window changes, the original title bar in the original window can be replaced by the preset target title bar, and the automatic adaptation of the style of the original window is realized, so that the problem that abnormal display of the original title bar occurs when the style of the original window changes is solved.
Further, the preset target title bar is generated based on preset style parameters, the preset style parameters can be set in a configuration file, and the configuration file can be bound with the window view model. While setting up the configuration file and binding the configuration file with the window view model is performed in a cross-platform system (Qt system), i.e. in a system other than the iOS system. Therefore, the user can carry out custom setting on the style of the original window in the iOS system in the non-iOS system, and convenience is provided for the management of the user.
Referring now to fig. 7, a schematic diagram of an electronic device 700 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 7 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
An electronic device includes: a memory and a processor, where the processor may be referred to as a processing device 701 described below, the memory may include at least one of a Read Only Memory (ROM) 702, a Random Access Memory (RAM) 703, and a storage device 708 described below, as follows: as shown in fig. 7, the electronic device 700 may include a processing means (e.g., a central processor, a graphics processor, etc.) 701, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage means 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
In general, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 708 including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 shows an electronic device 700 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 709, or installed from storage 708, or installed from ROM 702. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 701.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: when an opening instruction for a native window is received, detecting whether the style of the native window is the same as a preset style; when the style of the original window is different from the preset style, replacing the original title bar in the original window with a preset target title bar in the original window to obtain a target window containing the target title bar; and displaying the target window.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Where the name of a module or unit does not in some cases constitute a limitation of the unit itself.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a method of exposing a window, the method being applied to an iOS system, comprising:
When an opening instruction for a native window is received, detecting whether the style of the native window is the same as a preset style;
When the style of the original window is different from the preset style, replacing the original title bar in the original window with a preset target title bar in the original window to obtain a target window containing the target title bar;
and displaying the target window.
In a preferred embodiment of the present disclosure, the detecting whether the style of the native window is the same as a preset style includes:
generating the native window and generating a base view of the iOS system;
acquiring style parameters of the native window based on the basic view;
when the style parameter is different from a preset style parameter, judging that the style of the native window is different from the preset style.
In a preferred embodiment of the present disclosure, the target title bar is generated by:
acquiring a native component in a native title bar of the native window;
And setting the style of the basic view based on preset style parameters, and adding the native component into the basic view to obtain a target title bar.
In a preferred embodiment of the present disclosure, the preset style parameters include preset full screen status parameters and logo parameters; the preset style parameters are obtained based on preset cross-platform system settings, the full-screen state parameters are used for representing whether the window is in a full-screen state or not, and the identification parameters are used for representing various parameters of the window style;
When the style parameter is different from a preset style parameter, determining that the style of the native window is different from the preset style includes:
When the full-screen state parameter of the original window is different from the preset full-screen state parameter, and the sign parameter of the original window is different from the preset sign parameter, judging that the style of the original window is different from the preset style.
In a preferred embodiment of the present disclosure, further comprising:
And destroying the target title bar when a closing instruction for the target window is received.
According to one or more embodiments of the present disclosure, there is provided an apparatus of example one, the apparatus being applied to an iOS system, comprising:
the receiving module is used for receiving an opening instruction for the native window;
the detection module is used for detecting whether the style of the native window is the same as a preset style;
a replacing module, configured to replace a native title bar in the native window with a preset target title bar in the native window when the style of the native window is different from the preset style, so as to obtain a target window including the target title bar;
And the display module is used for displaying the target window.
In a preferred embodiment of the present disclosure, the detection module includes:
The generation sub-module is used for generating the native window and generating a basic view of the iOS system;
An acquisition sub-module for acquiring style parameters of the native window based on the base view;
And the judging sub-module is used for judging that the style of the native window is different from the preset style when the style parameter is different from the preset style parameter.
In a preferred embodiment of the present disclosure, the method further includes a target title bar generating module, specifically configured to:
Acquiring a native component in a native title bar of the native window; and setting the style of the basic view based on preset style parameters, and adding the native component into the basic view to obtain a target title bar.
In a preferred embodiment of the present disclosure, the preset style parameters include preset full screen status parameters and logo parameters; the preset style parameters are obtained based on preset cross-platform system settings, the full-screen state parameters are used for representing whether the window is in a full-screen state or not, and the identification parameters are used for representing various parameters of the window style;
the judging submodule is specifically used for:
When the full-screen state parameter of the original window is different from the preset full-screen state parameter, and the sign parameter of the original window is different from the preset sign parameter, judging that the style of the original window is different from the preset style.
In a preferred embodiment of the present disclosure, further comprising:
and the destroying module is used for destroying the target title bar when receiving a closing instruction aiming at the target window.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (7)

1. A method of exposing a window, the method being applied to an iOS system, the method comprising:
when an opening instruction for a native window is received, generating the native window, and generating a basic view of the iOS system;
acquiring style parameters of the native window based on the basic view;
When the style parameters are different from the preset style parameters, judging that the style of the native window is different from the preset style;
When the style of the original window is different from the preset style, replacing the original title bar in the original window with a preset target title bar in the original window to obtain a target window containing the target title bar;
displaying the target window;
The preset style parameters comprise preset full-screen state parameters and mark parameters; the preset style parameters are obtained based on preset cross-platform system settings, the full-screen state parameters are used for representing whether the window is in a full-screen state or not, and the mark parameters are used for representing various parameters of the window style;
When the style parameter is different from a preset style parameter, determining that the style of the native window is different from the preset style includes:
When the full-screen state parameter of the original window is different from the preset full-screen state parameter, and the sign parameter of the original window is different from the preset sign parameter, judging that the style of the original window is different from the preset style.
2. The method of displaying a window of claim 1, wherein the target title bar is generated by:
acquiring a native component in a native title bar of the native window;
And setting the style of the basic view based on preset style parameters, and adding the native component into the basic view to obtain a target title bar.
3. The method of displaying a window of claim 1, further comprising:
And destroying the target title bar when a closing instruction for the target window is received.
4. An apparatus for displaying a window, the apparatus being applied to an iOS system, the apparatus comprising:
the receiving module is used for receiving an opening instruction for the native window;
The generation sub-module is used for generating the native window and generating a basic view of the iOS system;
An acquisition sub-module for acquiring style parameters of the native window based on the base view;
a judging sub-module, configured to judge that the style of the native window is different from the preset style when the style parameter is different from the preset style parameter;
a replacing module, configured to replace a native title bar in the native window with a preset target title bar in the native window when the style of the native window is different from the preset style, so as to obtain a target window including the target title bar;
the display module is used for displaying the target window;
The preset style parameters comprise preset full-screen state parameters and mark parameters; the preset style parameters are obtained based on preset cross-platform system settings, the full-screen state parameters are used for representing whether the window is in a full-screen state or not, and the mark parameters are used for representing various parameters of the window style;
The judging submodule is used for:
When the full-screen state parameter of the original window is different from the preset full-screen state parameter, and the sign parameter of the original window is different from the preset sign parameter, judging that the style of the original window is different from the preset style.
5. The apparatus for displaying a window according to claim 4, further comprising a target title bar generation module, specifically configured to:
Acquiring a native component in a native title bar of the native window; and setting the style of the basic view based on preset style parameters, and adding the native component into the basic view to obtain a target title bar.
6. An electronic device, comprising:
a processor, a memory, and a bus;
the bus is used for connecting the processor and the memory;
the memory is used for storing operation instructions;
The processor is configured to execute the method for displaying a window according to any one of claims 1 to 3 by invoking the operation instruction.
7. A computer readable storage medium for storing computer instructions which, when run on a computer, cause the computer to perform the method of displaying a window as claimed in any one of claims 1 to 3.
CN202110130099.7A 2021-01-29 2021-01-29 Method and device for displaying window, electronic equipment and computer readable storage medium Active CN114816609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110130099.7A CN114816609B (en) 2021-01-29 2021-01-29 Method and device for displaying window, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110130099.7A CN114816609B (en) 2021-01-29 2021-01-29 Method and device for displaying window, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114816609A CN114816609A (en) 2022-07-29
CN114816609B true CN114816609B (en) 2024-05-28

Family

ID=82526044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110130099.7A Active CN114816609B (en) 2021-01-29 2021-01-29 Method and device for displaying window, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114816609B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371844A (en) * 2016-08-31 2017-02-01 北京奇艺世纪科技有限公司 Method and system for presenting webpage by native user interface assembly
CN108733370A (en) * 2018-04-28 2018-11-02 广东蜂助手网络技术股份有限公司 Patterned display methods, device, terminal and the storage medium of primary APP
CN108900693A (en) * 2018-05-25 2018-11-27 北京小米移动软件有限公司 Window display method and device
CN108958875A (en) * 2018-07-19 2018-12-07 北京城市网邻信息技术有限公司 A kind of page display method, device, electronic equipment and storage medium
CN109460233A (en) * 2018-10-25 2019-03-12 北京字节跳动网络技术有限公司 Primary interface display update method, device, terminal device and the medium of the page
CN109725970A (en) * 2018-12-25 2019-05-07 北京微播视界科技有限公司 The method, apparatus and electronic equipment that applications client window is shown
CN110413913A (en) * 2019-07-04 2019-11-05 北京字节跳动网络技术有限公司 A kind of page furbishing method, device, terminal and storage medium
CN110609965A (en) * 2018-05-28 2019-12-24 腾讯科技(深圳)有限公司 Page display method and device and storage medium
CN110955427A (en) * 2019-11-19 2020-04-03 江苏艾佳家居用品有限公司 Self-adaptive fusion interface implementation method for desktop end software
CN112269527A (en) * 2020-11-16 2021-01-26 Oppo广东移动通信有限公司 Application interface generation method and related device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371844A (en) * 2016-08-31 2017-02-01 北京奇艺世纪科技有限公司 Method and system for presenting webpage by native user interface assembly
CN108733370A (en) * 2018-04-28 2018-11-02 广东蜂助手网络技术股份有限公司 Patterned display methods, device, terminal and the storage medium of primary APP
CN108900693A (en) * 2018-05-25 2018-11-27 北京小米移动软件有限公司 Window display method and device
CN110609965A (en) * 2018-05-28 2019-12-24 腾讯科技(深圳)有限公司 Page display method and device and storage medium
CN108958875A (en) * 2018-07-19 2018-12-07 北京城市网邻信息技术有限公司 A kind of page display method, device, electronic equipment and storage medium
CN109460233A (en) * 2018-10-25 2019-03-12 北京字节跳动网络技术有限公司 Primary interface display update method, device, terminal device and the medium of the page
CN109725970A (en) * 2018-12-25 2019-05-07 北京微播视界科技有限公司 The method, apparatus and electronic equipment that applications client window is shown
CN110413913A (en) * 2019-07-04 2019-11-05 北京字节跳动网络技术有限公司 A kind of page furbishing method, device, terminal and storage medium
CN110955427A (en) * 2019-11-19 2020-04-03 江苏艾佳家居用品有限公司 Self-adaptive fusion interface implementation method for desktop end software
CN112269527A (en) * 2020-11-16 2021-01-26 Oppo广东移动通信有限公司 Application interface generation method and related device

Also Published As

Publication number Publication date
CN114816609A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN113938456B (en) Session message overhead processing method and device
CN111291244B (en) House source information display method, device, terminal and storage medium
US11861381B2 (en) Icon updating method and apparatus, and electronic device
CN110781432A (en) Page jump method and device, electronic equipment and computer readable storage medium
CN114489336B (en) Multimedia display method and device, readable medium and electronic equipment
CN113806212A (en) Application program exception positioning method and device and electronic equipment
CN110795196A (en) Window display method, device, terminal and storage medium
CN110865846B (en) Application management method, device, terminal, system and storage medium
CN114064593B (en) Document sharing method, device, equipment and medium
CN113741757B (en) Method and device for displaying reminding information, electronic equipment and storage medium
CN111273830A (en) Data display method and device, electronic equipment and computer readable medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN113391860B (en) Service request processing method and device, electronic equipment and computer storage medium
CN114816609B (en) Method and device for displaying window, electronic equipment and computer readable storage medium
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium
CN111290812B (en) Display method, device, terminal and storage medium of application control
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
CN111259291B (en) View display method and device and electronic equipment
CN111274513B (en) Window display method, device, terminal and storage medium
CN111291090B (en) Method, device, electronic equipment and medium for acquiring time period based on time control
CN111381813B (en) Front-end page debugging method and device, computer equipment and storage medium
CN112333462A (en) Live broadcast room page jumping method, returning device and electronic equipment
CN111290755B (en) Method, device, electronic equipment and storage medium for presenting data
CN111783390B (en) Dimension label adjusting method and device and electronic equipment
CN113448550B (en) Method and device for realizing collection management of classes, electronic equipment and computer medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

GR01 Patent grant