CN110032372A - A kind of method, apparatus and computer equipment creating window border - Google Patents

A kind of method, apparatus and computer equipment creating window border Download PDF

Info

Publication number
CN110032372A
CN110032372A CN201810027602.4A CN201810027602A CN110032372A CN 110032372 A CN110032372 A CN 110032372A CN 201810027602 A CN201810027602 A CN 201810027602A CN 110032372 A CN110032372 A CN 110032372A
Authority
CN
China
Prior art keywords
window
frame display
frame
parameter
current
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.)
Pending
Application number
CN201810027602.4A
Other languages
Chinese (zh)
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810027602.4A priority Critical patent/CN110032372A/en
Publication of CN110032372A publication Critical patent/CN110032372A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations

Abstract

The embodiment of the invention provides a kind of method, apparatus and computer equipment for creating window border, apply in live streaming platform, which comprises Rimless window is set for current window according to the window attribute received;The window handle for obtaining the current window sets the current window to based on the window handle parent window of pre-registered frame display window;According to the second window parameter of frame display window described in the first window parameter setting of the current window;The frame display window is shown based on second window parameter;The frame display window is once drawn using preset rendering objects;Calling layer window drafting function carries out secondary drafting to the frame display window after primary draw, the frame display window after updating secondary drafting.

Description

