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
0 answers

GTK3 Cairo definitions

I'm just starting out writing GUI apps with Python and selected GTK3 as the platform (switched from QT after it kept crashing with GC errors when using python Threads). I continue to struggle with the documentation and API references. In this…
RLI123
  • 487
  • 3
  • 13
3
votes
1 answer

Thread synchronization in GTK3+ and Python

I'm currently learning both Python and GTK 3+ and I've a problem when synchronizing threads. I'll try to be quick and clear: I have to make a Social Network client. As the purpose is to learn how to create a GUI the "access to the social network…
3
votes
1 answer

GTK+ opening link in about dialog fails on Windows

I am writing a C/GTK+ application and this should be targeted for both Linux and Windows. I have encountered a problem when I open the website link in the about dialog: the expected behaviour would be the browser to open and show the relative…
Pyrox
  • 551
  • 5
  • 17
3
votes
2 answers

How can I get the application path in C?

I'm using GTK to create an interface for my C program running Linux. I'm using this function to load my XML interface: gtk_builder_add_from_file(builder, g_build_filename("myInterface.glade", NULL), &error); As long as I'm in the same directory as…
Adrien Neveu
  • 827
  • 1
  • 15
  • 28
3
votes
0 answers

Using CSS along with GTK+ 3.xx and Glade 3

I want to make small GUI based program in C using GTK+ and Glade which would consist of some custom elements, a bit transition effects etc. Can i use Glade along with CSS to create such UI. If so, what is the way to do so ?
user3636470
  • 67
  • 1
  • 5
3
votes
1 answer

GTK apps show "green" too dark

Using Ubuntu 14.04 Trusty, for whatever reason some GTK apps show things that should should be "green" as a color that is very close (but not identical) to "dark green". Wasn't able to see anything strange in the gtk themes, or X11 rgb.txt. Several…
pieter3d
  • 135
  • 6
3
votes
1 answer

Gtk style/gtkrc related question

I trying to set separate style for particular widgets, like for one button with different style and another one with other style. this style will be specified in gtkrc file. I tried following stuff but it did not work. In gtkrc file: style…
User7723337
  • 11,857
  • 27
  • 101
  • 182
3
votes
3 answers

C#/MonoDevelop: GTK MessageDialogs require a doubleclick to close - why?

I'm a newbie programmer writting a program in MonoDevelop in C# and have a porblem with my gtk MessageDialogs. The close button on the window boarders of my GTK Message dialogues require a double click to actually close them. The close button on the…
Connel
  • 1,844
  • 4
  • 23
  • 36
3
votes
1 answer

How can I load a Python flask app into a gtk webview (Webkit)

I am currently working on an application that requires math expressions to be rendered (from latex) and needs to have some sort of native gui (even if it just uses gtk, then renders html in webkit). I did some research and decided an easy way to do…
luke
  • 1,005
  • 7
  • 19
3
votes
3 answers

Is there a list/guide/documentation where the GTK constants went in GTK+ 3 in Python 3.x?

It's been widely discussed that a few things changed from Python2/Gtk2 to Python3/Gtk+3. I got along with that so far, but there is one thing I am having trouble with: Where did all the constants go? In Python 2.x I could just do gtk.RESPONSE_OK and…
neo post modern
  • 2,262
  • 18
  • 30
3
votes
1 answer

Modify text being inserted into GTK TextBuffer

I have a TextView and I want to automatically convert all typed, pasted, etc. text to uppercase, is it possible? I tried adding a bufferInsertText handler and inserting text from there by myself, but this error message kept popping up: Gtk-WARNING…
Emily
  • 2,577
  • 18
  • 38
3
votes
5 answers

Can I avoid a threaded UDP socket in Python dropping data?

First off, I'm new to Python and learning on the job, so be gentle! I'm trying to write a threaded Python app for Windows that reads data from a UDP socket (thread-1), writes it to file (thread-2), and displays the live data (thread-3) to a widget…
666craig
  • 29
  • 1
  • 2
3
votes
2 answers

Cant get GTK Themes to run on OS X

I am running OSX Mavericks with Homebrew and I am trying to get a GTK theme running which requires the murrine engine. I have the following packages installed: gtk+ gtk+3 gtk-chtheme gtk-engines gtk-murrine-engine gtkmm However gtk-chtheme does…
user3797315
  • 31
  • 1
  • 2
3
votes
1 answer

How to draw a new line on Gtk::DrawingArea area, while peristing previous lines that have already been drawn?

I am using C++11 with GNU tool chain with gtkmm3, on Ubuntu 12.04 LTS 32 bit. I have been playing wtih some of the examples for gtkmm3 in Programming with gtkmm 3. Based on 17.2.1.Example there, I inherited from Gtk::DrawingArea (MyDrawingArea here)…
Vector
  • 10,879
  • 12
  • 61
  • 101
3
votes
2 answers

How to Zoom with Poppler

Language C, UI library: GTK, renderer: poppler I'm newbie in GTK/Poppler programming and a bit stuck with understanding how to solve Zoom issue with poppler. When I use the function below everything is ok, except zooming (hence - scrollbars). I've…
Alexey Abraham
  • 379
  • 2
  • 13