Questions tagged [gtk]

GTK (formerly GTK+) is a toolkit for creating graphical user interfaces (GUIs) with cross platform compatibility and an easy to use API.

GTK is written in C, and has bindings to many other popular programming languages such as C++ (), Python (, ), C# (), and Perl, among others. GTK+ is licensed under the GNU LGPL 2.1, allowing development of both free and proprietary software with GTK+ without any license fees or royalties.

"GTK" stands for GIMP Tool Kit. It was originally developed to serve as the widget set for The GIMP, the GNU Image Manipulation Program. In the intervening years its usage has expanded greatly.

This tag should be used for questions about GTK in general. For more specific questions regarding how a certain version works, use or .

Reference GTK 3 documentation: http://developer.gnome.org/gtk3/stable/

Reference GTK 2 documentation: http://developer.gnome.org/gtk2/stable/

GTK Java binding - http://java-gnome.sourceforge.net/

GTK 2 Perl binding - https://metacpan.org/pod/Gtk2

GTK 3 Perl binding - https://metacpan.org/pod/Gtk3

Books:

SO Chatroom:

8468 questions
3
votes
2 answers

Compile GTK+ with Cygwin

I have created an application in linux with GTK2 as GUI. It uses some linux-specific headers (e.g. arpa/inet.h) so to run under Windows I have to compile it with Cygwin. I downloaded the latest installer and choose to install GTK2 and its…
user197967
3
votes
2 answers

Getting keyboard modifiers state using Gnome libs (GDK) fetches initial state only

I'm trying to get the current keyboard modifiers state through gnome GDK or GTK library in aim to implement an accessibility gnome shell extension that shows that state. I know how to get thier state using xlib, but there is not full binding for…
user.dz
  • 962
  • 2
  • 19
  • 39
3
votes
0 answers

Handle X11 damage events in a GTK2 application

I am writing a GTK2 widget that shows images of all open windows. These images will update in real time. To do this, I will use the X11 Damage extension. As far as I understand, the first step is to register an interest in damage events for a given…
adlo
  • 63
  • 8
3
votes
2 answers

Enable GtkFileChooserDialog to select files OR folders

Using GTK+'s GtkFileChooserDialog, how can I allow the user to select a file or a folder (both are valid here). The actions available are mutually exclusive.
Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
3
votes
2 answers

Why is my cairo_surface_t drawing semi-transparent?

I am trying to draw a png image, the contents of which I have in memory in an ARGB32 format, using C++ Cairo and Gtk on Ubuntu. First, I create a GtkDrawingArea, then on its expose-event I draw a solid blue background with a red line from top left…
user2062604
  • 247
  • 3
  • 16
3
votes
1 answer

no method named `connect_activate` when using the gtk crate

I am trying to write simple GTK application in Rust, but faced with problem that I cannot add signal to menu item. There is simplified code to reproduce problem: Glade file ("interface.glade"):