A kind of method, apparatus and computer equipment creating window border
Technical field
The invention belongs to web page windows manufacture technology field more particularly to it is a kind of create window border method, apparatus and Calculating and equipment.
Background technique
Webpage is made of multiple windows, in general, each window be it is rectangular, each window intersection have weight It closes, aobvious is lofty, causes the display effect of window not good enough.
Summary of the invention
In view of the problems of the existing technology, the embodiment of the invention provides a kind of method, apparatus for creating window border And calculate and equipment, for solve in the prior art window show during, it is aobvious since there is coincidence in each window intersection It is lofty, lead to the inaesthetic technical problem of the display of window.
The present invention provides a kind of method for creating window border, applies in live streaming platform, which comprises
Rimless window is set by current window according to the window attribute received;
The current window is set as infusing in advance by the window handle for obtaining the current window based on the window handle The parent window of the frame display window of volume;
According to the second window parameter of frame display window described in the first window parameter setting of the current window;
The frame display window is shown based on second window parameter;
The frame display window is once drawn using preset rendering objects;
Calling layer window drafting function carries out secondary drafting to the frame display window after primary draw, and updates secondary The frame display window after drafting.
In above scheme, of frame display window described in the first window parameter setting according to the current window Two window parameters, comprising:
Obtain left pixel left, right pixel right, upper pixel top, lower pixel bottom and the shade of the current window The width S HADOW_MARGIN of display;
Determine that the frame is aobvious according to formula int width=rect.right-rect.left+SHADOW_MARGIN*2 Show the width of window;
The frame is determined according to formula int height=rect.bottom-rect.top+SHADOW_MARGIN*2 The height of display window;Wherein, the first window parameter includes: the left pixel left of the current window, right pixel The width S HADOW_MARGIN that right, upper pixel top, lower pixel bottom and shade are shown;The second window parameter packet It includes: the width and height of the frame display window.
It is described that the frame display window is drawn using preset rendering objects in above scheme, comprising:
Create the unrelated bitmap structure body of DIB;
Equipment relevant bitmap file is created using the unrelated bitmap structure body of the DIB, and saves the position of institute's bitmap file Figure handle;
The bitmap handle is added in the device object (DC, Device Content) pre-established;
Graphical device interface rendering objects are created, the DC is added in the rendering objects;
Preset background picture is drawn using the rendering objects;
The background picture after drafting is rendered in the frame window;
The frame window is placed in below the current window.
In above scheme, the background picture by after drafting renders to the frame window, comprising:
The ratios such as the background picture are divided into nine grids;
The corresponding picture in four angles of the nine grids is rendered to respectively in four apex angles of the frame window;
By four frames rendering of the nine grids respectively into the corresponding frame of the frame window;
The middle section of the nine grids is filled into the frame window.
In above scheme, the calling layer window drafting function carries out two to the frame display window after primary draw Secondary drafting, comprising:
The layer window drafting function is called to draw device object DC into layer window, the DC is stored with the frame The secondary drawing data of display window.
In above scheme, after the frame display window after the secondary drafting of update, further includes:
Using message parameter in message loop function supervisory messages queue, judge whether the message parameter changes;
In the case where the message parameter changes, window call back function is called to handle the message parameter.
The present invention also provides a kind of device for creating window border, described device includes:
First setting unit, for setting Rimless window for current window according to the window attribute received;
Second setting unit is worked as by described in for obtaining the window handle of the current window based on the window handle Front window is set as the parent window of pre-registered frame display window;
Third setting unit, for frame display window described in the first window parameter setting according to the current window Second window parameter;
Display unit, for showing the frame display window based on second window parameter;
Drawing unit, for once being drawn using preset rendering objects to the frame display window;
Calling layer window drafting function carries out secondary drafting to the frame display window after primary draw, and updates secondary The frame display window after drafting.
In above scheme, the third setting unit is specifically used for:
Obtain left pixel left, right pixel right, upper pixel top, lower pixel bottom and the shade of the current window The width S HADOW_MARGIN of display;
Determine that the frame is aobvious according to formula int width=rect.right-rect.left+SHADOW_MARGIN*2 Show the width of window;
The frame is determined according to formula int height=rect.bottom-rect.top+SHADOW_MARGIN*2 The height of display window;Wherein, the first window parameter includes: the left pixel left of the current window, right pixel The width S HADOW_MARGIN that right, upper pixel top, lower pixel bottom and shade are shown;The second window parameter packet It includes: the width and height of the frame display window.
The present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, and the program is processed Device performs the steps of when executing
Rimless window is set by current window according to the window attribute received;
The current window is set as infusing in advance by the window handle for obtaining the current window based on the window handle The parent window of the frame display window of volume;
According to the second window parameter of frame display window described in the first window parameter setting of the current window;
The frame display window is shown based on second window parameter;
The frame display window is once drawn using preset rendering objects;
Calling layer window drafting function carries out secondary drafting to the frame display window after primary draw, and updates secondary The frame display window after drafting.
The present invention also provides a kind of for creating the computer equipment of window border, comprising:
At least one processor;And
At least one processor being connect with the processor communication, wherein
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to refer to Order is able to carry out such as any of the above-described method.
The embodiment of the invention provides a kind of method, apparatus and computer equipment for creating window border, apply and are being broadcast live In platform, which comprises set Rimless window for current window according to the window attribute received;Work as described in acquisition The window handle of front window sets pre-registered frame display window for the current window based on the window handle Parent window;According to the second window parameter of frame display window described in the first window parameter setting of the current window;It is based on Second window parameter shows the frame display window;The frame display window is carried out using preset rendering objects It is primary to draw;Calling layer window drafting function carries out secondary drafting to the frame display window after primary draw, and updates two The frame display window after secondary drafting;In this way, by a frame display window registered in advance, then setting current window It is set to the parent window of frame display window, when current window is placed on the frame display window, frame display window can To become the frame of the current window;Then calling layer window drafting function is to the frame display window after primary draw Secondary drafting is carried out, so that the effect of gradual change is presented in frame display window, it is too lofty to avoid window intersection appearance in this way Situation, and then improve the aesthetics of window.
Detailed description of the invention
Fig. 1 is the method flow schematic diagram for the creation window border that the embodiment of the present invention one provides;
Fig. 2 is the apparatus structure schematic diagram of creation window border provided by Embodiment 2 of the present invention;
Fig. 3 is the computer equipment overall structure diagram of creation window border provided by Embodiment 2 of the present invention.
Specific embodiment
In order to solve in the prior art during window display, since there is coincidence in each window intersection, aobvious is lofty, Lead to the inaesthetic technical problem of the display of window, the embodiment of the invention provides a kind of method, apparatus for creating window border And computer equipment, it applies in live streaming platform, which comprises current window is arranged according to the window attribute received For Rimless window;The window handle for obtaining the current window is set the current window to based on the window handle The parent window of pre-registered frame display window;It is shown according to frame described in the first window parameter setting of the current window Second window parameter of window;The frame display window is shown based on second window parameter;Utilize preset rendering pair As once being drawn to the frame display window;Calling layer window drafting function shows the frame after primary draw Window carries out secondary drafting, the frame display window after updating secondary drafting.
Technical solution of the present invention is described in further detail below by drawings and the specific embodiments.
Embodiment one
The present embodiment provides a kind of embodiments to provide a kind of method for creating window border, applies in live streaming platform, As shown in Figure 1, which comprises
S101 sets Rimless window for current window according to the window attribute received;
In this step, in order to avoid using the frame of current window, need to set Rimless for current window.
In general, when window attribute is Rimless, then with regard to current window is set according to the window attribute received It is set to Rimless window.Here, the present embodiment is illustrated by taking QT window as an example.
S102 obtains the window handle of the current window, is set the current window to based on the window handle The parent window of pre-registered frame display window;
Then the window handle for getting the current window registers a frame display window, and is based on the window Handle sets the current window to the parent window of frame display window;Specifically, by the window handle of the current window It is transferred to the frame display window, can thus set current window to the parent window of frame display window.
S103 joins according to the second window of frame display window described in the first window parameter setting of the current window Number;
In this step, according to the second window of frame display window described in the first window parameter setting of the current window Before parameter, the window call back function for getting the current window is also needed, each disappear can be monitored in window operational process Cease parameter.
After getting the window call back function of current window, according to the first window parameter setting of the current window Second window parameter of frame display window;
Specifically, the left pixel left, right pixel right, upper pixel top, lower pixel of the current window are obtained The width S HADOW_MARGIN that bottom and shade are shown;
The width int width of the frame display window is determined according to formula (1);
Int width=rect.right-rect.left+SHADOW_MARGIN*2 (1)
The height int height of the frame display window is determined further according to formula (2);
Int height=rect.bottom-rect.top+SHADOW_MARGIN*2 (2)
Wherein, the first window parameter includes: the left pixel left of the current window, right pixel right, upper pixel The width S HADOW_MARGIN that top, lower pixel bottom and shade are shown;Second window parameter includes: that the frame is aobvious Show the width and height of window.Certain second window parameter further include: the extension style of window, the finger for being directed toward registration class name Needle, the upright position for being directed toward the pointer of window name, window style, the horizontal position of window, window;These parameters use system Default.
S104 shows the frame display window based on second window parameter;Using preset rendering objects to institute Frame display window is stated once to be drawn;
After determining the second window parameter, it is based on second window parameter, the window explicit function of calling system is shown The frame display window.
Preset rendering objects are recycled once to draw the frame display window.It is specific as follows:
Create the unrelated bitmap structure body of DIB;Equipment relevant bitmap file is created using the unrelated bitmap structure body of the DIB, And save the bitmap handle of institute's bitmap file;The bitmap handle is added in the device object DC pre-established, with energy The pixel data of drafting is filled into the unrelated bitmap structure body of DIB when drawing.
It creates graphical device interface rendering objects (GDI+, Graphics Device Interface plus), it will be described DC is added in the rendering objects;Preset background picture is drawn using the rendering objects;By the institute after drafting Background picture is stated to render in the frame window;The frame window is placed in below the current window.
Here, the background picture by after drafting renders to the frame window, comprising:
The ratios such as the background picture are divided into nine grids;The corresponding picture in four angles of the nine grids is rendered to respectively In four apex angles of the frame window;The rendering of four frames of the nine grids is corresponding to the frame window respectively In frame, and by upper and lower side frame horizontal stretch, left and right side frame stretched vertically.Finally by the middle section of the nine grids fill to In the frame window.This completes a drawing process.
S105, calling layer window drafting function carry out secondary drafting to the frame display window after primary draw, more The frame display window after new secondary drafting;
But a drawing process is common drawing process, in order to make frame display window that gradual change be presented Effect also needs calling layer window drafting function to carry out secondary drafting to the frame display window after primary draw, specific to wrap It includes:
The layer window drafting function is called to draw device object DC into layer window, the DC is stored with the frame The secondary drawing data of display window;The secondary drawing data is pixel data.
After being updated in this way to frame display window, the frame display window is exactly transparent window, in window border Intersection can show the effect of gradual change.
Here, after the frame display window after the secondary drafting of update, further includes:
Using the message parameter in message loop function supervisory messages queue, judge whether the message parameter changes;? In the case that the message parameter changes, window call back function is called to handle the message parameter.
Specifically, audit window mobile messaging parameter WM_MOVE, when current window movement changes frame window Position, then call back function can then handle this message parameter, so that frame window is placed in the middle relative to current window always.And;
Audit window size message parameter WM_WM_SIZE;When the window size of the current window changes, then returning Letter of transfer number can then handle this message parameter, accordingly to change the size of frame window;And;
Audit window hides message parameter WM_WM_SIZE;When the current window is hidden, then call back function then can This message parameter is handled, with the abnormal current window;And
The update visual message parameter WM_PAINT of audit window;When the current window updates, call above-mentioned primary Drafting, secondary drafting and update method update the picture of the current window.
Frame window can thus be had adjusted in real time with the dynamic of real-time detection current window.
Embodiment two
Corresponding to embodiment one, the present embodiment also provides a kind of device for creating window border, as shown in Fig. 2, the dress Set includes: the first setting unit 21, the second setting unit 22, third setting unit 23, display unit 24 and drawing unit 25;Its In,
In order to avoid using the frame of current window, need to set Rimless for current window.In general, work as window When attribute is Rimless, the first setting unit 21 is with regard to setting Rimless window for current window according to the window attribute received Mouthful.
Second setting unit 22 is used to obtain the window handle of the current window, registers a frame display window, and The current window is set to based on the window handle parent window of frame display window;Specifically, described it will work as front window The window handle of mouth is transferred to the frame display window, can thus set current window to the father of frame display window Window.
Here, the second window parameter of the frame display window according to the first window parameter setting of the current window Before, acquiring unit 26 also needs to get the window call back function of the current window, can monitor in window operational process Each message parameter.
After getting the window call back function of current window, third setting unit 23 is according to the first window of the current window Second window parameter of frame display window described in mouth parameter setting;
Specifically, third setting unit 23 obtains the left pixel left of the current window, right pixel right, upper pixel The width S HADOW_MARGIN that top, lower pixel bottom and shade are shown;
The width int width of the frame display window is determined according to formula (1);
Int width=rect.right-rect.left+SHADOW_MARGIN*2 (1)
The height int height of the frame display window is determined further according to formula (2);
Int height=rect.bottom-rect.top+SHADOW_MARGIN*2 (2)
Wherein, the first window parameter includes: the left pixel left of the current window, right pixel right, upper pixel The width S HADOW_MARGIN that top, lower pixel bottom and shade are shown;Second window parameter includes: that the frame is aobvious Show the width and height of window.Certain second window parameter further include: the extension style of window, the finger for being directed toward registration class name Needle, the upright position for being directed toward the pointer of window name, window style, the horizontal position of window, window;These parameters use system Default.
After determining the second window parameter, display unit 24 is used to be based on second window parameter, the window of calling system Mouth explicit function shows the frame display window.
Drawing unit 25 is for once drawing the frame display window using preset rendering objects;Specifically such as Under:
Create the unrelated bitmap structure body of DIB;Equipment relevant bitmap file is created using the unrelated bitmap structure body of the DIB, And save the bitmap handle of institute's bitmap file;The bitmap handle is added in the device object DC pre-established, with energy The pixel data of drafting is filled into the unrelated bitmap structure body of DIB when drawing.
Graphical device interface rendering objects GDI+ is created, the DC is added in the rendering objects;Utilize the wash with watercolours Dye object draws preset background picture;The background picture after drafting is rendered in the frame window;It will The frame window is placed in below the current window.
Here, the background picture by after drafting renders to the frame window, comprising:
The ratios such as the background picture are divided into nine grids;The corresponding picture in four angles of the nine grids is rendered to respectively In four apex angles of the frame window;The rendering of four frames of the nine grids is corresponding to the frame window respectively In frame, and by upper and lower side frame horizontal stretch, left and right side frame stretched vertically.Finally by the middle section of the nine grids fill to In the frame window.This completes a drawing process.
But a drawing process is common drawing process, in order to make frame display window that gradual change be presented Effect, the drawing unit 25 also need calling layer window drafting function to carry out two to the frame display window after primary draw Secondary drafting, specifically includes:
The layer window drafting function is called to draw device object DC into layer window, the DC is stored with the frame The secondary drawing data of display window;The secondary drawing data is pixel data.
After being updated in this way to frame display window, the frame display window is exactly transparent window, in window border Intersection can show the effect of gradual change.
Here, after the frame display window after the secondary drafting of update, the monitoring unit 27 is used for:
Using the message parameter in message loop function supervisory messages queue, judge whether the message parameter changes;? In the case that the message parameter changes, window call back function is called to handle the message parameter.
Specifically, audit window mobile messaging parameter WM_MOVE, when current window movement changes frame window Position, then call back function can then handle this message parameter, so that frame window is placed in the middle relative to current window always.And;
Audit window size message parameter WM_WM_SIZE;When the window size of the current window changes, then returning Letter of transfer number can then handle this message parameter, accordingly to change the size of frame window;And;
Audit window hides message parameter WM_WM_SIZE;When the current window is hidden, then call back function then can This message parameter is handled, with the abnormal current window;And
The update visual message parameter WM_PAINT of audit window;When the current window updates, call above-mentioned primary Drafting, secondary drafting and update method update the picture of the current window.
Frame window can thus be had adjusted in real time with the dynamic of real-time detection current window.
Embodiment three
The present embodiment also provide it is a kind of for creating the computer equipment of window border, as shown in figure 3, the computer is set Standby includes: radio frequency (Radio Frequency, RF) circuit 310, memory 320, input unit 330, display unit 340, audio The components such as circuit 350, WiFi module 360, processor 370 and power supply 380.It will be understood by those skilled in the art that in Fig. 3 The computer equipment structure shown does not constitute the restriction to computer equipment, may include than illustrating more or fewer portions Part perhaps combines certain components or different component layouts.
It is specifically introduced below with reference to each component parts of the Fig. 3 to computer equipment:
RF circuit 310 can be used for sending and receiving for signal, particularly, after the downlink information of base station is received, to processing The processing of device 370.In general, RF circuit 310 includes but is not limited at least one amplifier, transceiver, coupler, low noise amplification Device (Low Noise Amplifier, LNA), duplexer etc..
Memory 320 can be used for storing software program and module, and processor 370 is stored in memory 320 by operation Software program and module, thereby executing the various function application and data processing of computer equipment.Memory 320 can be led It to include storing program area and storage data area, wherein storing program area can be needed for storage program area, at least one function Application program etc.;Storage data area, which can be stored, uses created data etc. according to computer equipment.In addition, memory 320 May include high-speed random access memory, can also include nonvolatile memory, a for example, at least disk memory, Flush memory device or other volatile solid-state parts.
Input unit 330 can be used for receiving the number or character information of input, and generate the user with computer equipment Setting and the related key signals input of function control.Specifically, input unit 330 may include keyboard 331 and other inputs Equipment 332.Keyboard 331 collects the input operation of user on it, and drives corresponding connection according to preset formula Device.Keyboard 331 gives processor 370 after collecting output information again.In addition to keyboard 331, input unit 330 can also include Other input equipments 332.Specifically, other input equipments 332 can include but is not limited to touch panel, function key (such as sound Measure control button, switch key etc.), trace ball, mouse, one of operating stick etc. or a variety of.
Display unit 340 can be used for showing information input by user or the information and computer equipment that are supplied to user Various menus.Display unit 340 may include display panel 341, optionally, can use liquid crystal display (Liquid Crystal Display, LCD), the forms such as Organic Light Emitting Diode (OrganicLight-Emitting Diode, OLED) come Configure display panel 341.Further, keyboard 331 can cover display panel 341, when keyboard 331 detect on it or near Touch operation after, send processor 370 to determine the type of touch event, be followed by subsequent processing device 370 according to incoming event Type provides corresponding visual output on display panel 341.Although keyboard 331 and display panel 341 are as two in Fig. 3 A independent component realizes the input and input function of computer equipment, but in some embodiments it is possible to by keyboard 331 It is integrated with display panel 341 and that realizes computer equipment output and input function.
Voicefrequency circuit 350, loudspeaker 351, microphone 352 can provide the audio interface between user and computer equipment. Electric signal after the audio data received conversion can be transferred to loudspeaker 351, be converted by loudspeaker 351 by voicefrequency circuit 350 For voice signal output;
WiFi belongs to short range wireless transmission technology, and computer equipment can help user to receive and dispatch by WiFi module 360 Email, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 3 WiFi module 360 is shown, but it is understood that, and it is not belonging to must be configured into for computer equipment, it completely can root It is omitted within the scope of not changing the essence of the invention according to needs.
Processor 370 is the control centre of computer equipment, utilizes various interfaces and the entire computer equipment of connection Various pieces, by running or execute the software program and/or module that are stored in memory 320, and call and be stored in Data in memory 320 execute the various functions and processing data of computer equipment, to carry out to computer equipment whole Monitoring.Optionally, processor 370 may include one or more processing units;Preferably, processor 370 can be integrated using processing Device, wherein the main processing operation system of application processor, user interface and application program etc..
Computer equipment further includes the power supply 380 (such as power supply adaptor) powered to all parts, it is preferred that power supply can With logically contiguous by power-supply management system and processor 370.
The method, apparatus and computer equipment energy bring beneficial effect of creation window border provided in an embodiment of the present invention At least:
The embodiment of the invention provides a kind of method, apparatus and computer equipment for creating window border, apply and are being broadcast live In platform, which comprises set Rimless window for current window according to the window attribute received;Work as described in acquisition The window handle of front window sets pre-registered frame display window for the current window based on the window handle Parent window;According to the second window parameter of frame display window described in the first window parameter setting of the current window;It is based on Second window parameter shows the frame display window;The frame display window is carried out using preset rendering objects It is primary to draw;Calling layer window drafting function carries out secondary drafting to the frame display window after primary draw, and updates two The frame display window after secondary drafting;In this way, by a frame display window registered in advance, then setting current window It is set to the parent window of frame display window, when current window is placed on the frame display window, frame display window can To become the frame of the current window;Then calling layer window drafting function is to the frame display window after primary draw Secondary drafting is carried out, so that the effect of gradual change is presented in frame display window, it is too lofty to avoid window intersection appearance in this way Situation, and then improve the aesthetics of window.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments in this include institute in other embodiments Including certain features rather than other feature, but the combination of the feature of different embodiment means in the scope of the present invention Within and form different embodiments.For example, in the following claims, embodiment claimed it is any it One can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP, Digital SignalProcessing) Lai Shixian are implemented according to the present invention The some or all functions of the gateway of example, proxy server, some or all components in system.The present invention can also be real Now for for executing some or all device or device programs of method as described herein (for example, computer journey Sequence and computer program product).It is such to realize that program of the invention can store on computer readable storage medium, or It may be in the form of one or more signals.Such signal can be downloaded from an internet website to obtain, or carry It provides, or is provided in any other form on body signal;The program performs the steps of when being executed by processor according to reception To window attribute set Rimless window for current window;The window handle of the current window is obtained, the window is based on Mouth handle sets the current window to the parent window of pre-registered frame display window;According to the of the current window The second window parameter of the frame display window is arranged in one window parameter;The frame is shown based on second window parameter Display window;The frame display window is once drawn using preset rendering objects;Calling layer window drafting function Secondary drafting is carried out to the frame display window after primary draw, the frame display window after updating secondary drafting.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention, it is all Made any modifications, equivalent replacements, and improvements etc. within the spirit and principles in the present invention, should be included in protection of the invention Within the scope of.

