Relationship between xlib, XT (x toolkit intrinsics), and QT

Source: Internet
Author: User
Tags gtk

Intrinsics, also known as XT or X toolkit, is the function library of X Window.

Intrinsics first provides an object-oriented programming architecture and introduces the concept of "widgets. Motif, openlook, and lesstif are based on XT. Athena toolkit is also derived from XT library.

However, some well-known toolboxes such as fltk, GTK, and QT do not use the XT library. Instead, xlib is used directly.

 

 

 

What is xlib?

 

The X library is the lowest level API of the X Window program. If compared with windows, xlib is the same as windows APIs (or Windows SDK, it is the programming interface closest to X server. It only provides the most basic plotting and message event processing.

 

 

What is XT? (X Toolkit Intrinsics)
XT is the first tool to package xlib into a more abstract library. It provides an "object-oriented" programming architecture and introduces a concept called "widget, this "widget" structure is called "User Interface componets" such as "Menus", "buttons", and "textbox" widgets. Since then, programmers will be able to use the concept of widgets to construct our applications, making them simple and easy to understand.
However, XT only defines how applications communicate with these widgets, and does not specify how long these widgets look. The real look of these widgets is finally handled by a higher-level library. (We usually provide the widgets function library, which is called GUI toolkit (x toolkits ).
Motif, openlook, and lesstif are all graphic interface libraries derived from the XT library.

 

Motif
Motif is currently the most important GUI toolkit. It is based on the XT widget concept and provides a graphical interface similar to Microsoft Windows 95. Motif is produced by Open Group (formerly called Open Software Foundation.
But now motif is not just a GUI toolkit, it also contains a motif Window Manager (Window Manager) used to manage X clients (x applications ).

 

 

What is gdk? 
Gdk is a basic encapsulation of standard xlib function calls (wrapper). If you are familiar with xlib, you do not need to re-familiarize yourself with the vast majority of gdk functions. all functions provide a convenient and intuitive style to access the xlib function library. in addition, since gdk uses glib on multiple platforms, gdk has become more convenient and secure.

What is glib?
The glib Library provides a series of functions and definitions, which are useful when designing gdk and GTK programs. it provides some replacement functions of Standard C functions library (Standard libc), such as malloc, but there are many problems when used in other systems.

What is GTK +?

GTK + is a small and efficient control library with Motif appearance and style. in fact, it looks much better than motif. It contains basic controls and complex controls, such as file selection, controls, and color selection controls. GTK + provides some unique features (at least, I know other control libraries do not provide them). For example, a button does not provide tags and contains a child control, in many cases, it is a label. However, this sub-control can also be a ing, image, or a set that any other programmer wants. you can see this scalability everywhere in the entire library.
The development infrastructure of gnome is centered around a set of function libraries. All content is written in the portable ansi c language and can be used in all UNIX-like systems, graph-related function libraries depend on the X Window System. The gnome function library is the highest level. GTK + consists of GTK and gdk. The GTK layer provides an object model for the C language and provides the most basic widgets for the UI toolkit. It is the basis for upper-layer GUI derivation. GTK depends on gdk, while gdk is an underlying packaging of xlib. The xlib library directly communicates with the X server. All parts except xlib are based on glib. It is a useful C function library that provides many utilities, portable functions, and a set of containers that are easy to use in C language.

I Gnome programs are hierarchies composed of multiple databases: 

 

Gnome (GNU network Object Model Environment) is a graphic interface library based on GTK. Like Kde, gnome aims to build a complete and friendly graphic use environment and provides gnome-related software.
Gnome libraries are at the highest level, including help routines, classes and special widgets, and provide an infrastructure for applications.
The second layer is GTK, which is part of the GTK + Library. This library provides basic toolkit and widgets to create GUI applications. Most guis are written directly using GTK. GTK also provides a powerful object system for the gnome library.
The next layer is gdk, which is simple to pack the X function library. It is used only when we perform special painting or set special properties of the window.
The bottom layer is glib, a utility library of C, including portability and some utility functions, as well as some container classes, such as linked lists, variable arrays, and variable-length strings, hash west table), cache, an event loop and other useful structures.

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.