Linux GUI application development overview

Source: Internet
Author: User
Tags linux gui application development
Article title: Linux GUI application development overview. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
   Linux History
In 1991, Finnish college student Linus Torvalds wrote a small operating system kernel, the predecessor of Linux. Linus Torvalds became the father of Linux. Linus Torvalds released the source code of the Linux system on the Internet, so that the development of Linux has been fully supported by many computer experts. Linux continuously adds new features and improves stability. Now, Linux has become a very popular operating system.
Linux complies with the GPL protocol. That is to say, as long as you follow the GPL protocol, you can get its software and source code for free and modify it freely. However, for general users, it is very difficult to compile and install the Linux source code.
Therefore, some companies are involved in the Linux business. they package the Linux operating system and some important applications and provide a convenient installation interface. The products provided by these companies are generally referred to as the release version of Linux.
Currently, the following popular Linux versions are available:
RedHat-the most famous Linux service provider.
SlackWare-a long-history release version.
SUSE-it is well known in Europe.
TurboLinux-many users in Asia. The company's localization is doing well.
Debain-released version completely maintained by computer experts in the Linux community.
XteamLinux-Beijing surfing platform company released China's first Chinese version.
BluePoint-Chinese kernel technology is quite eye-catching.
Red-Flag Linux-released by the Chinese Emy of sciences software Institute and Peking University founder.
  
   Linux advantages
Linux has many advantages. The following lists the main advantages:
* Linux is a multi-task, multi-thread, and multi-user operating system.
* Linux has stable performance and powerful functions, which can be compared with commercial operating systems.
* Linux can adapt to many platforms. It can run on Intel's x86 computers and their compatible computers, Alpha computers, Apple and other computers. Linux can also run on many embedded devices.
* Applications on Linux are gradually increasing. Most applications developed for UNIX can run on Linux.
Linux can also run many DOS and Windows applications with the help of simulation software.
* Open source code is the biggest advantage of Linux. as long as you follow the GPL protocol, you can freely modify and crop Linux to meet your individual needs.
  
   Linux desktop environment
