GTK+ can be configured to change the look of the widgets drawn; this is done using different display engines. Several display engines exist which try to emulate the look of the native widgets on the platform in use.

Starting with version 2.8, released in 2005, GTK+ began the transition to using Cairo to render the majority of its graphical control elements.[5] Since GTK+ version 3.0, all the rendering is done using Cairo.[]

GIMP Drawing Kit (GDK)

GDK acts as a wrapper around the low-level functions provided by the underlying windowing and graphics systems.

GtkBuilder

GtkBuilder allows user interfaces to be designed without writing code. The interface is described in an Extensible Markup Language (XML) file, which is then loaded at runtime and the objects created automatically. The Glade Interface Designer allows creation of the user interface in a WYSIWYG manner. The description of the user interface is independent from the programming language being used.

Language bindings

A library written in one programming language may be used in another language if bindings are written; GTK+ has a range of bindings for various languages.[10]

Gtk# is a set of .NET bindings for the GTK+ GUItoolkit and assorted GNOMElibraries. The library facilitates building graphical GNOME applications using Mono or any other compliant CLR. Gtk# is an event-driven system like any other modern windowing library where every widget allows you to associate handler methods, which get called when particular events happen.

Applications built using Gtk# will run on many platforms including Linux, Windows and macOS. The Mono packages for Windows include GTK+, Gtk# and a native theme to make applications look like native Windows applications. Starting with Mono 1.9, running Gtk# applications on macOS no longer requires the user to run the X11 server.[13]

Glade can be used with the Glade# bindings to easily design GUI applications. A GUI designer called Stetic is integrated with the MonoDevelopIDE.

In addition to support the standard GTK/GNOME stack of development tools, the gtk-dotnet.dll assembly provides a bridge to consume functionality available on the .NET stack. At this point this includes the functionality to use System.Drawing to draw on a widget.

Development

GTK+ is mainly developed by The GNOME Project, which also develops the GNOME Development Platform and the GNOME Desktop Environment.[14]

GTK+ development is loosely managed. Discussion chiefly occurs on a number of public mailing lists.[15] GNOME developers and users gather at an annual GUADEC meeting to discuss the current state and the future direction of GNOME.[16] GNOME incorporates standards and programs from freedesktop.org to better interoperate with other desktops.

On September 1, 2016 a post on the GTK development blog denoted, among other things, the future numbering scheme of GTK+.[18] GTK+ version 3.22 from autumn 2016 shall be the last 3.x release. After that all resources will flow into the GTK+ 4 development series with the version names 3.90, 3.92, etc. Even as the 4.x series enters development, notable applications still use GTK+ 2.x and have not been ported to 3.22. Regarding the future of legacy software using GTK+, there is no collective project to port GTK+ 2.x software to 3.22.

Criticisms

The most common criticism towards GTK+ is a lack of backwards-compatibility in major updates, most notably in the API[20] and theming.[21]

The compatibility breaks between minor releases during the GTK+ 3.x development cycle has been explained by Benjamin Otte as due to strong pressures to innovate, such as providing the features modern users expect and supporting the increasingly influential Wayland display server protocol. With the release of GTK+ 4, the pressure from the need to innovate will have been released and the balance between stability and innovation will tip towards stability.[22] Similarly, recent changes to theming are specifically intended to improve and stabilise that part of the API, meaning some investment now should be rewarded later.

Dirk Hohndel, co-developer of Subsurface and member of Intel's Open-Source Technology Center, criticized the GTK+ developers for being abrasive and ignoring most community requests.[23]

Hong Jen Yee, developer of LXDE, expressed disdain for version 3 of the GTK+ toolkit's radical API changes and increased memory usage, and ported PCManFM to Qt additionally. PCManFM is being developed with a GTK+ and with a Qt backend at the same time.[24]

The Audacious music player plans to move back to GTK+ version 2 starting with version 3.6, with the long-term goal of migrating to Qt.[25] The reasons stated by the developers for this include a transition to client-side window decorations, which they claim cause the application to look "GNOME-y and out of place."[26]

Wireshark also is transitioning to use Qt due to not having a good experience with GTK+'s cross-platform support.[27]

Usage

The GTK+ support for Wayland, co-requisites applications to be adapted to Wayland as well

Screenshot of GIMP 2.8 - GTK+ is responsible for managing the interface components of the program, including the menus, buttons, and input fields.

Applications

Some notable applications that use or once used GTK+ as a widget toolkit include:

Miscellaneous

GTK+ programs can be run on top of X11-based desktop environments or window managers even those not made with GTK+, provided the required libraries are installed; this includes macOS if X11.app is installed. GTK+ can be also run under Microsoft Windows, where it is used by some popular cross-platform applications like Pidgin and GIMP. wxWidgets, a cross-platform GUI tool-kit, uses GTK+ on Linux.[28] Other ports include DirectFB (used by the Debian installer, for example) and ncurses.[29]

Example

The following code presents a graphical GTK+ hello-world program in the C programming language. This program has a window with the title "Hello, world!" and a label with similar text.

