Questions tagged [gtk3]

The GIMP ToolKit (GTK+) in its version 3.x. GTK+ is a highly usable, feature-rich toolkit for creating graphical user interfaces (GUIs) that boasts cross platform compatibility and an easy to use API.

GTK+ is written in C, but has bindings to many other popular programming languages such as C++ (), Python (), and C# 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.

The latest version is GTK+ 3, released in January, 2011.

For questions not specifically regarding GTK 3, please use instead.

Reference documentation in C

Reference documentation in Python

3219 questions
1
vote
1 answer

Installing gtk3 + glade on Windows 10

I am new to python and I have been trying to install gtk3 to use with glade to build a GUI with Python 2.7. I have successfully installed Glade, however I am having some major issues finding and running gtk3 for windows. I have visited the gtk…
mdicrist
  • 175
  • 2
  • 12
1
vote
2 answers

GTK3 + OpenGL for windows: multiple GtkGLArea (ie. OpenGL contexts)

I am developing a GTK3 based application with OpenGL windows created using the GtkGLArea widget, to build the application on windows I use the msys2 64 bits system. No problem to build the application, it works just with a single OpenGL window.…
1
vote
0 answers

python gtk3 popup window activate

Environment Python 3, Gtk3: I want to have an entry in a Gtk3 form that displays a date in DD/MM form. I intend to use a popup window that will display a calendar and return the day and month selected. I assume that a click on the (blank) entry will…
ggemmill
  • 69
  • 1
  • 6
1
vote
1 answer

GTK Vala can't find gtk+-3 even though it is installed

I'm trying to create a simple GUI application with Vala to demonstrate running a basic application which shows a Gtk.Window. (I'm running Fedora 25 with up to date packages if it helps at all) My window.vala file looks like this: using GLib; using…
KG6ZVP
  • 3,610
  • 4
  • 26
  • 45
1
vote
1 answer

How to handle mouse motion events in GTK3?

I am trying to implement the following feature using C/GTK3/Cairo: -Left click on an GtkDrawingArea Widget and printf the coordinates Xo and Yo. -While keeping the left button down, move the mouse and draw a line conecting (Xo,Yo) to the current…
PintoDoido
  • 1,011
  • 16
  • 35
1
vote
1 answer

Does GTK 2/3 support efficient virtual tables?

We are developing a Java application using SWT which offers virtual tables. Test code which allows to switch the number of table rows between 100 and 10M works in less than 100ms on Windows and OSX, but takes several seconds on Ubuntu 16.04. Now we…
mstrap
  • 16,808
  • 10
  • 56
  • 86
1
vote
2 answers

Drawing lines using Cairo in real time

In zetcode "Lines" code, I am trying to display the lines in real time as the mouse button is clicked. I then changed the clicked function to static gboolean clicked(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { if…
PintoDoido
  • 1,011
  • 16
  • 35
1
vote
1 answer

Gtk Widget add_child fails with error

I am trying to create a custom Gtk text entry. The basic idea is to put a button inside of a text entry. Here is a shortened version of my full code: import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk builder =…
theGtknerd
  • 3,647
  • 1
  • 13
  • 34
1
vote
1 answer

Changing a GtkMenuItem label in a menubar generated by GtkBuilder

I have the following XML code that I use to generate a GtkMenuBar by means of GtkBuilder: test
1
vote
1 answer

How to find the current font for GtkLabel

I know that similar question was already asked here: How to get a current font for GtkTextView? But gtk_style_context_get_font has been deprecated since version 3.8 and should not be used in newly-written code. Use gtk_style_context_get() for…
ProNOOB
  • 504
  • 2
  • 14
1
vote
1 answer

How to use GtkAda in command-line?

I try to compile a very simple GtkAda application in command-line, on Windows. Here is the app code: `WITH Gtk.Main ; USE Gtk.Main ; WITH Gtk.Window ; USE Gtk.Window ; PROCEDURE Test01 IS win : Gtk_window ; BEGIN Init ; …
yO_
  • 1,135
  • 2
  • 12
  • 18
1
vote
2 answers

GTK+3 render rectangle with selection background color

How is it possible to render a rectangle with the background color of selections in GTK+3. I cannot find any API to do that: static gboolean draw_callback (GtkWidget *widget, cairo_t *cr, gpointer data) { auto…
user877329
  • 6,717
  • 8
  • 46
  • 88
1
vote
1 answer

Get full file path from GtkTreeView

So, I found a tutorial on creating a file browser using Gtk.TreeView but I'm facing a problem, when I select a file inside a folder I cant get the file's full path. I can get the model path but I don't know what to do with it. This is my project…
Paulo Queiroz
  • 123
  • 2
  • 9
1
vote
2 answers

Memory leak on ruby gtk-3

I'm experiencing a memory leak on ruby 2.3.1 with gtk-3. On my system (Ubuntu 16-04) the following code consumes approximately 80 MB. The size of picture.jpg is 289kb. `require 'gtk3' def ptest i=0 j=0 loop { i += 1 j += 1 …
Jogan Thums
  • 227
  • 1
  • 2
  • 9
1
vote
1 answer

How can I create a 'Click Event' on Image object in GTK3 and Python 2.7

I am creating a program using Python 2.7 and GTK3+ with Glade under Linux. I have an Image object and want to run a method when the image is clicked. Here is the object
themetman
  • 51
  • 6
1 2 3
99
100