Графічні інтерфейси
Most applications will need to provide a graphical interface to interact with users. Graphical interfaces can create an intuitive and discoverable medium for people to interact with software, and users expect applications to provide usable and attractive user interfaces.
The GNOME Platform features sophisticated graphics and user interface technology, from standard user interface controls to an API for drawing high-quality graphics to the screen. Using the graphics technologies in GNOME allows you to create applications that are consistent, intuitive, and aesthetically pleasing.

3.1.1. GTK+
GTK+ is the primary library used to construct user interfaces in GNOME. It provides all the user interface controls, or widgets, used in a common graphical application. Its modern, object-oriented API allows you to construct attractive and sophisticated user interfaces without dealing with the low-level details of drawing and device interaction.
In addition to basic widgets, such as buttons, check boxes, and text entries, GTK+ also provides powerful Model-View-Controller (MVC) APIs for tree views, multi-line text fields, and menu and toolbar actions.
Widgets in GTK+ are placed on windows using a box-packing model. Programmers specify only how to pack widgets together in container boxes, rather than position them directly with absolute coordinates. GTK+ ensures that windows are sized correctly to fit their contents, and it automatically handles window resizing.
Because GTK+ offers a flexible API, developing additional widgets for use in GTK+ applications is easy. A number of third-party libraries exist which provide additional widgets, and many developers have created custom, special-purpose widgets for their applications.
GTK+ handles the difficult details of user interfaces and user interaction, and provides a simple yet powerful API which allows you to focus on the details of your application. Applications developed with GTK+ will automatically follow the user's theme and font settings, will interact properly with accessibility technologies, and will behave as users expect.
For more information on GTK+, see the GTK+ Reference Manual or visit the GTK+ web site.
3.1.2. Libglade
Note that Libglade has been deprecated in favor of GtkBuilder. Newly written code should use GtkBuilder instead.
Libglade is a library for constructing user interfaces dynamically from XML descriptions. You can use a graphical interface builder like Glade to construct your user interface, and then import the interface description into your application. This makes it easy to construct complex layouts and adjust layout details.
Libglade allows programmers to focus their code on the logic of their applications, keeping it uncluttered by the actual construction of the interface. Graphical interface builders also make it easy for dedicated interface designers to construct the interfaces without having to know how to program.
For more information on Libglade, see the Libglade Reference Manual.
3.1.3. Pango
Pango is the core text and font handling library in the GNOME platform. It is responsible for laying out and rendering text, and is used throughout GTK+.1
Pango has extensive support for the various writing systems used throughout the world. Many of the writing systems used for languages have complex rules for laying out glyphs and composing characters. With Pango, nearly all languages can be written and displayed correctly, allowing users everywhere to view text in their native languages. Pango support for multiple writing systems is automatic; application developers do not have to write any special code to support other languages.

Pango supports the text styling used in typical documents and interfaces, including italics, font weights, and underlines. Pango uses a simple XML-like vocabulary called PangoMarkup which enables you to set font size, color, styles, and other text attributes. Using PangoMarkup, you can specify inline styles without manually iterating over text blocks. PangoMarkup can be used directly from GTK+, enabling you to style text in your graphical interfaces easily.
You should use Pango directly whenever you need to lay text out on the screen or on a different medium. Using Pango will allow your text layout to work seamlessly with GTK+ and the rest of the GNOME platform. It will help you create portable code, and most importantly, it will ensure that your application can render text correctly in hundreds of different languages.
Докладну інформацію про Pango наведено у Посібнику з Pango.
3.1.4. GDK
GDK is the low-level library used by GTK+ to interact with the system for graphics and input devices. Although you will rarely use GDK directly in application code, it contains all the necessary functionality to draw objects and text to the screen and to interact with the user with various input devices.2
GDK features a graphics context and drawing primitives that are suitable for drawing simple objects and rendering images on the screen. Since a more extensive drawing system is provided by Cairo, GDK provides hooks to use Cairo contexts within GDK.
GDK enables you to access events from keyboards, mice, and other input devices, rather than connect to the high-level signals used in GTK+. GDK also provides low-level routines to access drag and drop and clipboard data from the system. When implementing custom controls, you may need to access these features to implement proper user interaction behavior.
GDK provides other functionality which is needed to implement a complete graphical toolkit like GTK+. Since GDK acts as a platform abstraction, allowing GTK+ to run under multiple environments, it provides an API for all of the system functionality needed by GTK+. This includes information about multi-head displays, resolution and color depth, colormaps, and cursors.
You should use GDK whenever you need low-level access to the underlying windowing system, including low-level access to events, windows, and the clipboard. Using GDK for these tasks ensures that your code is portable and integrates with the rest of your GTK+ code. The simple drawing routines in GDK should generally not be used. Instead, you should use the extensive functionality provide by Cairo.
Докладну інформацію про GDK наведено у Посібнику з GDK.
3.1.5. Cairo
Cairo is a 2D graphics library featuring a sophisticated API for drawing vector graphics, compositing images, and rendering anti-aliased text. Cairo provides support for multiple output devices, including the X Window System, Microsoft Windows, and image buffers, allowing you to write platform-independent code to draw graphics on different media.
The Cairo drawing model is similar to those provided by PostScript and PDF. The Cairo API provides such drawing operations as stroking and filling cubic Bézier splines, compositing images, and performing affine transformations. These vector operations allow for rich, anti-aliased graphics without using expensive pixel-based drawing in your application code.
Cairo's rich drawing model allows for high-quality rendering to multiple media. The same API can be used to create stunning on-screen graphics and text, to render images, or create crisp output suitable for printing.
You should use Cairo whenever you need to draw graphics in your application beyond the widgets provided by GTK+. Much of the drawing inside GTK+ is done using Cairo. Using Cairo for your custom drawing will allow your application to have high-quality, anti-aliased, and resolution-independent graphics.
Докладну інформацію про Cairo наведено у посібнику Cairo: A Vector Graphics Library.
The Pango layout engine can be used with different font backends and drawing backends. On most GNOME systems, Pango will use FreeType, fontconfig, and Cairo to access fonts and render text. On other systems, Pango will use the native font systems, such as Uniscribe on Microsoft Windows and ATSUI on MacOS
GDK runs on a number of different platforms, including the X Window System, Microsoft Windows, DirectFB, and Quartz. On any platform, GDK provides the same consistent API, allowing GTK+ and GTK+ applications to run unmodified.