GTK + used in Embedded Linux

Source: Internet
Author: User
Tags gtk
GTK +-general Linux technology-Linux programming and kernel information used in Embedded Linux operating systems. For details, refer to the following section. In Embedded Linux, there are many GUI systems, including Qt/Embedded, FLTK, Microwindows, and GTK +. What kind of GUI is used as a developer? How many changes do you make to transform a system to meet your needs? What is the size of the modified system? These are problems that developers may encounter. What we will discuss here is to make a detailed analysis of these contents. Through our discussion, you will have a definite understanding of GTK + and X-based GUI applications in embedded Linux.

  Body

With the development of embedded system applications, more and more applications need to use GUI for development to achieve better interaction.

GUI Selection in Embedded Linux is a trade-off process for most developers. Select GTK + to run on X system, and then run X system on the framebuffer embedded in the system. This is a good choice.

  Advantages of GTK + and X

Of course, GTK + and X are generally considered as good combinations of large desktop systems, but they also have many advantages for Embedded Systems:

1. The X-window system and GTK + are both very stable and reliable. The X-window system has undergone long-term development and application practices. GTK + is also a mature open source code project;

2. The X-window system is a flexible client/server model structure. The crash of an application client does not affect other parts of the graphics system. This is a very important feature, it is conducive to supporting third-party application extension development without affecting the main part;

3. GTK + has two important Libraries: GDK and GLIB. GDK abstracts the underlying window management. To port GTK + to another different window system, we only need to port GDK. GLIB is a collection of tools, including data types, various macro definitions, type conversion, and string processing. Any application can connect to this GLIB library and use various data types and methods, to avoid code duplication or developers re-invent the wheel, which helps reduce the size of the entire system;

4. Cropping GTK +/X is very easy. They have good configurable options and clear code structures, this ensures that you can safely and correctly remove unnecessary code segments;

5. GTK + has a large number of applications, and GTK + has been used in many important application systems;

6. GTK + authorization is LGPL, X is non-copyleft free license, and any third-party developed systems can be linked to them;

7. GTK +/X are both based on C code, rather than C ++;

8. GTK + uses C to implement the object-oriented architecture;

Other GUI Systems

Other available graphics systems include Qt/Embedded, FLTK, and Microwindows.

1. Qt/E is relatively advanced. It is a complete, framebuffer-based GUI system developed by Trolltech;

2. Qt/E has an efficient graphic rendering effect. It also includes the TrueType font system and alpha blending translucent processing;

3. However, Qt/E does not use the LGPL authorization method, but uses two authorization Methods: Development and Use of GPL, and commercial use requires authorization and royalty;

4. Qt/E is written in C ++;

5. Qt/E is very large. An iPAQ QPE includes a 3.3 MB Qt/E library and a kb QPE Library (similar to Xlib );

6. Qt/E is not stable enough. QPE demo is good, but it has crashed;

7. FLTK (the Fast Light Toolkit) is a small GUI graphics system written in C ++ with few features and a small application scope;

8. Compared with X-Window, Microwindows is also a good choice. It occupies approximately kb-600kb of memory and file storage space. Although there is a GTK + port on it, but it is not mature enough;

X-window: much smaller than you think

For the X-window system, the majority of network developers have done a lot of work to reduce its size, the most well-known is TinyX. You can crop unnecessary code and remove static data from XLIB to reduce the overall size, such as the color management system, arc shape, and rough lines.

Most developers think that X systems are huge, but what you hear is a misunderstanding of people who do not know X well. After cropping, GTK +/X is more effective than GTK +/FB and Qt/E, and XLIB provides better support for general applications, application Development will become more efficient.
Related Article

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.