Claims (10)

1. a kind of method for creating window border, which is characterized in that apply in live streaming platform, which comprises
Rimless window is set by current window according to the window attribute received;
The window handle for obtaining the current window sets pre-registered for the current window based on the window handle The parent window of frame display window;
According to the second window parameter of frame display window described in the first window parameter setting of the current window;
The frame display window is shown based on second window parameter;
The frame display window is once drawn using preset rendering objects;
Calling layer window drafting function carries out secondary drafting to the frame display window after primary draw, and updates secondary drafting The frame display window afterwards.
2. the method as described in claim 1, which is characterized in that the first window parameter setting according to the current window Second window parameter of the frame display window, comprising:
Left pixel left, right pixel right, upper pixel top, lower pixel bottom and the shade for obtaining the current window are shown Width S HADOW_MARGIN;
The frame display window is determined according to formula int width=rect.right-rect.left+SHADOW_MARGIN*2 The width of mouth;
Determine that the frame is shown according to formula int height=rect.bottom-rect.top+SHADOW_MARGIN*2 The height of window;Wherein, the first window parameter include: the left pixel left of the current window, right pixel right, on The width S HADOW_MARGIN that pixel top, lower pixel bottom and shade are shown;Second window parameter includes: the side The width and height of frame display window.
3. the method as described in claim 1, which is characterized in that described to utilize preset rendering objects to the frame display window Mouth is drawn, comprising:
Create the unrelated bitmap structure body of DIB;
Equipment relevant bitmap file is created using the unrelated bitmap structure body of the DIB, and saves the bitmap sentence of institute's bitmap file Handle;
The bitmap handle is added in the device object DC pre-established;
Graphical device interface rendering objects are created, the DC is added in the rendering objects;
Preset background picture is drawn using the rendering objects;
The background picture after drafting is rendered in the frame window;
The frame window is placed in below the current window.
4. method as claimed in claim 3, which is characterized in that the background picture by after drafting renders to the side Frame window, comprising:
The ratios such as the background picture are divided into nine grids;
The corresponding picture in four angles of the nine grids is rendered to respectively in four apex angles of the frame window;
By four frames rendering of the nine grids respectively into the corresponding frame of the frame window;
The middle section of the nine grids is filled into the frame window.
5. the method as described in claim 1, which is characterized in that the calling layer window drafting function is to the institute after primary draw It states frame display window and carries out secondary drafting, comprising:
The layer window drafting function is called to draw device object DC into layer window, the DC is stored with the frame and shows The secondary drawing data of window.
6. the method as described in claim 1, which is characterized in that the frame display window updated after secondary drafting Afterwards, further includes:
Using message parameter in message loop function supervisory messages queue, judge whether the message parameter changes;
In the case where the message parameter changes, window call back function is called to handle the message parameter.
7. a kind of device for creating window border, which is characterized in that described device includes:
First setting unit, for setting Rimless window for current window according to the window attribute received;
Second setting unit described will work as front window based on the window handle for obtaining the window handle of the current window Mouth is set as the parent window of pre-registered frame display window;
Third setting unit, second for frame display window described in the first window parameter setting according to the current window Window parameter;
Display unit, for showing the frame display window based on second window parameter;
Drawing unit, for once being drawn using preset rendering objects to the frame display window;
Calling layer window drafting function carries out secondary drafting to the frame display window after primary draw, and updates secondary drafting The frame display window afterwards.
8. device as claimed in claim 7, which is characterized in that the third setting unit is specifically used for:
Left pixel left, right pixel right, upper pixel top, lower pixel bottom and the shade for obtaining the current window are shown Width S HADOW_MARGIN;
The frame display window is determined according to formula int width=rect.right-rect.left+SHADOW_MARGIN*2 The width of mouth;
Determine that the frame is shown according to formula int height=rect.bottom-rect.top+SHADOW_MARGIN*2 The height of window;Wherein, the first window parameter include: the left pixel left of the current window, right pixel right, on The width S HADOW_MARGIN that pixel top, lower pixel bottom and shade are shown;Second window parameter includes: the side The width and height of frame display window.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor It is performed the steps of when row
Rimless window is set by current window according to the window attribute received;
The window handle for obtaining the current window sets pre-registered for the current window based on the window handle The parent window of frame display window;
According to the second window parameter of frame display window described in the first window parameter setting of the current window;
The frame display window is shown based on second window parameter;
The frame display window is once drawn using preset rendering objects;
Calling layer window drafting function carries out secondary drafting to the frame display window after primary draw, and updates secondary drafting The frame display window afterwards.
10. a kind of for creating the computer equipment of window border characterized by comprising
At least one processor;And
At least one processor being connect with the processor communication, wherein
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to instruct energy Enough methods executed as described in claim 1 to 6 is any.
CN201810027602.4A 2018-01-11 2018-01-11 A kind of method, apparatus and computer equipment creating window border Pending CN110032372A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810027602.4A CN110032372A (en) 2018-01-11 2018-01-11 A kind of method, apparatus and computer equipment creating window border

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810027602.4A CN110032372A (en) 2018-01-11 2018-01-11 A kind of method, apparatus and computer equipment creating window border

