HOME

TheInfoList



OR:

GTK (formerly GIMP ToolKit and GTK+) is a
free and open-source Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source ...
cross-platform In computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software ...
widget toolkit A widget toolkit, widget library, GUI toolkit, or UX library is a library or a collection of libraries containing a set of graphical control elements (called ''widgets'') used to construct the graphical user interface (GUI) of programs. Most widge ...
for creating
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, ins ...
s (GUIs). It is licensed under the terms of the
GNU Lesser General Public License The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their own ...
, allowing both free and
proprietary software Proprietary software is software that is deemed within the free and open-source software to be non-free because its creator, publisher, or other rightsholder or rightsholder partner exercises a legal monopoly afforded by modern copyright and i ...
to use it. It is one of the most popular toolkits for the Wayland and
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
windowing system In computing, a windowing system (or window system) is software that manages separately different parts of display screens. It is a type of graphical user interface (GUI) which implements the WIMP ( windows, icons, menus, pointer) paradigm f ...
s. The GTK team releases new versions on a regular basis. GTK 4 and GTK 3 are maintained, while GTK 2 is end-of-life.


Software architecture

The GTK
library A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vi ...
contains a set of graphical control elements ( widgets); version 3.22.16 contains 186 active and 36 deprecated widgets. GTK is an
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
widget toolkit A widget toolkit, widget library, GUI toolkit, or UX library is a library or a collection of libraries containing a set of graphical control elements (called ''widgets'') used to construct the graphical user interface (GUI) of programs. Most widge ...
written in the programming language C; it uses
GObject The GLib Object System, or GObject, is a free software library providing a portable object system and transparent cross-language interoperability. GObject is designed for use both directly in C programs to provide object-oriented C-based APIs ...
, that is the
GLib GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever s ...
object system, for the object orientation. While GTK is mainly for windowing systems based on
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
and Wayland, it works on other platforms, including
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
(interfaced with the
Windows API The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations th ...
), and
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
(interfaced with
Quartz Quartz is a hard, crystalline mineral composed of silica ( silicon dioxide). The atoms are linked in a continuous framework of SiO4 silicon-oxygen tetrahedra, with each oxygen being shared between two tetrahedra, giving an overall chemical f ...
). There is also an
HTML5 HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
back-end named ''Broadway''. 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 Cairo ( ; ar, القاهرة, al-Qāhirah, ) is the capital of Egypt and its largest city, home to 10 million people. It is also part of the largest urban agglomeration in Africa, the Arab world and the Middle East: The Greater Cairo metr ...
to render most of its graphical control elements widgets. Since GTK version 3.0, all rendering is done using Cairo. On 26 January 2018 at
DevConf.cz DevConf.cz (Developer Conference) is an annual, free, Red Hat sponsored community conference for developers, admins, DevOps engineers, testers, documentation writers and other contributors to open source technologies. The conference includes top ...
, Matthias Clasen gave an overview of the current state of GTK 4 development, including a high-level explanation of how rendering and input worked in GTK 3, what changes are being made in GTK 4 (>3.90), and why. On 6 February 2019 it was announced that GTK 4 will drop the “+” from the project's name.


GTK Drawing Kit (GDK)

GDK acts as a wrapper around the low-level functions provided by the underlying windowing and graphics systems. GDK is found in the /gdk
/code> directory.


GTK Scene Graph Kit (GSK)

GSK is the rendering and scene graph API for GTK. GSK lies between the graphical control elements (widgets) and the rendering. GSK was finally merged into GTK version 3.90 released March 2017. GSK is found in the /gsk
/code> directory.


GtkInspector

GtkInspector was introduced with version 3.14. GtkInspector can only be invoked after installing the development packag
libgtk-3-devgtk+-devel


GUI designers

