GTK graphic interface programming in Linux

Source: Internet
Author: User
GTK graphic interface programming in Linux-general Linux technology-Linux programming and kernel information. The following is a detailed description. 【Abstract]This article introduces the Xwindow graphic window programming tool GTK on the Linux platform, and provides the basic elements and steps for GTK programming.

【Key words]GTK, callback function, message processor, Regulator

GTK (GIMP Toolkit) is an interface tool for graphic user programming. It registration is completely free of charge, so it does not need to spend anything to develop free software or commercial software. Now many Linux integrated systems have packaged GTK1.2. Including RedHat Linux 6.0 and later versions, as well as Turbo Linux in Chinese culture. It is more and more widely used in UNIX system programming.

Another component is Glib, which contains some new extensions of standard applications to improve the compatibility of GTK. Some functions used in Linux systems may not be suitable for standard UNIX systems, such as g_strerror () functions. Some functions also extend the general functions of GNUC. For example, the g_malloc function has its own enhanced debugging functions.

GTK can be bound to multiple languages, including C ++, Guile, Perl, Python, Ton, Ada95, Objective C, Free Pascal, and Eiffel. Compile the software using a program developed in Standard C. You can use GNU with the GTK option. To develop Xwindow Graphics User Programs in other languages than standard C, you need to first refer to the content of the software binding (HTTP: // www.gtk.org ). If you use the C ++ language to call GTK for development, you can use the software GTK, which has been bound to C ++, to provide a better C ++ compiling environment than GTK.

The enhanced GTK + version of GTK has been developed. GTK + is a development kit that integrates GTK, GDK, and GLIB. It can work on many UNIX-like systems without GTK platform restrictions.

1. GTK Message Processing Mechanism

Let's take a look at a basic example. This example generates a window of 200x200 pixels. It can only use shell to kill a process (call the kill command ).
QUOTE:

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.