Gnome and Gtk+

Gnome and Gtk+ have an important relationship as they are technologically connected. In order to understand this, however, it is also necessary to learn some of the history behind Gtk+ and Gnome.

Gtk+ predates Gnome, and it began to be written when there was nothing similar to Gnome. The Gtk+ toolkit was initially written as part of Gimp, a graphical application that has functionality similar to Adobe Photoshop.

Since Gimp make use from a lot of X libraries, the creators started to feel the inadequacy of existing open source toolkits of the time. Motif already existed, but it was closed source, so it was not an option for written a free application like Gimp.

In order to improve the situation, the plan was to create a toolkit that could support Gimp functionality with a modern interface. In this way, the Gtk toolkit was born. It was later on renamed Gtk+, and the toolkit libraries were separated from Gimp, so they became usable in other applications as well.

At the time, the major open source desktop was KDE, which was based on the Qt toolkit created by Trolltech. Qt had a license that allowed free software development, however it wasn't open source itself. While Qt is a high quality library, this made free software developers a little uneasy, since they wanted to promote the creation of free software, not the use of a closed source toolkit.

Therefore, a group of developers congregated around Gtk+, the new open source toolkit, and started to develop their own open source desktop environment for Linux. They called the project Gnome.

Gnome uses Gtk+ as its toolkit, but also expands on it by providing additional widgets and classes. Developing for Gnome is similar to developing for Gtk+, but it requires the use of additional libraries that are not necessary when using pure Gtk+.

The classes provided by Gnome implement functionality that is related to the proper function of a desktop. For example, Gnome support the concept of sessions, which allow applications to save context from one use session to the next.

The functionality provided by Gnome keeps growing as the system expands, and it encompasses areas that have no relation to graphical interface. Therefore, learning Gtk+ is just a subset of learning all the Gnome API.

On the other hand, Gtk+ provides more than 90% of what a typical GUI application for Gnome needs. A large number of applications use only Gtk+.

Another aspect of integrating Gtk+ and Gnome is portability. Gnome applications require the full Gnome desktop to run. Gtk+ apps on the other hand can run on any platform supported by Gtk+. Some of these applications can run even on Windows and Mac OS without much change. Therefore, limiting oneself to the Gtk+ libraries may be a good measure.

Tags: environment, desktop, Unix, Linux, programming, Gtk, Gnome
Article created on 2010-08-19 14:11:56

Post a comment