GTK: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m My edit was to diminish excessive verbosity. Sorry about the typo
No edit summary
Line 185: Line 185:
[[th:จีทีเคพลัส]]
[[th:จีทีเคพลัส]]
[[tr:GIMP Toolkit]]
[[tr:GIMP Toolkit]]
[[uk:GTK+]]
[[zh:GTK+]]
[[zh:GTK+]]

Revision as of 21:13, 16 August 2008

GTK+
Developer(s)GNOME Foundation
Stable release
2.12.11 / July 1, 2008 (2008-07-01)
Preview release
2.13.6 / August 5, 2008 (2008-08-05)
Repository
Written inC
Operating systemCross-platform
TypeWidget toolkit
LicenseGNU Lesser General Public License
Websitewww.gtk.org

GTK+, or The GIMP Toolkit, is a cross-platform widget toolkit for creating graphical user interfaces. It is one of the most popular toolkits for the X Window System, along with Qt and Motif.

GTK+ was initially created for the GNU Image Manipulation Program (GIMP), a raster graphics editor, in 1997 by Spencer Kimball and Peter Mattis, members of eXperimental Computing Facility (XCF) at UC Berkeley. Licensed under the LGPL, GTK+ is free software and is part of the GNU Project.

Programming languages

GTK+ uses the C programming language, and its design uses the GObject object system. The GNOME platform provides bindings for:

Others have written bindings for many other programming languages (including Ada, D, Haskell, Ocaml, Pascal, Pike, Tcl, Euphoria and all .NET programming languages). GTK-server provides a stream-based IPC interface to GTK+ allowing it to be used from any language with I/O capabilities, including shell scripts. A complete list of bindings can be found at the GTK+ bindings page.

Languages purpose-written for GObject and therefore GTK+ include GOB2 and Vala.

Like Qt, GTK+ isn't based on Xt like several other widget toolkits. This allows flexibility and makes GTK+ usable for other systems. However, without this dependency, GTK+ lacks access to the X resources database, the traditional way for customizing X11 applications.

Non-graphical code and ports

GTK+ initially contained some utility routines that did not strictly relate to graphics, for instance providing such data structures as linked lists and binary trees. Such general utilities, along with the object system called GObject, have now migrated into a separate library, GLib, which programmers can use to develop code that does not require a graphical interface. Cursed GTK is a text console port of GTK+. [1]

Platforms

GTK+ was originally targeted at the X Window System, and this remains its primary target platform. Other targeted platforms are Microsoft Windows (Windows 2000 and upwards, near complete support), DirectFB, and Quartz (Mac OS X v10.4 and upwards, still under development).

Look and feel

The end-user can configure the look of the toolkit, down to offering a number of different display engines. Engines exist which try to emulate the look of other popular toolkits or platforms, like Windows 95, Motif, Qt or NEXTSTEP.

Uses of GTK+

Screenshot of The GIMP 2.0. GTK+ is responsible for managing the interface components of the program, including the menus, buttons, input fields, etc.
Environments that use GTK+

Those desktop environments are not required to run GTK+ programs. If the libraries the program requires are installed, a GTK+ program can run on top of other X11-based environments such as KDE or an X11-plus-window manager environment; this includes Mac OS X if X11.app is installed. GTK+ can also run under Microsoft Windows, used by some popular cross-platform applications like Pidgin and GIMP. wxWidgets, a cross-platform GUI toolkit uses GTK+ for Unix systems [1]. Some of the more unusual ports include DirectFB and ncurses.

Window managers

GTK+ 2

GTK+ 2 has succeeded GTK+ 1. Its new features include improved text rendering using Pango, a new theme engine, improved accessibility using the Accessibility Toolkit, complete transition to Unicode using UTF-8 strings and a more flexible API. However, GTK+ 2 lacks compatibility with GTK+ 1, and programmers must port applications to it.

Starting with version 2.8, GTK+ 2 depends on the Cairo library for rendering with vector graphics in GTK+ 2.

Release history

Release Series Latest Minor Version Initial Release Date Significant Changes
1.0.x 1.0.? ? ?
1.2.x 1.2.10 2 April 2001 ?
2.0.x 2.0.9 20 November 2002 ?
2.2.x 2.2.4 4 September 2003 ?
2.4.x 2.4.14 3 December 2004 ?
2.6.x 2.6.10 18 August 2005 ?
2.8.x 2.8.20 2 July 2006 cairo integration
2.10.x 2.10.14 16 July 2007 GtkPrint - printing support
2.12.x 2.12.11 12 March 2008 GtkBuilder - libglade replacement

Future developments

Project Ridley is an attempt to consolidate several libraries that are currently external to GTK+, including: libgnome, libgnomeui, libgnomeprint22, libgnomeprintui22, libglade, libgnomecanvas, libegg, libeel and gtkglext.[2]

See also

References

External links