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
27
votes
5 answers

Ubuntu + Eclipse 4.2 - Dark theme - How to darken sidebar backgrounds?

Due to spending 24/7 programming in front of a computer screen (job, thesis), it's beneficial to view dark colours as much as possible. Ubuntu's Ambiance theme can be neatly enhanced using Solancer's customisations, and Eclipse Juno looks mostly…
KomodoDave
  • 7,239
  • 10
  • 60
  • 92
26
votes
1 answer

how to add tab in notebook when using glade?

When creating a GtkNotebook in Glade, I get 3 tabs by default. How can I add another tab?
capede
  • 945
  • 1
  • 13
  • 26
26
votes
3 answers

GTK+ 3 StatusIcon replacement

I want my GTK application to have a status icon in the system tray, I have got this working quite nicely using a StatusIcon, however this has been deprecated: gtk_status_icon_new has been deprecated since version 3.14 and should not be used in…
Tomha
  • 847
  • 2
  • 8
  • 16
26
votes
4 answers

Getting the actual displayed height and width of a Gtk widget

To get the height and width of a GtkEventBox, I tried the following: GtkRequisition requisition; gtk_widget_get_child_requisition(widget, &requisition); // Getting requisition.height 0 widget->allocation-x //getting 0 widget->allocation-height …
User7723337
  • 11,857
  • 27
  • 101
  • 182
26
votes
5 answers

PyGObject GTK+ 3 - Documentation?

PyGObject appears to have no real documentation. This tutorial is as close as it gets. I've been struggling all morning simply trying to find a description of the arguments accepted by the Gtk.Window constructor. It seems I can't do much reflection…
HOLOGRAPHICpizza
  • 975
  • 1
  • 9
  • 14
25
votes
6 answers

Why is DirectFB not more widely used in GNU/Linux? Are there crippling limitations to it that don't exist in X11?

As far as I understand, DirectFB offers hardware acceleration for many kinds of graphics cards. Additionally, it's smaller, faster, and uses up less memory than X11. Why then, is it not more mainstream than it is now? Here's what I'm really unsure…
user377628
25
votes
1 answer

What is 'client side decoration'?

I am a student who did some web stuff and some command line applications, now giving GUIs a try. I read http://python-gtk-3-tutorial.readthedocs.org/en/latest/layout.html and I stumbled over this sentence: Since GTK+ now supports Client Side…
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
24
votes
5 answers

How to install the libwebkitgtk package on Ubuntu 20.04 LTS?

So I am trying to install Solar2D (formerly known as Corona SDK) to make a mobile game. After installing the dependencies, when I run Solar 2D I get the following error: /home/user/CoronaSimulator/CoronaSimulator: error while loading shared…
Aniket Badole
  • 417
  • 1
  • 4
  • 5
24
votes
10 answers

GTK+ or Qt under Windows

I was wondering which one should I consider if I need the software to be used on both platforms, WIN and Linux and why?
Mike
24
votes
3 answers

What are the differences between Gtk+ and Qt?

A lot of people seem to have an opinion about which is better. I'm not really asking for these opinions, what I'd like to know are the details: What are the things that make one graphical toolkit different from another, and which of these…
Matthew
  • 28,056
  • 26
  • 104
  • 170
23
votes
1 answer

The relationship between libraries: Clutter, Cogl, Clutter, GTK+, etc

I'm a little confused about the relationship of the libraries listed above, here are what I think: Cairo is a 2D graphic library, and GTK+ uses it to render widgets. Cario is low-level. Cogl is a 3D graphic library based on OpenGL(or a fork? I…
molikto
  • 536
  • 3
  • 15
23
votes
3 answers

Vala (C#-like language) compiles to C?

I'm a C# developer who stumbled across a new programming language for linux called vala. It has almost exactly the same syntax as C#, which is awesome. I never really was a big fan of Mono. This allows programmers to write GTK+ apps in a C# style…
Kredns
  • 36,461
  • 52
  • 152
  • 203
23
votes
6 answers

How to auto-scroll a gtk.scrolledwindow?

I have a treeview-widget inside a ScrolledWindow, which is populated during runtime. I want the ScrolledWindow to auto-scroll to the end of the list. I "solved" the problem, by adjusting the vadjustment of the ScrolledWindow, everytime a row is…
Fookatchu
  • 7,125
  • 5
  • 28
  • 26
23
votes
10 answers

Your best library for create GUI ( gtk, qt, win32 api, etc )?

In your opinion, what is the best way to create gui in Windows ? with gtk or win32 api ? Do you recommend GTK for windows ? Yes ? NO ? Why ?
xRobot
  • 25,579
  • 69
  • 184
  • 304
23
votes
6 answers

Gigantic Tabs in Eclipse on Ubuntu

EDIT: For anyone coming to this question through searching, you can install a Gnome Theme called Clearlooks Compact to shorten your tabs in Eclipse. This will free up a lot of screen space. You can also check out the answer below to learn how to…
Zack
  • 2,274
  • 3
  • 24
  • 26