【正文】
e consumption, and there are usually very little interaction between the graphical user interface and realtime control tasks in a embedded system, so the GUI in this paper is a single message queue architecture.The GUI system will initialize the message queue when beginning running to make it in a normal work state.2) Message cycle: when the windows, controls the application created have been pletely displayed on the screen, to enter the message loop waiting for input events, and the message cycle flow as shown in figure 4.Obtain messageMessage type discriminationMessage data analysisMessage data distributionWhether the message outENDYNFigure 4 message cycle flow chart3) Message distribution: after the messages removed from the message queue, they will be distributed to the corresponding window or control, to be responded by their message processing function.D. Desktop submoduleDesktop is a very important part of the GUI system, which is equivalent to a bottom window,all the main windows are covered on it, also it preserves many global operations in the GUI,such as the distribution of input messages;processing the impact of the main window addition, display,deletion, movement and other operations on the environment, and the pletion of the corresponding mapping operations through the distribution of the PAINT related news, calling the window module or GUI module functions. l) Window addition: when the user creating a main window in the calling system API, in addition to setting its own character attribute value, also the related system information will be changed, for example, there is overlapping relationship between the new main window and the existing main window, which will be related to the operation of the Z order list: and the new added main window will lead to the change of the existing main window cut information.2) Window deletion: in the GUI, it is often needed to delete a main window, for example, the dialog is occurred in the form of main window, so when it will be closed it should be deleted and users may have to independently remove a main window.The window module provides the function to delete the window through system calling, and ultimately sends MEG_REMOVEMAINWIN message to the desktop.To move a main window to the top laver.it needs to display the part originally covered by other windows, and then update the impact of the movement on other windows and system variables.3) Window display: window module provides system call a GUI window show function, when setting its mand parameter is SW_SHOW, a window originally could not see can be displayed. For the main window, it actually is to send a MSG_SHOWMAINWIN message to the desktop.4) Window movement: one of the basic requirements of the GUI system is that the window can be dragged so the window module provides a system call a GUI window show function to plete this function, and send MSG_SHOWMAINWIN message to the desktop.E. Initialization on submoduleIt is a basic GUI system module,and the beginning of each GUI operation will carry out set and initialization operations for the entire GUI environment parameters through the API function of this module.Initialization module only provides an overall GUI initialization function and a clearance function when terminating the GUI, thus the GUI entrance function can initialize the various pans of the GUI through calling a GUI initialization function ,to make the GUI work normally.The clearance function of GUI termination is responsible for the pletion of all relevant clearance work in the termination of the GUI.F. Timer submoduleTimer is a very important ponent of the GUI.When users need to timely process a certain operation it will be used, and also used in the system.Users must first set the timer before using it, and it in TJMER module is expressed by the data structure TIMER, Timer limit value refers to that when the recording value of the timer greater than it,it will send a MSGTIMER message to the window the timer belonged to.G. System performance testingThis paper only tests the event—driven response speed, the results as shown in table 1 and table 2.TABLE Ⅰ. WINDOWS EVENT RESPONSE SPEEDTest eventCreationFrequency(/s)DestructionFrequency(/s)Roll Frequency(/s)RefurbishmentFrequency(/s)MonochromeMulticolorTABLEⅡ. CONTROL EVENT RESPONSE SPEEDTest eventClick Frequency(/s)Text setFrequency(/s)RefurbishmentFrequency(/s)MonochromeMulticolorFrom the above it can be seen, pared with other embedded GUI systems,this system has better portability, preparation and customization, and the system resource consumption is fewer.IV.CONCLUSIONAt present, the study of the embedded Linux system is booming,and has occupied a lot of market share,but the GUI system based on embedded Linux system is in the development stage,there are many critical issues to be resolved.This paper designed an embedded Linuxbased graphical user interface design, and implemented it. The test results and analysis show that pared with other embedded GUI systems.this system has better portability,preparation and customization, and the system resource consumption is fewer, has a certain reference value for the development of similar software.REFERENCES[1].Keith Haviland, Dina Gray,Ben Salama. Unix System Programming(2nd Edition)Addison羅伊 Wesley , 2004 : 321323 . (第二版)艾迪 用戶在使用它之前必須先設(shè)置定時(shí)器,它由在TJMER模塊表示數(shù)據(jù)結(jié)構(gòu)定時(shí)器,定時(shí)器限值涉及到記錄定時(shí)器時(shí)比它更大值,它將發(fā)送一個(gè)MSGTIMER消息給所屬窗口的計(jì)時(shí)器。需要顯示其他窗口被遮住的部分,然后更新目標(biāo)窗口的