www.gtk.org Open in urlscan Pro
2620:52:3:1:5054:ff:fe0d:ee0f  Public Scan

URL: https://www.gtk.org/
Submission Tags: falconsandbox
Submission: On December 21 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

GTK
Features
Docs
Community
Code
Development Blog


CREATE APPS THAT USERS JUST LOVE

Offering a complete set of UI elements, GTK is suitable for projects ranging
from small one-off tools to complete application suites.

Learn GTK
Downloads
Linux Windows MacOS
Latest stable v4.4.1
Latest unstable v4.5.1
Latest old stable v3.24.31




WORK WITH THE LANGUAGE OF YOUR CHOICE

Develop your GTK app with your language of choice by using Language Bindings or
wrappers and take full advantage of the official GNOME bindings which guarantee
API stability and time-based releases.

C JavaScript Perl Python Rust Vala

// Include gtk
#include <gtk/gtk.h>

static void on_activate (GtkApplication *app) {
  // Create a new window
  GtkWidget *window = gtk_application_window_new (app);
  // Create a new button
  GtkWidget *button = gtk_button_new_with_label ("Hello, World!");
  // When the button is clicked, close the window passed as an argument
  g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_close), window);
  gtk_window_set_child (GTK_WINDOW (window), button);
  gtk_window_present (GTK_WINDOW (window));
}

int main (int argc, char *argv[]) {
  // Create a new application
  GtkApplication *app = gtk_application_new ("com.example.GtkApplication",
                                             G_APPLICATION_FLAGS_NONE);
  g_signal_connect (app, "activate", G_CALLBACK (on_activate), NULL);
  return g_application_run (G_APPLICATION (app), argc, argv);
}


imports.gi.versions['Gtk'] = '4.0';
const Gtk = imports.gi.Gtk;

// Create a new application
let app = new Gtk.Application({ application_id: 'com.example.GtkApplication' });

// When the application is launched…
app.connect('activate', () => {
    // … create a new window …
    let win = new Gtk.ApplicationWindow({ application: app });
    // … with a button in it …
    let btn = new Gtk.Button({ label: 'Hello, World!' });
    // … which closes the window when clicked
    btn.connect('clicked', () => { win.close(); });
    win.set_child(btn);
    win.present();
});

// Run the application
app.run([]);


#!/usr/bin/env perl
use strict; use warnings; use utf8;
use Glib::IO;
use Gtk4;

# Create a new application
my $app =
  Gtk3::Application->new('com.example.Gtk3Application', 'G_APPLICATION_FLAGS_NONE');

# When the application is launched…
$app->signal_connect(
  activate => sub {
    my $app = shift;
    # … create a new window …
    my $win = Gtk3::ApplicationWindow->new($app);
    # … with a button in it …
    my $btn = Gtk3::Button->new('Hello World!');
    # … which closes the window when clicked
    $btn->signal_connect(clicked => sub { $win->close(); });
    $win->set_child($btn);
    $win->present();
  }
);

# Run the application
$app->run(\@ARGV);


# Load Gtk
import gi
gi.require_version('Gtk', '4.0')
from gi.repository import Gtk

# When the application is launched…
def on_activate(app):
    # … create a new window…
    win = Gtk.ApplicationWindow(application=app)
    # … with a button in it…
    btn = Gtk.Button(label='Hello, World!')
    # … which closes the window when clicked
    btn.connect('clicked', lambda x: win.close())
    win.set_child(btn)
    win.present()

# Create a new application
app = Gtk.Application(application_id='com.example.GtkApplication')
app.connect('activate', on_activate)

# Run the application
app.run(None)


use glib::clone;
// glib and other dependencies are re-exported by the gtk crate
use gtk::glib;
use gtk::prelude::*;

// When the application is launched…
fn on_activate(application: &gtk::Application) {
    // … create a new window …
    let window = gtk::ApplicationWindow::new(application);
    // … with a button in it …
    let button = gtk::Button::with_label("Hello World!");
    // … which closes the window when clicked
    button.connect_clicked(clone!(@weak window => move |_| window.close()));
    window.set_child(Some(&button));
    window.present();
}

fn main() {
    // Create a new application with the builder pattern
    let app = gtk::Application::builder()
        .application_id("com.github.gtk-rs.examples.basic")
        .build();
    app.connect_activate(on_activate);
    // Run the application
    app.run();
}