Publications (1)

Publication Number Publication Date
CN110032372A true CN110032372A (en) 2019-07-19

Family

ID=67234340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810027602.4A Pending CN110032372A (en) 2018-01-11 2018-01-11 A kind of method, apparatus and computer equipment creating window border

Country Status (1)

Country Link
CN (1) CN110032372A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473077A (en) * 2013-09-27 2013-12-25 珠海市君天电子科技有限公司 Method and device for enriching display interface of main window of application program
CN105468674A (en) * 2015-11-12 2016-04-06 珠海市君天电子科技有限公司 Window interception method and device and terminal equipment
CN105930037A (en) * 2016-06-12 2016-09-07 广州视睿电子科技有限公司 Window border shade display method and device
CN106020591A (en) * 2016-05-10 2016-10-12 上海青研信息技术有限公司 Eye-control widow movement technology capable of achieving human-computer interaction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473077A (en) * 2013-09-27 2013-12-25 珠海市君天电子科技有限公司 Method and device for enriching display interface of main window of application program
CN105468674A (en) * 2015-11-12 2016-04-06 珠海市君天电子科技有限公司 Window interception method and device and terminal equipment
CN106020591A (en) * 2016-05-10 2016-10-12 上海青研信息技术有限公司 Eye-control widow movement technology capable of achieving human-computer interaction
CN105930037A (en) * 2016-06-12 2016-09-07 广州视睿电子科技有限公司 Window border shade display method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
AHYSWANG: "QT 9宫格实现窗口阴影", 《HTTPS://BLOG.CSDN.NET/AHYSWANG/ARTICLE/DETAILS/41476343》 *

