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
7
votes
1 answer

GTK WebAssembly support in the near future?

Do you have any information about GTK WebAssembly support in the near future? QT has announced this week the WebAssembly support, and provided a few impressive online demo. I would like to stick with GTK, I feel it more intuitive for me, but from a…
Peter Mezei
  • 95
  • 1
  • 4
7
votes
1 answer

Get color scheme from GTK

I am developing a desktop app using Python 3 and GTK3. I need a button to change its background color when hover, which can be done with this: self.uploadbutton.modify_bg(Gtk.StateType.PRELIGHT, self.color) Until now, I defined a RGB color that…
CarlosMorente
  • 775
  • 1
  • 7
  • 17
7
votes
1 answer

How to horizontally center a Gtk.Grid inside a vertical Gtk.Box?

I have a Grid containing some Labels inside Frames to make it look like a table. This grid is inserted in a vertical Box in which direct child Labels are centered correctly (they are packed in the box in the same way as the Grid). My simplified code…
silviubogan
  • 3,343
  • 3
  • 31
  • 57
7
votes
2 answers

gtk in-app notifications API referece

I've recently studied the gtk design patterns, and found the in-app notifications. There is an description on when to use it, but no reference to the gtk api. I have searched for it, but found just the GNotification and…
microo8
  • 3,568
  • 5
  • 37
  • 67
7
votes
2 answers

What is the Vulkan equivalent of the GtkGLArea widget (GTK+)?

Background: I want to write a CAD application. I want to implement all rendering with Vulkan. And I want to use GTK+. I don't want a (visible) different window for the rendered image of the object. So I researched and found the GtkGLArea widget,…
le_me
  • 3,089
  • 3
  • 26
  • 28
7
votes
1 answer

What is the preferred way to write GTK-applications?

I recently started learning how to create GUI-applications with GTK+(3) by following the tutorials on the gnome website (first link down below). So, I started going through the first couple of tutorials and everything was going great. Here is some…
Zyphicx
  • 299
  • 2
  • 13
7
votes
1 answer

Setting GtkEntry font from Pango.FontDescription

I have a GtkEntry that's I'd like to allow users to style with their choice of font (or system default). I end up with a Pango description string like "Monospace 10" to describe the font. I'm currently using override_font, which is deprecated in…
Inductiveload
  • 6,094
  • 4
  • 29
  • 55
7
votes
2 answers

'gdk_screen_get_active_window ()' is deprecated since Gtk+ version 3.22

According to https://developer.gnome.org/gdk3/stable/GdkScreen.html#gdk-screen-get-active-window, gdk_screen_get_active_window has been deprecated since version 3.22 and should not be used in newly-written code. But, what should be used instead?…
Colin Keenan
  • 1,089
  • 12
  • 20
7
votes
1 answer

Playing video in Gtk in a window with a menubar

I have created a video player in Gtk3 using Gstreamer in Python3. It works except when I add a GtkMenuBar (place 2). It will then either show a black screen, or fail with an exception. The exception references the XInitThreads, which I am calling…
Aaron Schif
  • 2,421
  • 3
  • 17
  • 29
7
votes
2 answers

select certain monitor for going fullscreen with gtk

I intend to change the monitor where I show a fullscreen window. This is especially interesting when having a projector hooked up. I've tried to use fullscreen_on_monitor but that doesn't produce any visible changes. Here is a non-working…
Frederick Nord
  • 1,246
  • 1
  • 14
  • 31
7
votes
1 answer

Gtk 3 position attribute on insert-text signal from Gtk.Entry is always 0

I am having trouble in managing the insert-text signal emitted by the Gtk.Entry widget. Consider the following example: from gi.repository import Gtk def on_insert_text(entry, new_text, new_text_length, position): print(position) entry =…
R. Cruz
  • 181
  • 8
7
votes
1 answer

With Glade in a dialog window, how do you add response for buttons

How do you link the buttons of a dialog window (GtkDialog for example) with a response Gtk::ResponseType value with Glade?. I know how to do it programmatically but I can not find out how to do it with Glade. In short I have to create the ui file…
cedlemo
  • 3,205
  • 3
  • 32
  • 50
7
votes
1 answer

Wrapping text in GTK3 treeview

I have trouble getting TreeView in GTK3 to wrap text correctly. I set it up to wrap in this way: Gtk::TreeViewColumn* pColumn = mTreeView.get_column(2); static_cast(pColumn->get_first_cell()) …
kracejic
  • 723
  • 1
  • 6
  • 17
7
votes
1 answer

How to unfocus (blur) Python-gi GTK+3 window on Linux

What I want to do and why I want my window to unfocus, so the previous focused window is selected. Why? I want to interact with the previously selected window (from other programs). My current plan is: unfocus my window, use libxdo to simulate…
Jorge Suárez de Lis
  • 565
  • 1
  • 10
  • 29
7
votes
1 answer

Gtk3 Popover outside the window

How can i make Popover appears outside application window like menu in gnome-shell panel? Or should i use another GTK widget?
br.
  • 1,259
  • 1
  • 14
  • 21