int main (string[] argv) {
    // Create a new application
    var app = new Gtk.Application ("com.example.GtkApplication",
                                   GLib.ApplicationFlags.FLAGS_NONE);

    app.activate.connect (() => {
        // Create a new window
        var window = new Gtk.ApplicationWindow (app);

        // Create a new button
        var button = new Gtk.Button.with_label ("Hello, World!");

        // When the button is clicked, close the window
        button.clicked.connect (() => {
            window.close ();
        });

        window.set_child (button);
        window.present ();
    });

    return app.run (argv);
}



APPS BUILT WITH GTK

Developers around the world have used GTK as a platform to create apps that
solve problems faced by end-users.

Image Viewer
Polari
Key Sign
Maps
Transmission
Password Safe
GIMP
Fonts
Calculator
Dictionary
Games
Evolution
Image Viewer
Polari
Key Sign
Maps
Transmission
Password Safe
GIMP
Fonts
Calculator
Dictionary
Games
Evolution
Image Viewer
Polari
Key Sign
Maps
Transmission
Password Safe


INTEGRATIONS FOR RAPID APPLICATION DEVELOPMENT

Glade is a RAD tool that enables quick and easy development of user interfaces
for the GTK toolkit and the GNOME desktop environment.



--------------------------------------------------------------------------------


A FEATURE-RICH DEVELOPMENT TOOL

GTK has all the features that a widget toolkit needs to have. These features
make it the most trusted toolkit for developing Linux applications.

PORTABILITY

Projects built using GTK and its dependencies run on well known operating
systems.

STABILITY

GTK delivers the enticing features and superb performance which adds to your
applications.

LANGUAGE BINDINGS

GTK is written in C but has been designed to support a wide range of languages
such as Python, JavaScript, C++, Rust and many more.

INTERFACES

GTK has a comprehensive collection of core widgets like Buttons, Windows,
Toolbars for use in your application.

OPEN SOURCE

GTK is a free and open-source project maintained by GNOME and an active
community of contributors. GTK is released under the terms of the GNU Lesser
General Public License.

API

GTK boasts of an easy to use API which helps in decreasing your development time
and help you achieve better results.

ACCOMMODATION

GTK caters to many features like Native look and feel, theme support,
Object-oriented approach that today’s developers look for in a toolkit.

FOUNDATIONS

GTK is built on top of GLib. GLib provides the fundamental data types and system
integration points to avoid duplicated code in applications.

DEVELOP WITH GTK

By taking advantage of GTK being a cross-platform development tool and its easy
to use API, you can develop amazing apps using the GTK. If you are interested in
developing an app, get started now by developing this example application.

DEVELOP GTK

GTK is a large project and relies on volunteers from around the world. To help
us with the project development, hack away on the existing bugs and feature
requests.

LOOKING FOR HELP?

If you want to ask questions about GTK, whether it’s for developing applications
with GTK or contributing to GTK itself, you can use the GNOME Discourse
instance, under the Platform/Core category. You can use tags like gtk or glib to
narrow down the topic of discussion to specific libraries. You can also ask
questions on our IRC channel.


NEWS AND EVENTS

CATCH UP WITH GTK DEVELOPMENT

Get in touch with GTK developers through IRC. Get daily updates about GTK and
its community from GTK blog or through its Twitter account.

MEET THE COMMUNITY

As regularly as possible, GTK team meetings take place at conferences and
hackfests to discuss the future of GTK and define a roadmap.

CONTRIBUTE TO GTK

If you are a developer and want to contribute to GTK, you are more than welcome
to do so.

GTK is hosted by GNOME.

GTK is maintained by the GTK Team.

© 1997-2021, The GTK Team. All Rights Reserved.

GTK and the GTK logo are trademarks of the GNOME Foundation.

PROJECT

 * GTK
 * Features
 * Docs
 * Downloads
 * License
 * Releases
 * Code

SUPPORT

 * FAQs
 * Report a Bug
 * Request a feature

COMMUNITY

 * Community
 * Development Blog
 * Discussion
 * Code of Conduct
 * Donate

ABOUT THE SITE

 * Hosted on Gitlab.
 * Powered by Jekyll.
 * Report an issue.

 * 
 * 
 *