Similar Documents

Publication Publication Date Title
CN104978115B (en) Content display method and device
CN104462119B (en) Data migration method and device
CN104252341B (en) The client device of the skin change method of application program, device and application program
CN105363201B (en) The display methods and device of prompt message
CN106933525B (en) A kind of method and apparatus showing image
CN103702297B (en) Short message enhancement, apparatus and system
CN106293375B (en) A kind of method for changing scenes and equipment
CN104915091B (en) A kind of method and apparatus for the prompt information that Shows Status Bar
CN104077184B (en) A kind of course control method and computer system of application program
CN104965642B (en) Drop-down list generation method and device
CN105302427B (en) Image display method, device and electronic equipment
CN104424211B (en) A kind of dissemination method of the business datum based on microblogging, device and system
CN104869465B (en) video playing control method and device
CN107180444A (en) A kind of animation producing method, device, terminal and system
CN107995024A (en) A kind of device management method, device, server and storage medium
CN107995440A (en) A kind of video caption textures generation method and device
CN104820546B (en) Function information methods of exhibiting and device
CN109309752A (en) The method and device of mobile terminal and one-handed performance screen
CN106326072B (en) The method and mobile terminal of information processing
CN103677944B (en) A kind of method for making locking screen interface, device and terminal device
CN109151949A (en) Block method, mobile terminal and the storage medium of access abnormal network cell
CN105530222B (en) Connection method for building up between multiple terminals, device and system
CN109992337A (en) Webpage methods of exhibiting, device and storage medium
CN110413639A (en) Data check method and device, electronic equipment and computer readable storage medium
CN105094872B (en) A kind of method and apparatus showing web application

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190719

RJ01 Rejection of invention patent application after publication