The GNOME Project
GNOME desktop applications have been built on top of the object-oriented GTK+ toolkit originally designed as a GUI toolkit for the GNU Image Manipulation Program (GIMP).
GTK+ has been implemented on top of a simple window and drawing API called Gdk (GTK Drawing Kit). The initial version of Gdk was a fairly thin wrapper around the Xlib libraries, but a port to Win32 and a port to the Y windowing system are presently in alpha stages.
GTK+ implements an object system entirely in C. This object system is quite rich in functionality, including classical single inheritance, dynamic creation of new methods and classes, and a “signal” mechanism for dynamically attaching handlers to the various events that occur in the user interface. One of GTK's great strengths is the availability of a wide range of language bindings, including C++, Objective-C, Perl, Python, Scheme and Tom. These language bindings provide access both to GTK+ objects and to new objects programmed in the language of choice.
An additional feature of GNOME is Rasterman's Imlib library. This library is implemented alongside Gdk and provides a fast yet flexible interface for loading and saving images and rendering them on the screen. Applications using Imlib have quick and direct access to PNG, GIF, TIFF, JPEG and XPM files as well as other formats available through external conversion filters.
The Support Libraries
C-based GNOME applications use the GLIB utility library. glib provides the C programmer with a set of useful data structures: linked lists, doubly linked lists, hash tables (one-to-one maps), trees, string manipulation, memory-chunk reuse, debugging macros, assertion and logging facilities. glib also includes a portable interface for a dynamic module facility.
The GNOME libraries
The GNOME libraries add the missing pieces to the toolkit to create full applications, dictate some policy, and help in the process of providing consistent user interfaces as well as localizing the GNOME applications so they can be used in various countries.
The current GNOME libraries are GTK+-Xmhtml, gnome-print, libgnome, libgnomeui, libgnorba, libgtop, gnome-dom and gnome-xml. Other libraries are used for specific applications: libPropList (soon to be replaced by a new configuration engine) and audiofile.
The main non-graphical library is called libgnome. This provides functions to keep track of recently used documents, configuration information, metadata handling (see below), game score functions and command-line argument handling. This library does not depend on the use of a windowing system.
As we use CORBA to achieve parts of our desktop integration, we have a special library called the libgnorba library to deal with various CORBA issues. It provides GUI/CORBA integration (to let our GUI applications act as servers), authentication within the GNOME framework and service activation.
The gnomeui library, on the other hand, has the code that requires a window system to run. It contains the following components:
The GNOME session management support
Widgets, both as straightforward extensions of GTK+ and designed to be dependent on libgnome features
A set of standard dialog boxes otherwise not available on GTK+, well-integrated with other GNOME libraries
Standard property configuration dialog boxes
Standard top-level window handling
A multi-document interface (gnome-mdi)
CORBA integration where required
GTK+-XmHTML is a port of the Koen D'Hondt's XmHTML widget for Motif and is used for our HTML display needs. Our changes are being folded back into the main distribution.
The lib gtop library allows system applications to be easily ported to various operating systems; it provides system, process and file system information.
gnome-xml provides XML file loading, parsing and saving for GNOME applications and is being used in the GNOME spreadsheet (Gnumeric) and in the GNOME word processor program. gnome-dom provides an implementation of the World Wide Web Consortium's Document Object Model for GNOME applications. By the time you read this article, gnome-dom will have been deployed widely in the GNOME office applications. Both gnome-xml and gnome-dom were developed by Daniel Veillard from the World Wide Web Consortium.
gnome-print implements GNOME's printing architecture. It consists of a pluggable rendering engine as well as a set of widgets and standard dialog boxes for selecting and configuring printers. In addition, gnome-print is responsible for managing outline fonts and contains scripts that automatically find fonts already installed on the system.
The GNOME print imaging model is modeled after PostScript. Basic operations include vector and bezier path construction, stroking, filling, clipping, text (using Type1 fonts, with TrueType to follow shortly) and images.
Currently, gnome-print generates only PostScript output. However, the design of the imaging model is closely synchronized with the anti-aliased rendering engine for the Canvas and it is expected that these two modules will be interoperating soon. In particular, it will be possible to “print” into a canvas (useful for providing a high-quality screen preview) and to print the contents of a canvas. This feature should simplify the design of applications which use the Canvas, as very little extra code will be needed to support printing.
The same rendering engine will be used to render printed pages directly without going through a PostScript step. This path is especially exciting for providing high-quality, high-performance printing to color ink-jet printers, even of complex pages containing transparency, gradients and other elements considered “tricky” in the traditional PostScript imaging model.
One explicit goal of GNOME was to support development in a wide range of languages, because no single language is ideal for every application. To this end, bindings for both GTK+ and the GNOME libraries exist for many popular programming languages, currently C, C++, Objective-C, Perl, Python, Scheme and Tom.
The early involvement of Scheme, Tom and Perl hackers in both the GTK+ and GNOME projects has helped in making the GTK+ and GNOME APIs easy to wrap up for various languages. Multi-language support is “baked in” to the design of GTK+ and GNOME, rather than being added on as an afterthought.
- New Products
- Readers' Choice Awards 2014
- Handling the workloads of the Future
- Android Candy: Google Keep
- How Can We Get Business to Care about Freedom, Openness and Interoperability?
- diff -u: What's New in Kernel Development
- Days Between Dates?
- December 2014 Issue of Linux Journal: Readers' Choice
- Computing without a Computer
Editorial Advisory Panel
Thank you to our 2014 Editorial Advisors!
- Jeff Parent
- Brad Baillio
- Nick Baronian
- Steve Case
- Chadalavada Kalyana
- Caleb Cullen
- Keir Davis
- Michael Eager
- Nick Faltys
- Dennis Frey
- Philip Jacob
- Jay Kruizenga
- Steve Marquez
- Dave McAllister
- Craig Oda
- Mike Roberts
- Chris Stark
- Patrick Swartz
- David Lynch
- Alicia Gibb
- Thomas Quinlan
- Carson McDonald
- Kristen Shoemaker
- Charnell Luchich
- James Walker
- Victor Gregorio
- Hari Boukis
- Brian Conner
- David Lane