Questions tagged [gdk]

Used to tag things that relate to the GIMP Drawing Kit. The GIMP Drawing Kit is the low-level library that provides platform abstraction for the GTK+ widget toolkit.

Best used to tag things that relate to the GIMP Drawing Kit.

Unfortunately there's some overlap with which deals with the (Google) Glass Development Kit.

317 questions
2
votes
1 answer

GTK/GDK Algorithm to take full screenshots of all monitors

I'm fairly new to the whole GTK game and want to create an algorithm to take screen shot of all monitors. I was thinking something along these lines: gdk_display_manager_list_displays each display can have multiple screens (screens means monitors?)…
Noitidart
  • 35,443
  • 37
  • 154
  • 323
2
votes
0 answers

Basic GdkWindow hello world Example?

I'm new to Gtk/Gdk. I've done some work with GtkWindows, but now I need to work with lower level Gdk Windows. I understand GdkWindows are used to implement GtkWindows and GtkWidgets in general. It is the drawing area. I'm kind of not sure where to…
Leo Ufimtsev
  • 6,240
  • 5
  • 40
  • 48
2
votes
1 answer

Getting the active root window using gtk.gdk in Python

In Python, how would I get the active root window (or screen if you will) using gtk.gdk? I'm looking for a cross-platform solution. The below code returns all my three monitors gtk.gdk.get_default_root_window() By active root window, I'd be happy…
user1248084
2
votes
2 answers

Wake Google Glass' Screen to Display Current Information Based on Location

I am building an immersion app for driving that should not display anything on screen and run in the background until the driver reaches some specific location marker. Once at or near this location, based on GPS position, the screen should wake up,…
Autex
  • 307
  • 2
  • 12
2
votes
1 answer

How to make Mono/C# application reserve screen space using GTK?

I have got a Mono/C# application running on linux that has to behave like a panel. It is docked on a side and "always on top" but I can't make it to reserve space on screen. I found out to do something like this: byte[] StrutData = new…
Pavl
  • 83
  • 1
  • 8
2
votes
2 answers

Memory leak in gdk_pixbuf_new_from_file()

Valgrind reports a memory leak when I run this simple test program: #include int main() { GdkPixbuf* buf; GError* err = NULL; buf = gdk_pixbuf_new_from_file("test.jpg", &err); g_assert_no_error(err); …
faken
  • 6,572
  • 4
  • 27
  • 28
2
votes
1 answer

How to render text on a GdkPixbuf.Pixbuf

I'm trying to add text to a Pixbuf, using Python and Gdk 3. I've been searching the web for info about this topic for hours, and it looks like I'll need to create a cairo context from the pixbuf. Unfortunately, I have zero experience with cairo, but…
Aran-Fey
  • 39,665
  • 11
  • 104
  • 149
2
votes
1 answer

GTK/GDK How to find out if a window is overlayed by another one?

I've got a gtk application which features a tray icon, if the user clicks on the icon the visibility of the window is toggled when he's on the same workspace as the window is. When he's on another workspace the window moves to that one. Now, if the…
Ivo Wetzel
  • 46,459
  • 16
  • 98
  • 112
2
votes
2 answers

Where is the KitKat Android GDK Preview?

Anyone know where the GDK preview add-on is? I don't see it in the Android SDK Manager. Is there a different repository that must be configured? I have been developing with the GDK since it was first released, and I see the sneak peak, but not…
Rennie Allen
  • 46
  • 1
  • 4
2
votes
2 answers

GDK signal, keypress, and key masks

I am trying to catch user key press Ctrl+d on a GUI window to quit. My code looks like this: static gboolean callback(GtkWidget *widget, GdkEventKey *event, gpointer data) { if(event->state == GDK_CONTROL_MASK &&…
lllluuukke
  • 1,304
  • 2
  • 13
  • 17
2
votes
1 answer

Understanding the way from hid usage id to gdk keyval on Linux

I wanted to understand the way from the hid usage id of a keyboard through the system up to a GDK keyval inclusive layout translation. Or to be more specific: I have a UTF-8 string and wan't to create a list of hid keys a external device has to play…
user2011659
  • 847
  • 1
  • 7
  • 15
2
votes
1 answer

What are the three arguments to Gdk.threads_add_idle()?

Using python and the gi.repository module, I am trying to call Gdk.threads_add_idle, but I get the error message that three arguments are required. The documentation, however, only mentions two args. You can try the function (on a linux only, i…
Pouria
  • 159
  • 12
2
votes
1 answer

Accessing the Gdk area after import Gtk and closing a window

I found myself in the situation where I needed to close a window which I had subclassed from Gtk.Window. I was connecting the window.destroy event to close the window initially to Gtk.main_quit for testing, but when I loaded the module into my main…
narnie
  • 1,742
  • 1
  • 18
  • 34
2
votes
1 answer

gtk_widget_add_accelerator with no GdkModifierType

I'm trying to add an accelerator to a "Play" GTK+ 3.0 menu item using the following C code: gtk_widget_add_accelerator(play, "activate", accel_group, GDK_KEY_F5, NULL, GTK_ACCEL_VISIBLE); I want the "Play" menu item to be activated when the user…
Vilhelm Gray
  • 11,516
  • 10
  • 61
  • 114
2
votes
1 answer

How to stretch draw a cairo gdk pixbuf pattern region with an arbitrary opacity?

How can I stretch draw an area of a gdk pixbuf to a cairo surface with a user defined opacity? I am trying to write a cross platform interface for working with bitmaps and want to add alpha blending to my cairo stretch draw method. What I have right…
sysrpl
  • 1,559
  • 3
  • 15
  • 24