There are several GUI designers for GTK. The following projects are active as of July 2011: *
Glade Glade may refer to: Computing * Glade Interface Designer, a GUI designer for GTK+ and GNOME Geography *Glade (geography), open area in woodland, synonym for "clearing" **Glade skiing, skiing amongst trees ;Places in the United States * Glade, Kan ...
, supports GtkBuilder, which is a GTK built-in GUI description format. *
Gazpacho Gazpacho (; ) or Gaspacho (), also called Andalusian gazpacho, is a cold soup and drink made of raw, blended vegetables. It originated in the southern regions of the Iberian peninsula and spread into other areas. Gazpacho is widely eaten in Sp ...
, GUI builder for the GTK toolkit written in Python * Crow Designer, relies on its own GuiXml format and GuiLoader library. *
Stetic MonoDevelop (also known as Xamarin Studio) is an open-source integrated development environment for Linux, macOS, and Windows. Its primary focus is development of projects that use Mono and .NET Framework. MonoDevelop integrates features similar ...
, part of
MonoDevelop MonoDevelop (also known as Xamarin Studio) is an open-source integrated development environment for Linux, macOS, and Windows. Its primary focus is development of projects that use Mono and .NET Framework. MonoDevelop integrates features similar t ...
, oriented toward Gtk#. *
Gambas Gambas is the name of an object-oriented dialect of the BASIC programming language, as well as the integrated development environment that accompanies it. Designed to run on Linux and other Unix-like computer operating systems, its name is a re ...
since version 2.0 atop
BASIC BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
* Xojo on
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
* Lazarus on
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
defaults to interfacing with GTK 2


GtkBuilder

