Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, rightThe present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, andIt is not used in the restriction present invention.
It should be noted that for interface display method and dress preferably to provided by the invention based on Firefox OSIt sets and is illustrated, below taking a smart TV as an example, carry out the elaboration of specific embodiment, it is contemplated that following specificEmbodiment can also be applied to mobile phone, notebook, tablet computer, palm PC (Portable Digital Assistant,PDA), in navigation equipment or above equipment it is unmentioned other using the intelligent terminal of Firefox OS among.
Fig. 1 shows the implementation process of the interface display method provided in an embodiment of the present invention based on Firefox OS, in detailIt states as follows:
In S101, the call instruction to Firefox OS main menu is detected.
The main menu, also referred to as main screen (home screen), be gathered it is several in Firefox OSThe displaying list of application program and file, while the also access entrance as above-mentioned application program and file, in certain operationsIn system, main menu, which also can be used as an independent application program, to be existed.It, can be quick by main menu in smart televisionAccess the rendition list, input source, setting interface and the types of applications program of smart television.
Input mode to the call instruction of Firefox OS main menu includes but is not limited to: touch screen key-press input, remote controlDevice key-press input, physical keyboard key-press input or even voice input etc..The detection of call instruction is used and the call instructionThe corresponding detection means of input mode carry out, for example, inputted using remote controller key, then can by infrared communication, whenWhen detecting the infrared signal from remote controler, whether analyzes in the data of infrared signal transmitting comprising a prescribed coding, beIt then indicates to be pressed in remote controler for accessing the key (for example, " menu " key) of main menu, to the call instruction of main menuIt is detected;In another example call instruction is inputted using voice, then detect whether call instruction inputs by speech recognition.Detection means corresponding with other input modes does not illustrate one by one herein.
In S102, according to the call instruction, main menu operation interface is rendered on Firefox OS current interface.
Wherein, the Firefox OS current interface can be the operation interface of application program in Firefox OS, orPerson can also be the television image that transmitting is played out by CHINA RFTCOM Co Ltd signal in smart television.
In the present embodiment, to the load of main menu operation interface by the way of superposition rendering, that is, maintain FirefoxThe normal operation of the corresponding application program of OS current interface or television image, but one is created newly on direct interface in this priorFigure layer, for rendering main menu operation interface, thus realize two figure layers while show.Complete main menu operation interfaceRendering after, where the operation focus of entire Firefox OS is located in main menu operation interface on figure layer.
As an embodiment of the present invention, main menu operation interface can be a degree of transparence display, such as Fig. 2 instituteShow, S102 specifically:
In S201, preset transparency is obtained.
The transparency be 0~100% between some value, transparency show for indicating figure layer, and when thoroughlyWhen lightness is 0, entire figure layer is completely opaque, and when transparency is 100%, entire figure layer is fully transparent, and concealment effect is presented.
In S202, the preset transparency is set by the figure layer being located on Firefox OS current interface.
In S203, the main menu operation interface is rendered in the figure layer.
After being provided with transparency to figure layer, the interface rendered in the figure layer will also be shown according to the transparencyShow, therefore, certain transparent effect can be presented in the main menu operation interface rendered by the above method, will not look into userThe original interface for seeing or watching Firefox OS has an impact, and the TV of broadcasting and TV signal transmitting is especially played in smart televisionWhen picture, or when playing video pictures by video software, the appearance of main menu operation interface does not interfere with useThe viewing progress at family, user can watch program on one side, play out effect setting by main menu on one side, system message is checkedDeng operation.
As another embodiment of the present invention, the display of main menu operation interface can only occupy part of screen position, such asShown in Fig. 3, S102 specifically:
In S301, preset display size and display position are obtained, the display size is less than screen size.
The display size is less than screen size, i.e. the resolution ratio of display area is less than screen resolution, for example, display rulerVery little is 800*600, and screen resolution is 1027*768, in another example, the height of display size only accounts for screen size height30%, the width of display size occupies the 100% of screen size, and display area only occupies part of screen in display as a result,Position.
In S302, the display position is positioned in the figure layer on Firefox OS current interface.
In S303, the main menu operation interface of the display size size is rendered in the display position.
After display size and display position has been determined, main menu operation interface is rendered, the above method is passed throughThe main menu operation interface rendered can only occupy part of screen position, be reduced as far as checking user or watchingIt is influenced caused by original interface of Firefox OS, the television image of broadcasting and TV signal transmitting is especially played in smart televisionWhen, or when playing video pictures by video software, the appearance of main menu operation interface can be reduced largelyInterference to user's watching behavior, user can watch program on one side, play out effect setting, system by main menu on one sideMessage such as checks at the operation.
In addition, as an embodiment of the present invention, above-mentioned main menu operation interface can be with the window that movably floatsMouth exists, and display position can be adjusted at any time according to user demand, for example, main menu operation interface is dragged upwards,So that its subtitle for not blocking video pictures, guarantees the integrality of video information transmitting.
S101 and S102 in Fig. 1 describe the case where changing interface to main menu operation interface of Firefox OS, onState the operation for not being related to being closed in step to the running application program of Firefox OS, it is only necessary to complete entree single operationThe rendering at interface undoubtedly accelerates the display speed of main menu operation interface, improves operating efficiency.
And following S103 and S104, the interface to Firefox OS is switched into application program behaviour by main menu operation interfaceThe process for making interface is illustrated:
In S103, according to the different operation of the instruction execution detected, the acquisition of described instruction is that friendship can be passed throughMutual operational order menu detection and obtain user.
It is hidden when detecting the enabled instruction to the first application program in the main menu operation interface in S104The current interface and the main menu operation interface are hidden, the operation interface of first application program is rendered.
Wherein, first application program is to be not currently in the application program of Firefox OS front stage operation, including do not openDynamic application program or the application program in Firefox OS running background.
In the present embodiment, main menu operation interface opens up mounted application program in Firefox OS one by oneShow, when user needs to open wherein a certain application program, by switching the operation focus of Firefox OS to the application programIcon on, control Firefox OS executes the start-up operation of the application program, at the same time, currently on the foreground Firefox OSThe application program operation interface and main menu operation interface of operation are hidden, and the operation interface of the application program started is by wash with watercoloursDye, is shown among screen.
As an embodiment of the present invention, among the above-mentioned realization process of S104, work as if Firefox OS is hidingFront interface is the behaviour of some application program (hereinafter referred to as the second application program, to be distinguished with above-mentioned first application program)Make interface, then while its operation interface is hidden, the second application program is also switched to the running background of Firefox OS,And as shown in figure 4, after S104, this method further include:
S106 loads described when rendering the main menu operation interface again in the main menu operation interfaceThe icon of two application programs.
That is, Firefox OS is detecting the call instruction to main menu next time, main menu operation interface is carried out againWhen secondary rendering, the icon of second application program can be loaded in the main menu operation interface, it is preferable that the last time is cutShift to the second application program of running background icon be displayed on main menu operation interface displaying all icons in firstIt is a, on the one hand remind user's application program still in running background, on the other hand user also to be facilitated to be called the software.
As an embodiment of the present invention, in the operation interface render process to the first application program, FirefoxWhether OS can first determine first application program in running background, if first application program is transported on backstageRow, then no longer execute the start-up operation of first application program, and only carries out the operation interface rendering of first application program.The above process can be realized by the way to manage of application program stack, in the application program stack, the application journey that starts at firstSequence first pushes on, and pushes on after the application program started afterwards, and the application program of stack top be currently in the application program of front stage operation,Firefox OS needs render the operation interface of the application program, rather than the application program of stack top is running backgroundApplication program.Firefox OS needs to monitor the activity of application program, monitors content and includes at least following three: " woundBuild program process ", " front stage operation program process ", and " terminating program process ", specifically:
1, when listening to " creation program process " message about a certain application program, then the application program is putEnter application program stack to be managed.In the application program stack, the newest application program to push on is placed on stack top, and is placed onThe application program of stack top is currently in the application program of front stage operation, and Firefox OS needs the operation interface to the application programIt is rendered.
2, when listening to " front stage operation program process " message about a certain application program, inquiry application firstThe application program whether is had existed in program stack, then the application program is deployed to stack top if it exists, then Firefox OSIt needs to switch to the application program in front stage operation, while the operation interface of the application program is rendered.
3, clear from application program stack when listening to " terminating program process " message about a certain application programExcept the relevant information of the application program, then at this point, the application program is closed, do not run on the foreground of system and backstage.
When by application program stack to be managed to application program, main menu can also be used as an application program,It is placed in application program stack and is managed collectively, when calling main menu every time, main menu is placed to application program stackStack top, and when hiding main menu, main menu is to be placed to the stack bottom of application program stack.
If the first application program is inactive application program, the application program in main menu operation interface is being clickedAfter icon, the resource informations such as style sheet, picture, the font of the application program are obtained.Above-mentioned resource information is pre-stored withinIn the database of Firefox OS, the resource letter for all application programs installed in Firefox OS is stored in the databaseBreath, is inquired, it can get the executable file of application program in the database by the unique identification of application programPath needs the resource informations such as picture resource to be loaded, the code logic needed to be implemented, and is carried out according to these information using journeyThe starting of sequence and operation interface rendering.
In S105, when detecting the out code to the main menu, the main menu operation interface is hidden.
In the present embodiment, if only detect the out code to main menu operation interface, main menu is directly hiddenOperation interface, then original rendering just directly displays out at the interface where main menu operation interface under figure layer, and no longerIt needs by closing and restarting and the process that renders again.
In embodiments of the present invention, it the rendering to interface and hides and can be realized by establishing frame tags, withFor firefox OSFirefox OS by HTML5 exploitation, specifically, as shown in Figure 5:
In S501, when Firefox OS starting, frame label is created in html file.
The iframe label of each application program and main menu that the frame label of foundation is shown after being used to accommodate,During the creation of frame label, need to be arranged the percentage of screen width occupied by its frame width and height and height,Simultaneously also need that the attributes such as its background color are arranged.
In S502, when application program launching, adds in frame label and marked about the iframe of the application programLabel.
Meanwhile needing to specify the frametype of the iframe label is " window ", and specifies the iframe labelOrigin is the origin of the application program.Specific code sample is as follows:
This.frame=this.element;
This.iframe=this.browser.element;
This.iframe.dataset.frameType='window';
This.iframe.dataset.frameOrigin=this.origin;
In S503, the operation interface of the application program is shown by js rendering engine.
In S504, when the application program switchs to running background, the application program is set in frame labelIframe label is hidden state, is hidden with realizing to the application program operation interface.
In S505, when the application program is moved to end, the iframe mark of the application program is deleted in frame labelLabel.
Wherein, S505 can be executed after the S504, when S505 is executed after S504, application program as backstage intoJourney is moved to end;Meanwhile as a kind of situation unshowned in Fig. 5, S505 can also be executed after S503, when S505 is in S503When executing later, application program is moved to end as foreground process.
Equally, by taking the Firefox OS developed by HTML5 as an example, in embodiments of the present invention, to the figure of display interfaceLayer is arranged can be realized by the zIndex attribute of html document object model (Document Object Model, DOM),Specifically:
Position of one location element in z-axis is set using zIndex attribute, wherein z-axis is defined as vertically prolongingThe axis of viewing area is extended to, if value of the location element in z-axis is bigger, shows the figure layer of user nearest from top,If value of the location element in z-axis is smaller, show the figure layer of user farthest from top, thus indicates different figuresThe stacking order of layer.
For the embodiment of the present invention, the application program behaviour of application program stack stack top can be set in zindex.css fileValue of the figure layer in z-axis is 5 where making interface, and the value of figure layer is also 5 where movable main menu operation interface, main menuThe value of figure layer where opening and closing shown animation is 5, the application program of non-main menu animation shown when openingThe value of place figure layer is 4, and the value of figure layer is 3 where when closing application program of non-main menu shown animation, applicationThe value of figure layer is 2 where the application program operation interface at program stack stack bottom, and the parent window interface of all application programs (can manageSolution is the background of entire Firefox OS) where the value of figure layer be 1, inactive main menu operation interface place figure layer takesValue is 0.
The operation interface of Firefox OS main menu is rendered the institute in Firefox OS current interface by the embodiment of the present inventionOn figure layer, and hiding by interface, so that when switching display of the system between executing application and main menu, nothingIt need to be related to the closing and restarting of application program, reduce the operation response time that system switches over display, improveThe operating efficiency of system.
Next, being based on by a concrete application scene based on smart television to provided in an embodiment of the present inventionThe interface display method of Firefox OS carries out further for example:
Under the application scenarios, as shown in Figure 6A, after starting smart television, show that DTV is drawn in smart televisionFace, and in the figure layer on the television image, what is rendered first is main menu operation interface, and the operation of Firefox OSFocus is on the main menu operation interface.The main menu operation interface can (non-font component or not operation be pressed for backgroundButton part) transparence display, operation interface height occupy the 30% of entire screen height, operation interface width occupies entire screenThe 100% of width, and application program image is marked in the operation interface that horizontal display can be presented.At this point, if user is not desired to openApplication program can then press " menu " key on remote controler, close main menu operation interface, continue to watch DTV;If user wants to open application program 1 therein, by remote controller operation, the operation focus of Firefox OS is moved on into hopeOn the application program 1 of opening, press " OK " key on remote controler, at this point, Firefox OS close digital TV picture andMain menu operation interface renders the operation interface of application program 1 as shown in Figure 6B.
On the basis for the operation interface that Fig. 6 B is shown, if user wishes to open application program 2, it need to only press again" menu " key on remote controler, at this point, as shown in Figure 6 C, the operation interface of application program 1 originally is not closed, andIt is to continue with display, on the operation interface of application program 1, has rendered main menu operation interface again, Firefox OS'sOperation focus has been located on main menu operation interface, then user is burnt by the operation of Firefox OS by remote controller operationPoint moves on on application program 2, presses " OK " key on remote controler, at this point, Firefox OS closes the operation of application program 1Interface and main menu operation interface render the operation interface of application program 2 as shown in Figure 6 D.
Fig. 7 shows the structural block diagram of the interface display apparatus provided in an embodiment of the present invention based on Firefox OS, shouldDevice can be run among Firefox OS, for realizing described in Fig. 1 of the present invention to Fig. 6 embodiment based on Firefox OSInterface display method.For ease of description, only the parts related to this embodiment are shown.
Referring to Fig. 7, which includes:
Detection unit 71 detects the call instruction to Firefox OS main menu.
Rendering unit 72 renders entree single operation circle according to the call instruction on Firefox OS current interfaceFace.
Judging unit 73, according to the different operation of the instruction execution detected, the acquisition of described instruction is to pass throughOperational order interactive menu detection and obtain user.
First display unit 74, when detecting the enabled instruction to the first application program in the main menu operation interfaceWhen, the current interface and the main menu operation interface are hidden, the operation interface of first application program is rendered.
Second display unit 75 hides entree single operation circle when detecting the out code to the main menuFace.
Optionally, the rendering unit 72 includes:
First obtains subelement, obtains preset transparency.
Subelement is set, sets the preset transparency for the figure layer being located on Firefox OS current interface.
First rendering subelement, renders the main menu operation interface in the figure layer.
Optionally, the rendering unit 72 includes:
Second obtains subelement, obtains preset display size and display position, and the display size is less than screen size.
Locator unit positions the display position in the figure layer on Firefox OS current interface.
Second rendering subelement, renders entree single operation circle of the display size size in the display positionFace.
Optionally, the current interface is the operation interface of the second application program,
Then described device further include:
Loading unit loads institute in the main menu operation interface when being loaded into the main menu operation interface againState the icon of the second application program.
Optionally, the main menu operation interface includes moveable floating frame.
The operation interface of Firefox OS main menu is rendered the institute in Firefox OS current interface by the embodiment of the present inventionOn figure layer, and hiding by interface, so that when switching display of the system between executing application and main menu, nothingIt need to be related to the closing and restarting of application program, reduce the operation response time that system switches over display, improveThe operating efficiency of system.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the inventionMade any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.