GUI software framework - windows server

GUI software framework

Figure 4 shows the levels of the GUI design software, the introduction of tiered will bring many benefits: [3]

Only focus on reducing the complexity of each layer need to implement their functions, to achieve high cohesion;

Whether to replace or increase the portability of the processor need only modify the underlying LCD portion;

Improve the performance of the use of efficient algorithms to optimize performance only need to modify one.

Figure 4 GUI software level

4.png

For lightweight embedded GUI, the window is very important vector graphics, embedded GUI usually only accommodate a screen of a window, the window currently being displayed is the active window, others are sleep window. Thus the window has two states:

Active phase: processing a message, a response action, such as access to real-time data and refresh the screen and so on;

Sleep: do not respond to external news release resources, such as hardware and software entities such as;

Logically the window system is divided into two layers: the window server and the client, as shown in FIG. External message (user key, update data, etc.) is first passed to the window server, the messaging server and then sent to the currently active window, the active window corresponding processing according to the message class; Further, the active window may also request to the server, such as switching window Wait.

FIG 5 window server and the client

5.png

In GUI design news is an important mechanism for the various objects of communication, type of communication between the many windows, if the message is encoded it? Figure 6 shows a reference method. The message is essentially a 32-bit integer, in fact, many messaging RTOS is this type. Take the lower 8 bits of the event code, 24 bits for the type encoding. [4]

Either type maximum support 256 events, only one type of coding is 1, otherwise it will cause the event to determine the error. When properly encoded, type must be an integer power of two, and therefore may be used to check the entire algorithm to detect a power of the message is correct.

 

http://www.21ic.com/embed/hardware/development/201804/51678.html

Guess you like

Origin www.cnblogs.com/feng9exe/p/12294073.html