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

List available languages for PyGTK UI strings

I'm cleaning up some localisation and translation settings in our PyGTK application. The app is only intended to be used under GNU/Linux systems. One of the features we want is for users to select the language used for the applications (some prefer…
detly
  • 29,332
  • 18
  • 93
  • 152
3
votes
3 answers

Coding a GTK+ application without window manager?

I want to code sth. that basically works like TiVo. Switch it on, you only see the menu or an output, so no underlying OS or anything else is directly visible to the user. So I want to use Linux as base. Can you suggest a good base…
ShoX
  • 577
  • 2
  • 7
  • 14
3
votes
1 answer

Cairo fill a polygon with a hatch pattern

Is it possible with cairo to fill a box or a polygon with a hatch (or arbitrary) pattern like below ? I didn't find informatinos in the cairo documentation or hackage. Are there built-in pattern in cairo ? What are the functions to fill with…
JeanJouX
  • 2,555
  • 1
  • 25
  • 37
3
votes
1 answer

Build a simple browser with python

I want to build an ultra minimal browser which will just load one url, and will always be in full screen or kiosk mode. I will be running this in a Raspberry Pi. I explored several options in stack overflow and Google. Below are the potential…
esafwan
  • 17,311
  • 33
  • 107
  • 166
3
votes
1 answer

How to capture keyboard input without a text box in Eto

I have a project (Void) using the Eto GUI framework for .NET and Mono. I am building a Vim-like text editor which will have at least some of the modes which Vim has (and yes, I know, one does not simply...). The basic structure of my GUI is just a…
Keith Pinson
  • 7,835
  • 7
  • 61
  • 104
3
votes
1 answer

MVC in Qt vs Gtk+

I am a Qt C++ programmer with some interest in Gtk+. I wonder how Gtk+ has implemented Model-View-Controller. In Qt they basically screwed it up, and have basically admitted that themselves. I can try to explain the flaws in Qt and for those who…
Erik Engheim
  • 8,182
  • 4
  • 36
  • 51
3
votes
0 answers

Changing input language in gtk - C

Im trying to change the input language in gtk , without asking the user to change his keyboard layout(just for one program), can i do that? If not can i change the layout?(i think i cant) If not can i get the key that the user inputed .Not the…
PRO META X
  • 31
  • 2
3
votes
1 answer

How to access the theming Fonts and Colors on GTK/Gnome

Lets say i want to write a special text editor widget. How can i get the default themed colors for texts, selected text and background and which are the users default fonts? I see that GNOME does define 5 special system fonts and default sizes for…
Lothar
  • 12,537
  • 6
  • 72
  • 121
3
votes
0 answers

Gtk2Hs make its own Signal (or Event)

I'm trying to create a program with Gtk2Hs and Haskell and I wonder if it is possible to create a new signal with Gtk. For example I created a hBox containing a button and a text entry. This component can be added at differents places in the window…
JeanJouX
  • 2,555
  • 1
  • 25
  • 37
3
votes
2 answers

GTK+ 2 C - enter pressed or button clicked to get text from entry widget

what should I do to print text from entry when enter is pressed or button is clicked with one function? I am asking because when I am clicking at button I get "(PMAF:3592): Gtk-CRITICAL **: IA__gtk_entry_get_text: assertion 'GTK_IS_ENTRY (entry)'…
jjpikoov
  • 119
  • 1
  • 11
3
votes
0 answers

Install Glade 3.8.5 in english (Windows)

Does anyone know how can I change the language of Glade 3.8.5 to English from my native language, Greek? Thank you. (OS Windows)
acommenter
  • 47
  • 5
3
votes
2 answers

How do I create a new thread to make pcap_loop() and gtk_main() compatible?

These two functions are both infinite loops, and the programe hangs once called in the same thread. gtk_main(); ... pcap_loop(adhandle, 0, packet_handler, NULL); When I click the "start" button,I want pcap to start working;And if I press the…
httpinterpret
  • 6,409
  • 9
  • 33
  • 37
3
votes
2 answers

How to prevent widgets from expanding to whole box (GTK 2)

I'm having the following issue with GTK2: I created two buttons with labels inside an horizontal box. (I intend to pile several hboxes) However there's an issue: When I make the box_pack functions they go like…
Kelthar
  • 124
  • 9
3
votes
1 answer

How to force a gtk tooltip to be shown?

I have an application and I want to show a tooltip every time a user set the focus on a entry widget. Do you know a way to force a gtk Tooltip to be shown?, because right now it only shows when the user puts the mouse pointer over the entry, but…
markuz
  • 909
  • 8
  • 13
3
votes
1 answer

GObject OOP Syntax

I'm looking for a GObject cheat sheet, how common OOP concepts map to GObject's facilities. Consider for example: AnyGObject *o; o = anygobject_new(); Now, what are the conventions for... calling a method calling a method declared by a base…
edgar.holleis
  • 4,803
  • 2
  • 23
  • 27