Graphical user interface __linux for embedded Linux systems

Source: Internet
Author: User
Tags data structures message queue win32

Author: Mu Yu, huaqing visionary embedded college lecturer.

Today, in the design of embedded products graphical user interface, the use of the main tools are as follows:

1. qt/embedded

Qt is a cross-platform, C + + graphical interface application framework released by Trolltech Corporation. It is actually a class library, which includes a large number of reusable classes, including buttons, windows and other visible classes, as well as invisible classes such as timers and some abstract classes. QT is fully object-oriented, has good scalability and stability, and supports modular programming. We can make full use of QT high object-oriented and modular features, from the tedious X programming, focus on the content of the program itself, so that Linux window design is a very easy thing.

In Qt, communication between objects uses a method called signal and slot (Signal-slot), which is one of the important features of QT. In Ms-windows, the program transmits and triggers messages through message queues and message loops, and QT's signal and slot mechanism takes this approach: A class can define multiple signals and multiple slots, the signal is like an event, and the slot is the method of responding to the event, And not much different from the general member function. If you need to implement communication between them, you can implement event-driven by connecting the slots of a class with the signals of a class.

Qt/embedded is an embedded version of QT. Because Qt is a GUI library for projects such as KDE, there are many QT-based X window programs that can be easily ported to the qt/embedded version. As a result, since Qt/embedded was released under the GPL terms, a large number of embedded Linux developers have been transferred to the qt/embedded system. But the problem with qt/embedded is that it is too big, and although qt/embedded claims to be able to cut to at least 630K, the qt/embedded library has largely lost value. Qt/embedded Library is mainly aimed at handheld information terminals. Because of the lack of hardware acceleration support, it is difficult to apply to the graphics speed, function and efficiency of the high requirements of embedded systems, such as set-top boxes, game terminals.

2. Microwindows/nanox

Microwindows is an Open-source project hosted by the US Century Software Corporation. Microwindows can operate without any operating system or other graphics system support, and it can direct operations on bare devices. This microwindows is very small, easy to migrate to a variety of hardware and software systems. Microwindows is designed in a layered way so that users modify, subtract, and add to their needs. It is divided into three layers: the bottom layer is screen, mouse/touchpad, and keyboard drivers that deal directly with display and input hardware; the middle tier is a portable graphics engine layer that uses the lowest level of functionality available to finish drawing lines, area fills, text, polygons, area cropping , color and so on; the top layer is the API, provided to the graphical program call. Currently, these APIs support the WIN32 and Nanox interfaces. As a result, they are compatible with the Win32 and X window Windows systems, and it is much easier to migrate applications between these systems.

The main feature of this project is that it provides a client/server architecture similar to x and provides relatively complete graphics capabilities.

3. MiniGUI

Minigui is a free software project in China, currently, Minigui is responsible for the development of the Beijing flying Diffuse software company. Minigui has two different versions of the schema. The original Minigui runs on top of the Pthread library, which is suitable for single function embedded systems, but has drawbacks that are not robust enough for the system. In version 0.9.98, the Minigui-lite version was introduced, which allows applications to be created in different processes, but only one process can run at a time.

Minigui has the following characteristics:

(1) Micro client/server architecture: Because the Minigui client/server system is implemented in one process, it is called a Micro client/server architecture. In Minigui, there is a thread, that is, the server thread is responsible for maintaining a global list of Windows, while other threads cannot directly modify these global data structures. Rather, it is done by requesting a service pattern. For example, when a thread asks a desktop thread to create a window, it does so by sending a message to the desktop thread and then waiting for the desktop thread to do the same, and then notify the requesting thread by the desktop thread when it completes the requested task.

(2) Multi-threaded Windows: Minigui window includes: Main window, child window, dialog box, control. The main window of the Minigui corresponds to a separate thread, through function calls, to create the main window and the corresponding thread, each thread has a message queue, and all main windows belonging to the same thread get the message from this message queue and are processed by the registered window procedure.

(3) Message and message loop: Minigui is a typical message-driven system. Windows that have separate threads and message queues are in the message loop since they were created, reading messages in message queues, and processing messages until a specific message is received.

4. Opengui

Opengui has been on the Linux system for a long time. The initial name is FASTGL, which supports a variety of operating system platforms, such as MS-DOS, QNX, and Linux, but currently supports only x86 hardware platforms. Opengui is also divided into three layers. At the bottom is the fast graphics engine compiled by the assembly, the middle layer provides the graphical drawing API, including lines, rectangles, arcs, etc. the third tier is written in C + + and provides a complete set of GUI objects. Opengui is more suitable for real time system based on x86 platform, the portability is slightly poor, the current development is basically stagnant.

To sum up, the GUI system for embedded Linux has been developed for a long time, some are already more mature products, but also have been more widely used, such as qt/embedded is currently used in PDA and mobile products, Motorola's mobile phone products, launched in 2003, used qt/embedded. But Micorwindows and so on lightweight GUI system in the industrial control machine, the set-top box and so on product also can play its value.

Embedded and 3G related resources and learning please click: Embedded Development Video  android development video Android training  3g training QT training   QT Development Video   Things networking training   things networking technology video   embedded learning   

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.