#include<gtk/gtk.h>intmain(intargc,char*argv[]){GtkWidget*window;GtkWidget*label;gtk_init(&argc,&argv);/* Create the main, top level window */window=gtk_window_new(GTK_WINDOW_TOPLEVEL);/* Give it the title */gtk_window_set_title(GTK_WINDOW(window),"Hello, world!");/* Center the window */gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);/* Set the window's default size */gtk_window_set_default_size(GTK_WINDOW(window),200,100);/* ** Map the destroy signal of the window to gtk_main_quit; ** When the window is about to be destroyed, we get a notification and ** stop the main GTK+ loop by returning 0 */g_signal_connect(window,"destroy",G_CALLBACK(gtk_main_quit),NULL);/* ** Assign the variable "label" to a new GTK label, ** with the text "Hello, world!" */label=gtk_label_new("Hello, world!");/* Plot the label onto the main window */gtk_container_add(GTK_CONTAINER(window),label);/* Make sure that everything, window and label, are visible */gtk_widget_show_all(window);/* ** Start the main loop, and do nothing (block) until ** the application is closed */gtk_main;return0;}

History

GTK+ was originally designed and used in the GNU Image Manipulation Program (GIMP) as a replacement of the Motif toolkit; at some point Peter Mattis became disenchanted with Motif and began to write his own GUI toolkit called the GIMP toolkit and had successfully replaced Motif by the 0.60 release of GIMP.[30] Finally GTK was re-written to be object-oriented and was renamed GTK+.[31] This was first used in the 0.99 release of GIMP. GTK+ was subsequently adopted for maintenance by the GNOME Foundation, which uses it in the GNOME desktop environment.

The GTK+ 2.0.0 release series introduced new features which include improved text rendering using Pango, a new theme engine, improved accessibility using the Accessibility Toolkit, transition to Unicode using UTF-8 strings, and a more flexible API. Starting with version 2.8, GTK+ 2 depends on the Cairo graphics library for rendering vector graphics.

GTK+ version 3.0.0 included revised input device handling, support for themes written with CSS-like syntax, and the ability to receive information about other opened GTK+ applications.

New widget (GtkInfoBar). Improvement on file chooser, printing.
To remove much of the necessary IPC between the X11 application and the X11 server, GDK has been rewritten (mainly by Alexander Larsson) to use "client-side windows", i.e. the GdkWindow, which every widget is required to have, belongs now to the client.

Development and design of the GTK+ 3 release of the toolkit started in February 2009 during the GTK+ Theming Hackfest held in Dublin.[32] The first draft of the development roadmap was released on 9 April 2009.[33]
completed mostly Project Ridley, the attempt to consolidate several libraries that were external to GTK+, including libgnome, libgnomeui, libgnomeprint22, libgnomeprintui22, libglade, libgnomecanvas, libegg, libeel, gtkglext, and libsexy.[34]
all the rendering is done using Cairo;GDK became more X11 agnostic,
XInput2, theme API is based upon CSS (worsening the achievable performance for 60 Hz frame rates)

Menu support in GtkApplication, a new color chooser, added support for touch devices, added support for smooth scrolling,
GtkScrolledWindow will do kinetic scrolling with touch devices, OS X support has been improved.
This is the first version of GTK+ 3 that works well on Windows.
The Wayland backend has been updated to the current Wayland version
Spin buttons have received a new look.
Accessibility: the treeview accessible support has been rewritten
More complete CSS Theming support

last 3.x released[18]
GTK+ Wayland tablet support is merged;[46] Support for graphics tablets is considered feature complete[47]
GTK+ 3.22 shall be as rock-stable (and hence "boring") as GTK+ 2[22][48][49]

As GNOME 3.26 was released already on September, 13th. [52] it is not based on GTK+ 3.92! Please browse the git-history to determine what hindered GTK+ to release early enough for the latest GNOME to be based on it: https://git.gnome.org/browse/gtk+/GNU autotools was replaced with Meson;

3.93: GdkScreen, GdkVisual removed, GdkDeviceManager replaced by GdkSeat, Clipboard handling has been moved from GTK to GDK, GdkEvent has been converted to an opaque GObject, The GL renderer in GSK has been substantially completed, and is now on par with the Vulkan renderer, The use of GdkPixbuf in APIs has been reduced, and the GskTexture object has been moved to GDK as GdkTexture, to take its place, The Wayland backend now implements the KDE server-side decoration protocol, Broadway has been ported to GSK, ...

See also

GDK - the GIMP Drawing Kit lies between the xlib and the GTK+ library, handling basic rendering such as drawing primitives, raster graphics (bitmaps), cursors, fonts, as well as window events and drag-and-drop functionality

Developed Strategies and Processes that Enabled Brands to Grow During an Economic Downturn.

Taught Advanced Internet Marketing Strategies at the graduate level.

Manage research, learning and skills at defaultLogic. Create an account using LinkedIn or facebook to manage and organize your Digital Marketing and Technology knowledge. defaultLogic works like a shopping cart for information -- helping you to save, discuss and share.