Linux has a set of easy-to-learn graphical user interfaces (GUI) that allow users to complete most of their work with the mouse. In Linux, the GUI consists of the window system, window manager, toolkit, and style. The window system is used to organize the graphic output on the display. the window manager is used to minimize window operations, such as window operations. The toolkit is the library used for programming interfaces, and the style is the user interface of the application.
Currently, Linux desktop environments mainly include KDE and Gnome.
The KDE (K Desktop Environment) Desktop Environment aims to provide an open-source graphic user interface and development Environment.
KDE once became the preferred desktop environment for many Linux versions. However, KDE is based on the QT library. Qt initially did not follow the GPL protocol. Therefore, building KDE on QT is a dangerous thing. it will depend on companies that develop QT libraries.
Therefore, later Linux releases added the Gnome main environment. Gnome is the abbreviation of GNU Network Object Model Environment (GNU, Network Object Model Environment. Gnome has developed rapidly and has become a powerful GUI application development framework that can run on any UNIX system.
Gnome uses the Gtk + Component Library, which is based on the LGPL protocol. The Gnome interface is similar to the KDE interface. users familiar with KDE can use Gnome without learning. Therefore, Gnome has become the preferred desktop environment for most Linux versions.
Gnome is an integrated desktop environment and an application development framework, which consists of many function libraries. Even if you do not run the Gnome desktop environment, applications written in Gnome can run, but these applications can be well integrated with the Gnome desktop environment. The Gnome development structure allows us to develop consistent and easy-to-use applications.
  
   Library used for development
Gtk + (GIMP ToolKit, GIMP ToolKit) Gtk + was originally used to develop GIMP and is a graphics library used to create graphical user interfaces. Gtk + is based on LGPL Authorization. Therefore, Gtk + can be used to develop free software for open source software or commercial non-free software.
Gtk + is created based on Gdk (GIMP Drawing Kit, GIMP Drawing package. Gdk is the packaging of Xlib functions. We generally use GTK to represent software packages and shared libraries, and Gtk + to represent the graphic component set of GTK.
Gtk + graphics library uses some objects called "components" to create GUI applications. It provides window, Button, frame, list box, combo box, tree, status bar, and many other components to build a rich user interface.
On the basis of the Gtk + graphics library component, some new components have been developed. these components are complementary to the Gtk + Component Library, which provide functions not available to many Gtk + components. These components are generally called Gnome components. Using Gnome components makes it easier to develop applications with consistent interfaces.
The core of Gnome's application development structure is a set of libraries written in C language, which provides the GnomeAPI interface for many languages, including Ada, Scheme, Python, Perl, Tom, Eiffel, and Dylan.
Gnome's development architecture includes the following:
  
1. non-Gnome Library
Gnome inherits some function libraries of free software. Some of these libraries are part of the Gnome Application development architecture, but are not part of the Gnome Library. These library functions can be used in the Gnome environment. There are mainly the following types:
Glib Library-Glib is the basis of Gnome. it is a C tool library that provides practical functions for creating and operating common data structures.
Gtk + library-Gtk + (abbreviated as GIMPToolkit) is a GUI toolkit used in Gnome applications. Gnome adds many other components based on the basic Gtk + component set.
ORBit Library-ORBit is a CORBA2.2ORB developed by C. Compared with other ORB, it is short, but fast, and supports C language ING. ORBit is implemented in a set of library functions.
The Imlib Library Imlib (image library) provides some routines, including loading, storage, and display, as well as the function for plotting various popular image formats (including GIF, JPEG, PNG, and TIFF.
  
2. Gnome Library
Libgnome Library-Libgnome is a collection of functions unrelated to graphic user interfaces. Gnome applications can call functions in it.
Libgnomeui Library-Libgnomeui contains GUI-related Gnome code. It consists of components designed to enhance and expand Gtk + functions. Libgnomeui mainly includes:
(1) the GnomeApp component is generally used to create a main window for an application.
(2) the GnomeCanvas component is used to compile custom components.
(3) Gnome built-in pixmap is used to create and use dialog box routines.
There are several other components in Libgnomeui, such as GnomeEntry and GnomeFilePicker.
Libgnorba Library-libgnorba provides the utility program related to CORBA.
  
3. other libraries
These libraries are generally used in Gnome applications, but they do not belong to Gnome-libs:
Gnome-print Library-Gnome-print provides a virtual output device, a piece of code can be output to a print preview component or PostScript file, and can be output to other printer formats.
Gnome-xml Library-Gnome-xml can analyze XML in a tree structure, and also output a tree structure according to XML.
The Guile Library Guile is the implementation of the Scheme programming language in a single library, which enables any application to carry an embedded Sheme interpreter.
Bonobo Library-Bonobo is an object embedded structure, similar to Microsoft's OLE.
  
   Programming languages and tools
The common development languages in Linux are C language, and many applications in Linux are written in C language. You can also use other languages. Because Gtk + and Gnome are written in C language, it is very convenient to use C language when developing GUI programs in Linux. Gtk + also provides interfaces with many other languages.
Generally, the C compiler gcc or egcs is provided in Linux versions. You can use gcc or egcs to compile C and C ++ source code. Various C compilers use some practical C functions. To ensure program portability, gcc uses a function library called glib instead of a common C function library. Glib is also the basis of Gtk +. It includes some replacement functions of standard functions and the implementation of basic data structures.
There are also many tools that can improve the programming efficiency in Linux. for example, gdb is an excellent C language debugger and has rich debugging commands. Automake and autoconf are used to configure compilation options by source code structure to generate the Makefile files required for compilation.
There are few GUI applications developed in Linux, such as visual and rapid application development tools on Windows. There are several developing RAD (Rapid Application Development) tools, such as The Glade-a GUI Generator we will introduce in the future, which can quickly generate the C source program for creating the interface.
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.