GtkBuilder allows user interfaces to be designed without writing code. The interface is described in an
Extensible Markup Language Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
(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 ''what you see is what you get'' (
WYSIWYG In computing, WYSIWYG ( ), an acronym for What You See Is What You Get, is a system in which editing software allows content to be edited in a form that resembles its appearance when printed or displayed as a finished product, such as a printed d ...
) manner. The description of the user interface is independent from the programming language being used.


Language bindings

Language bindings In programming and software design, binding is an application programming interface (API) that provides glue code specifically made to allow a programming language to use a foreign library or operating system service (one that is not native to t ...
are available for using GTK from languages other than C, including
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
,
Genie Jinn ( ar, , ') – also romanized as djinn or anglicized as genies (with the broader meaning of spirit or demon, depending on sources) – are invisible creatures in early pre-Islamic Arabian religious systems and later in Islamic myt ...
,
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, of ...
,
Perl Perl is a family of two high-level, general-purpose, interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it also referred to its redesigned "sister language", Perl 6, before the latter's name was offic ...
, Python,
Vala Vala or VALA may refer to: Religion and mythology * Vala (Vedic), a demon or a stone cavern in the Hindu scriptures * Völva, also spelled Vala, a priestess in Norse mythology and Norse paganism Fiction * Vala (Middle-earth), an angelic being in ...
, and others. GtkSharp, not to be confused with Gtk#, supports GTK 3.


Gtk#

Gtk# is a set of
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
bindings for the GTK
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, ins ...
(GUI)
toolkit A toolkit is an assembly of tools; set of basic building units for user interfaces. The word toolkit may refer to: * Abstract Window Toolkit * Accessibility Toolkit * Adventure Game Toolkit * B-Toolkit * Battlefield Mod Development Toolkit * Che ...
and assorted
GNOME A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
libraries A library is a collection of Document, materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or electronic media, digital access (soft copies) materials, and may be a ...
. The library facilitates building graphical GNOME applications using
Mono Mono may refer to: Common meanings * Infectious mononucleosis, "the kissing disease" * Monaural, monophonic sound reproduction, often shortened to mono * Mono-, a numerical prefix representing anything single Music Performers * Mono (Japanes ...
or any other compliant
Common Language Runtime The Common Language Runtime (CLR), the virtual machine component of Microsoft .NET Framework, manages the execution of .NET programs. Just-in-time compilation converts the managed code (compiled intermediate language code) into machine instru ...
(CLR). Gtk# is an event-driven system like any other modern windowing library where every widget allows associating handler methods, which get called when certain events occur. Applications built using Gtk# will run on many platforms including
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
,
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
and
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
. 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 running an
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
server.
Glade Interface Designer Glade Interface Designer is a graphical user interface builder for GTK, with additional components for GNOME. In its third version, Glade is programming language–independent, and does not produce code for events, but rather an XML fil ...
can be used with the Glade# bindings to easily design GUI applications. A GUI designer named
Stetic MonoDevelop (also known as Xamarin Studio) is an open-source integrated development environment for Linux, macOS, and Windows. Its primary focus is development of projects that use Mono and .NET Framework. MonoDevelop integrates features similar ...
is integrated with the
MonoDevelop MonoDevelop (also known as Xamarin Studio) is an open-source integrated development environment for Linux, macOS, and Windows. Its primary focus is development of projects that use Mono and .NET Framework. MonoDevelop integrates features similar t ...
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools ...
(IDE). In addition to support the standard GTK/GNOME stack of development tools, the 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. , Gtk# support for Gtk3 remains in the preview phase and forked projects, such a
GtkSharp
have been founded to provide full Gtk3 support for C# and other CLI languages. The lack of a released version of Gtk# with support for Gtk3 was cited as a reason to remove the
Banshee A banshee ( ; Modern Irish , from sga, ben síde , "woman of the fairy mound" or "fairy woman") is a female spirit in Irish folklore who heralds the death of a family member, usually by screaming, wailing, shrieking, or keening. Her name i ...
media player in Ubuntu 12.04.


Development

GTK is mainly developed by
The GNOME Project GNOME Project is a community behind the GNOME desktop environment and the software platform upon which it is based. It consists of all the software developers, artists, writers, translators, other contributors, and active users of GNOME. It is n ...
, which also develops the GNOME Development Platform and the GNOME Desktop Environment. GTK development is loosely managed. Discussion chiefly occurs on several public mailing lists. GNOME developers and users gather at an annual ''GNOME Users And Developers European Conference''
GUADEC GUADEC, the GNOME Users And Developers European Conference, is an annual developer conference, whose prime topic is the development of the GNOME desktop environment and its underlying base software, such as GTK, GStreamer, etc. The first GUA ...
meeting to discuss GNOME's current state and future direction. GNOME incorporates standards and programs from freedesktop.org to better
interoperate Interoperability is a characteristic of a product or system to work with other products or systems. While the term was initially defined for information technology or systems engineering services to allow for information exchange, a broader defi ...
with other desktops. GTK is mainly written in C. Many
language binding In programming and software design, binding is an application programming interface (API) that provides glue code specifically made to allow a programming language to use a foreign library or operating system service (one that is not native to th ...
s are available. On 1 September 2016 a post on the GTK development blog denoted, among other things, the future numbering scheme of GTK. GTK version 3.22, released in Autumn 2016, was planned to be the last 3.x release, although version 3.24 followed in Fall 2018 with the delay of GTK 4. The development of GTK 4 used version names 3.90, 3.92, etc. until the first GTK 4.0 stable release was launched in December 2020. Despite the first stable GTK 4 release, some applications using GTK still rely on GTK 2. For example, as of January 2022,
GIMP GIMP ( ; GNU Image Manipulation Program) is a free and open-source raster graphics editor used for image manipulation (retouching) and image editing, free-form drawing, transcoding between different image file formats, and more specialized ...
is still being ported to GTK 3.


Build automation

GTK (and GNOME, GLib, etc.) formerly utilized the
GNU Build System The GNU Autotools, also known as the GNU Build System, is a suite of programming tools designed to assist in making source code packages portable to many Unix-like systems. It can be difficult to make a software program portable: the C compile ...
(named Autotools) as the build automation system of choice. Since 14 Aug 2017, the master branch of GTK has been built with
Meson In particle physics, a meson ( or ) is a type of hadronic subatomic particle composed of an equal number of quarks and antiquarks, usually one of each, bound together by the strong interaction. Because mesons are composed of quark subparticles, ...
, and the Autotools build system files have been dropped.


Criticism

The most common criticism of GTK is the lack of backward-compatibility in major updates, most notably in the
application programming interface An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
(API) and theming. The compatibility breaks between minor releases during the GTK 3.x development cycle was 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 Wayland may refer to: Computers * Wayland (display server protocol), a graphical display system for Unix-like computers Fiction * Jace Wayland, a character in the ''Mortal Instruments'' book series * Wayland (''Star Wars''), a planet in the '' ...
. 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 toward stability. 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, codeveloper of
Subsurface In geology, bedrock is solid rock that lies under loose material (regolith) within the crust of Earth or another terrestrial planet. Definition Bedrock is the solid rock that underlies looser surface material. An exposed portion of bedr ...
and member of
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 ser ...
's Open-Source Technology Center, criticized the GTK developers for being abrasive and ignoring most community requests. * Hong Jen Yee, developer of
LXDE LXDE (abbreviation for Lightweight X11 Desktop Environment) is a free desktop environment with comparatively low resource requirements. This makes it especially suitable for use on older or resource-constrained personal computers such as netb ...
(the GTK version of which was dropped and all efforts focused on the Qt port), expressed disdain for version 3 of the GTK toolkit's radical API changes and increased memory usage, and ported
PCMan File Manager PCMan File Manager (PCManFM) is a file manager application, developed by Hong Jen Yee () from Taiwan, which is meant to be a replacement for GNOME Files, Dolphin and Thunar. PCManFM is the standard file manager in LXDE, also developed by the s ...
(PCManFM) to Qt. PCManFM is being developed with a GTK and with a Qt backend at the same time. * The
Audacious Audacious may refer to: * ''Audacious'' (album), a 2016 album by Cupcakke * Audacious (software) Audacious is a Free and open-source software, free and open-source audio player software with a focus on low resource use, high audio quality, ...
music player moved to Qt in version 3.6. 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 A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
-y and out of place." *
Wireshark Wireshark is a free and open-source packet analyzer. It is used for network troubleshooting, analysis, software and communications protocol development, and education. Originally named Ethereal, the project was renamed Wireshark in May 2006 du ...
has switched to Qt due to not having a good experience with GTK's cross-platform support.


Use


Applications

Some notable applications that use GTK as a widget toolkit include: * Ardour, a
digital audio workstation A digital audio workstation (DAW) is an electronic device or application software used for recording, editing and producing audio files. DAWs come in a wide variety of configurations from a single software program on a laptop, to an integr ...
(DAW) *
Deluge A deluge is a large downpour of rain, often a flood. The Deluge refers to the flood narrative in the Biblical book of Genesis. Deluge may also refer to: History *Deluge (history), the Swedish and Russian invasion of the Polish-Lithuanian Com ...
, a Bit Torrent client * Foliate, an
ebook An ebook (short for electronic book), also known as an e-book or eBook, is a book publication made available in digital form, consisting of text, images, or both, readable on the flat-panel display of computers or other electronic devices. Alt ...
reader *
GIMP GIMP ( ; GNU Image Manipulation Program) is a free and open-source raster graphics editor used for image manipulation (retouching) and image editing, free-form drawing, transcoding between different image file formats, and more specialized ...
, a
raster graphics editor A raster graphics editor is a computer program that allows users to create and edit images interactively on the computer screen and save them in one of many raster graphics file formats (also known as bitmap images) such as JPEG, PNG, and GI ...
*
GNOME Builder GNOME Builder is a general purpose integrated development environment (IDE) for the GNOME platform, primarily designed to aid in writing GNOME-based applications. It was initially released on March 24, 2015. The application's tagline is "A toolsm ...
, an
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools ...
(IDE) *
GNOME Core Applications GNOME Core Applications is a software suite of approximately 30 application software that are packaged as part of the standard free and open-source GNOME desktop environment. GNOME Core Applications have the look and feel of the GNOME desktop, an ...
, a collection of applications as a standard bundle of the
GNOME A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
desktop environment *
GNOME Evolution GNOME Evolution (formerly Novell Evolution and Ximian Evolution, prior to Novell's 2003 acquisition of Ximian) is the official personal information manager for GNOME. It has been an official part of GNOME since Evolution 2.0 was included with th ...
, a
personal information manager A personal information manager (often referred to as a PIM tool or, more simply, a PIM) is a type of application software that functions as a personal organizer. The acronym PIM is now, more commonly, used in reference to personal information manag ...
* HandBrake, digital video
transcoder Transcoding is the direct digital-to-digital conversion of one encoding to another, such as for video data files, audio files (e.g., MP3, WAV), or character encoding (e.g., UTF-8, ISO/IEC 8859). This is usually done in cases where a target devic ...
*
Inkscape Inkscape is a free and open-source vector graphics editor used to create vector images, primarily in Scalable Vector Graphics (SVG) format. Other formats can be imported and exported. Inkscape can render primitive vector shapes (e.g. rec ...
, a
vector graphics editor A vector graphics editor is a computer program that allows users to compose and edit vector graphics images interactively on a computer and save them in one of many popular vector graphics formats, such as EPS, PDF, WMF, SVG, or VML. Vector ...
*
LibreOffice LibreOffice () is a free and open-source office productivity software suite, a project of The Document Foundation (TDF). It was forked in 2010 from OpenOffice.org, an open-sourced version of the earlier StarOffice. The LibreOffice suite co ...
, an
office suite Productivity software (also called personal productivity software or office productivity software) is application software used for producing information (such as documents, presentations, worksheets, databases, charts, graphs, digital painting ...
*
Lutris Lutris is a free and open source game manager for Linux-based operating systems developed and maintained by Mathieu Comandon and the community, released under the GNU General Public License. For games that require using Wine, community insta ...
, a game manager *
Mozilla Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements current an ...
, a
web browser A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used o ...
*
Mozilla Thunderbird Mozilla Thunderbird is a free and open-source cross-platform email client, personal information manager, news client, RSS and chat client developed by the Mozilla Foundation and operated by subsidiary MZLA Technologies Corporation. The projec ...
, a personal information manager *
Pitivi Pitivi (originally spelled PiTiVi) is a free and open-source non-linear video editor for Linux, developed by various contributors from free software community and the GNOME project, with support also available from Collabora. Pitivi is designed t ...
, a
video editor A video editor is involved in video production and the post-production of film making. The video editor's responsibilities involve decisions about the selection and combining of shots into sequences, as well as the addition of accompanying so ...
* PCSX-Reloaded, a
video game console emulator A video game console emulator is a type of emulator that allows a computing device to emulate a video game console's hardware and play its games on the emulating platform. More often than not, emulators carry additional features that surpass ...
*
Remmina Remmina is a remote desktop client for POSIX-based computer operating systems. It supports the Remote Desktop Protocol (RDP), VNC, NX, XDMCP, SPICE, X2Go and SSH protocols and uses FreeRDP as foundation. Packaging Remmina is in the package ...
, a
remote desktop In computing, the term remote desktop refers to a software- or operating system feature that allows a personal computer's desktop environment to be run remotely off of one system (usually a PC, but the concept applies equally to a server or a ...
client *
Transmission Transmission may refer to: Medicine, science and technology * Power transmission ** Electric power transmission ** Propulsion transmission, technology allowing controlled application of power *** Automatic transmission *** Manual transmission ** ...
, a Bit Torrent client


Desktop environments

Several
desktop environment In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a grap ...
s utilize GTK as the widget toolkit.


Current

*
GNOME A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
, based on GTK, meaning that programs native to GNOME use GTK * Budgie, built from scratch for the SolusOS successor, Solus Operating System *
Cinnamon Cinnamon is a spice obtained from the inner bark of several tree species from the genus '' Cinnamomum''. Cinnamon is used mainly as an aromatic condiment and flavouring additive in a wide variety of cuisines, sweet and savoury dishes, breakf ...
, a fork of GNOME 3 which uses GTK version 3 * MATE, a fork of GNOME 2 which uses GTK 3 since version 1.18 * Xfce, based on GTK 3 since version 4.14 *
Pantheon Pantheon may refer to: * Pantheon (religion), a set of gods belonging to a particular religion or tradition, and a temple or sacred building Arts and entertainment Comics *Pantheon (Marvel Comics), a fictional organization * ''Pantheon'' (Lone St ...
uses GTK 3 exclusively, being developed by
elementary OS elementary OS is a Linux distribution based on Ubuntu LTS. It promotes itself as a "thoughtful, capable, and ethical" replacement to macOS and Windows and has a pay-what-you-want model. The operating system, the desktop environment (called Pa ...
*
Sugar Sugar is the generic name for sweet-tasting, soluble carbohydrates, many of which are used in food. Simple sugars, also called monosaccharides, include glucose, fructose, and galactose. Compound sugars, also called disaccharides or do ...
, a desktop environment for youth
primary education Primary education or elementary education is typically the first stage of formal education, coming after preschool/ kindergarten and before secondary school. Primary education takes place in '' primary schools'', ''elementary schools'', or ...
, which uses GTK, especially
PyGTK PyGTK is a set of Python wrappers for the GTK graphical user interface library. PyGTK is free software and licensed under the LGPL. It is analogous to PyQt/ PySide and wxPython, the Python wrappers for Qt and wxWidgets, respectively. Its ...
*
Phosh Phosh (portmanteau of ''phone'' and '' shell'') is a graphical user interface designed for mobile and touch-based devices. It is the default shell used on several mobile Linux operating systems including PureOS, Mobian, and Fedora Mobility. I ...
, a mobile UI designed for
PureOS PureOS is a Linux distribution focusing on privacy and security, using the GNOME desktop environment. It is maintained by Purism for use in the company's Librem laptop computers as well as the Librem 5 smartphone. PureOS is designed to include ...
*
LXDE LXDE (abbreviation for Lightweight X11 Desktop Environment) is a free desktop environment with comparatively low resource requirements. This makes it especially suitable for use on older or resource-constrained personal computers such as netb ...
(Lightweight X11 Desktop Environment) is based on GTK 2 *
Unity Unity may refer to: Buildings * Unity Building, Oregon, Illinois, US; a historic building * Unity Building (Chicago), Illinois, US; a skyscraper * Unity Buildings, Liverpool, UK; two buildings in England * Unity Chapel, Wyoming, Wisconsin, US; a ...
, the former default desktop environment of
Ubuntu Ubuntu ( ) is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: '' Desktop'', ''Server'', and ''Core'' for Internet of things devices and robots. All ...


Inactive

*
Access Linux Platform The Access Linux Platform (ALP) is a discontinued open-source software based operating system, once referred to as a "next-generation version of the Palm OS," for mobile devices developed and marketed by Access Co., of Tokyo, Japan. The platfo ...
(successor of the
Palm OS Palm OS (also known as Garnet OS) was a mobile operating system initially developed by Palm, Inc., for personal digital assistants (PDAs) in 1996. Palm OS was designed for ease of use with a touchscreen-based graphical user interface. It is pro ...
PDA PDA may refer to: Science and technology * Patron-driven acquisition, a mechanism for libraries to purchase books *Personal digital assistant, a mobile device * Photodiode array, a type of detector * Polydiacetylenes, a family of conducting po ...
platform) * Consort, the GNOME 3.4 Fallback Mode –
fork In cutlery or kitchenware, a fork (from la, furca 'pitchfork') is a utensil, now usually made of metal, whose long handle terminates in a head that branches into several narrow and often slightly curved tine (structural), tines with which one ...
from SolusOS * GPE, the GPE Palmtop Environment *
ROX Desktop The ROX Desktop is a graphical desktop environment for the X Window System. It is based on the ROX-Filer which is a drag and drop spatial file manager. It is free software released under the GNU General Public License. The environment was i ...
, a lightweight desktop, with features from the
GUI The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
of
RISC OS RISC OS is a computer operating system originally designed by Acorn Computers Ltd in Cambridge, England. First released in 1987, it was designed to run on the ARM chipset, which Acorn had designed concurrently for use in its new line of Archi ...


Miscellaneous

GTK programs can be run on desktop environments based on X11 and Wayland, or window managers even those ''not'' made with GTK, provided the needed libraries are installed; this includes
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
if X11.app is installed. GTK can be also run on
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
, where it is used by some popular cross-platform applications like
Pidgin A pidgin , or pidgin language, is a grammatically simplified means of communication that develops between two or more groups of people that do not have a language in common: typically, its vocabulary and grammar are limited and often drawn from s ...
and GIMP.
wxWidgets wxWidgets (formerly wxWindows) is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with mini ...
, a cross-platform GUI tool-kit, uses GTK on Linux by default. Other ports include DirectFB (used by the
Debian installer Debian-Installer is a system installer designed for the Debian Linux distribution. It originally appeared in the Debian release 3.1 (Sarge), released on June 6, 2005, although the first release of a Linux distribution that used it was Skolelinux ...
, for example) and
ncurses ncurses (new curses) is a programming library providing an application programming interface (API) that allows the programmer to write text-based user interfaces (TUI) in a terminal-independent manner. It is a toolkit for developing "GUI-like" ...
.


Window managers

The following window managers use GTK: * Aewm * AfterStep * Amaterus * Consortium *
IceWM IceWM is a stacking window manager for the X Window System, originally written by Marko Maček. It was written from scratch in C++ and is released under the terms of the GNU Lesser General Public License. It is customizable, relatively lightwe ...
*
Marco Marco may refer to: People * Marco (given name), people with the given name Marco * Marco (actor) (born 1977), South Korean model and actor * Georg Marco (1863–1923), Romanian chess player of German origin * Tomás Marco (born 1942), Spanish co ...
* Metacity * Muffin * Mutter *
Sawfish Sawfish, also known as carpenter sharks, are a family of rays characterized by a long, narrow, flattened rostrum, or nose extension, lined with sharp transverse teeth, arranged in a way that resembles a saw. They are among the largest fish ...
* Wmg * Xfwm


GtkSourceView

For
syntax highlighting Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colours and fonts according to the category of terms ...
there is GtkSourceView, "source code editing widget". GtkSourceView is maintained by GNOME separately from GTK as a library
gtksourceview
There are plans to rename to gsv.


GtkSpell

GtkSpell is a library separate from GTK. GtkSpell depends on GTK and Enchant. Enchant is a wrapper for ispell,
hunspell Hunspell is a spell checker and morphological analyser designed for languages with rich morphology and complex word compounding and character encoding, originally designed for the Hungarian language. Hunspell is based on MySpell and is backwa ...
, etc., the actual
spell checker In software, a spell checker (or spelling checker or spell check) is a software feature that checks for misspellings in a text. Spell-checking features are often embedded in software or services, such as a word processor, email client, electronic ...
engine/software. GtkSpell uses GTK's GtkTextView widget, to highlight misspelled words and offer replacement. *


Example

Documentation is available here: * The following code presents a graphical GTK hello-world program in the
C programming language ''The C Programming Language'' (sometimes termed ''K&R'', after its authors' initials) is a computer programming book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the language, as well a ...
. This program has a window with the title "Hello, world!" and a label with similar text. // helloworld.c #include /* Callback that will be called when the application is activated */ static void activate_callback(GApplication *app, gpointer user_data) int main (int argc, char *argv[]) Needs installing the libraries first in Debian or derivatives: $ sudo apt-get install libgtk-4-dev Using pkg-config in a Unix shell, this code can be compiled with the following command: $ cc -Wall $(pkg-config --cflags --libs gtk4) helloworld.c -o helloworld Invoke the program: $ ./helloworld


History


Linux

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 Peter Mattis is an American computer programmer, entrepreneur, and business executive. He is the CTO and co-founder for Cockroach Labs, a company he co-founded in 2014. His work as a programmer includes launching GNU Image Manipulation Program ...
became disenchanted with Motif and began to write his own GUI toolkit named the GIMP toolkit and had successfully replaced Motif by the 0.60 release of GIMP. Finally GTK was re-written to be
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
and was renamed GTK+. This was first used in the 0.99 release of GIMP. GTK was subsequently adopted for maintenance by the
GNOME Foundation GNOME Foundation is a non-profit organization based in Orinda, California, United States, coordinating the efforts in the GNOME project. Purpose The GNOME Foundation works to further the goal of the GNOME project: to create a computing platfo ...
, 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 Pango (stylized as Παν語) is a text (i.e. glyph) layout engine library which works with the HarfBuzz shaping engine for displaying multi-language text. Full-function rendering of text and cross-platform support is achieved when Pango is us ...
, a new theme engine, improved accessibility using the
Accessibility Toolkit Accessibility Toolkit (ATK) is an open source software library, part of the GNOME project, which provides application programming interfaces (APIs) for implementing accessibility support in software. One common nomenclature to explain an acce ...
, transition to
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
using
UTF-8 UTF-8 is a variable-length character encoding used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode'' (or ''Universal Coded Character Set'') ''Transformation Format 8-bit''. UTF-8 is capable of e ...
strings, and a more flexible API. Starting with version 2.8, GTK 2 depends on the
Cairo Cairo ( ; ar, القاهرة, al-Qāhirah, ) is the capital of Egypt and its largest city, home to 10 million people. It is also part of the largest urban agglomeration in Africa, the Arab world and the Middle East: The Greater Cairo metr ...
graphics library for rendering vector graphics. GTK version 3.0.0 included revised input device handling, support for themes written with
CSS Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone technolo ...
-like syntax, and the ability to receive information about other opened GTK applications. The '+' was dropped returning to simply 'GTK' in February 2019 during a
Hackathon A hackathon (also known as a hack day, hackfest, datathon or codefest; a portmanteau of hacking and marathon) is an event where people engage in rapid and collaborative engineering over a relatively short period of time such as 24 or 48 hours. Th ...
.


macOS

With
Quartz Quartz is a hard, crystalline mineral composed of silica ( silicon dioxide). The atoms are linked in a continuous framework of SiO4 silicon-oxygen tetrahedra, with each oxygen being shared between two tetrahedra, giving an overall chemical f ...
-backend GTK is available in
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
.


Windows

* After GTK 2.24.10 and 3.6.4 Development of Windows with Installer was closed by Gnome. Installation of MSYS2 on Windows is a good way to use actual GTK. * GTK 2.24.10 and 3.6.4 is available in Internet, but very buggy and limited against actual versions. * A version for Windows 64-bit is prepared by Tom Schoonjans with 2.24.33 (actual like Linux) and 3.24.24 (actual like Linux) from January 2021 available. * Windows 10's Fall Creators Update includes
Windows Subsystem for Linux Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ser ...
(WSL). With Linux distributions like Ubuntu or Debian available from the
Microsoft Store Microsoft Store (formerly known as Windows Store) is a digital distribution platform operated by Microsoft. It started as an app store for Windows 8 and Windows Server 2012 as the primary means of distributing Universal Windows Platform app ...
and an X server like Xming or VcXsvr, thousands of programs like GTK 2 or 3 can run with X or terminal support.


OpenVMS

HP stated that their goal was to merge the needed
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Ope ...
changes into the GTK Version 1.3 development stream, however this never materialised. The latest version of GTK for OpenVMS is version 1.2.10.


GTK 4

One of the cardinal novelties implemented during the GTK 4 development cycle (i.e. GTK 3.92, etc.) has been the delegation of functionality to ancillary objects instead of encoding it into the base classes provided by GTK. * the event handling from signal handlers described by GtkWidget is delegated to event controllers * the rendering is delegated to GtkSnapshot objects * the layout mechanism from GtkWidget is delegated to GtkLayoutManager In 2018-Jan-26 at
DevConf.cz DevConf.cz (Developer Conference) is an annual, free, Red Hat sponsored community conference for developers, admins, DevOps engineers, testers, documentation writers and other contributors to open source technologies. The conference includes top ...
Matthias Clasen gave an overview of the then current state of GTK 4 development, including a high-level explanation of how rendering and input worked in GTK 3, what changes were being made to GTK 4, and the reasons for those changes. Examples of things that have become possible with GTK 4 were given as well.https://mclasen.fedorapeople.org/gtk4-devconf2018.pdf


Releases


See also

* Client-Side Decoration *
List of widget toolkits A ''list'' is any set of items in a row. List or lists may also refer to: People * List (surname) Organizations * List College, an undergraduate division of the Jewish Theological Seminary of America * SC Germania List, German rugby union ...
*
GDK GDK (GIMP Drawing Kit) is a Library (computing), library that acts as a Wrapper pattern, wrapper around the low-level functions provided by the underlying windowing and graphics systems. GDK lies between the display server and the GTK library, ...
– the GIMP Drawing Kit lies between the
xlib Xlib (also known as libX11) is an X Window System protocol client library written in the C programming language. It contains functions for interacting with an X server. These functions allow programmers to write programs without knowing the ...
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 *
gtkmm gtkmm (formerly known as gtk-- or gtk minus minus) is the official C++ interface for the popular GUI library GTK. gtkmm is free software distributed under the GNU Lesser General Public License (LGPL). gtkmm allows the creation of user interface ...
– C++ bindings for GTK * Qt – cross platform framework and toolkit * Xojo – cross-platform development tool and framework *
Enlightenment Foundation Libraries The Enlightenment Foundation Libraries (EFL) are a set of graphics libraries that grew out of the development of Enlightenment, a window manager and Wayland compositor. The project's focus is to make the EFL a flexible yet powerful and easy t ...
(EFL) – widget toolkit written for the Enlightenment window manager * FLTK – a light, cross-platform, non-native widget toolkit *
FOX toolkit The FOX toolkit is an open-source, cross-platform widget toolkit, i.e. a library of basic elements for building a graphical user interface (GUI). FOX stands for Free Objects for X. It features a hard-wired Windows 95-style theme available for ...
– a fast, open source, cross-platform widget toolkit * IUP – a multi-platform toolkit for building native graphical user interfaces * Ultimate++ *
Visual Component Library The Visual Component Library (VCL) is a visual component-based object-oriented framework for developing the user interface of Microsoft Windows applications. It is written in Object Pascal. History The VCL was developed by Borland for use i ...
(VCL) *
Vala Vala or VALA may refer to: Religion and mythology * Vala (Vedic), a demon or a stone cavern in the Hindu scriptures * Völva, also spelled Vala, a priestess in Norse mythology and Norse paganism Fiction * Vala (Middle-earth), an angelic being in ...
– an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject system. *
wxWidgets wxWidgets (formerly wxWindows) is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. wxWidgets enables a program's GUI code to compile and run on several computer platforms with mini ...
- a cross-platform GUI toolkit whose goal is to directly use each platform's native graphic API whenever possible.


References


Bibliography

* * *


External links

* {{DEFAULTSORT:Gtk+ Application programming interfaces Articles with example C code C (programming language) libraries Cross-platform software Free computer libraries Free software programmed in C GNOME Software that uses Cairo (graphics) Software that uses Meson Software using the LGPL license Widget toolkits X-based libraries