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
19
votes
2 answers

Difference between GtkWindow and GdkWindow?

At the beginning of my Gtk-Gdk-Cairo-Pango app, I create the window: GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); First, there is GtkWindow, but gtk_create_window returns GtkWidget, not GtkWindow, why? Then, some functions, like…
exebook
  • 32,014
  • 33
  • 141
  • 226
14
votes
2 answers

How do I get the gdk window for a gtk window in C?

I'm trying to set the cursor to a watch. The problem is that gdk_set_cursor() requires a gdk_window. How do I get the gdk_window of a gtk_window in C? I've seen examples for gtkmm and pygtk but I can't find the corresponding C function.
Erwin J.
  • 587
  • 1
  • 5
  • 15
13
votes
4 answers

GTK3 and multithreading, replacing deprecated functions

I would like to replace deprecated functions gdk_threads_enter()/leave() in my application that uses threads. The application as it is now, works perfect (although i am not sure if this is the right way to do it). My main loop, runs the gtk_main and…
Sam Gomari
  • 733
  • 4
  • 13
  • 37
11
votes
1 answer

Using Groovy comparison operators with Date objects

I'm investigating an issue and ran across some suspicious code involving comparison of Date instances using comparison operators. e.g. def stamp = ... //Date def offset = ... //Integer def d = new Date(stamp.time + offset) if (d <…
Stephen Swensen
  • 22,107
  • 9
  • 81
  • 136
10
votes
1 answer

How do I get size of the screen excluding Unity side panel in GDK

I'm trying to make Guake terminal work correctly in Unity. Its window have width that is equal to screen width. But because of Unity left bar window's right border becomes invisible. So, I want to set proper width for window. It must be smaller than…
Pavel Strakhov
  • 39,123
  • 5
  • 88
  • 127
9
votes
6 answers

Groovy GDK equivalent of Apache Commons StringUtils.capitalize(str) or Perl's ucfirst(str)

Yes/no-question: Is there a Groovy GDK function to capitalize the first character of a string? I'm looking for a Groovy equivalent of Perl's ucfirst(..) or Apache Commons StringUtils.capitalize(str) (the latter capitalizes the first letter of all…
knorv
  • 49,059
  • 74
  • 210
  • 294
8
votes
1 answer

How to directly write to display buffer in GTK/GDK

I have a program that displays an animation with a fixed frame rate (say 30 fps) in a window. Currently I use SDL but unfortunately it lacks desktop integration(like drag & drop) and now I want to use GTK instead. so what I want to do (assuming the…
maep
  • 1,318
  • 1
  • 12
  • 15
8
votes
2 answers

How can i import gtk.gdk from gi.repository

I have this python code that takes screenshot of x screen. #!/usr/bin/python import gtk.gdk w = gtk.gdk.get_default_root_window() sz = w.get_size() print "The size of the window is %d x %d" % sz pb =…
mnrl
  • 1,635
  • 2
  • 17
  • 28
7
votes
1 answer

How to use Gdk# library in C# (mono)?

I'm a complete newbie with Gtk# and Gdk# and I'm completely lost as to how to get started. All I'm trying to do is to draw points and lines in whatever widget/pixmap/image and then display them in my gtk application. So far, I understand I must…
djahma
  • 281
  • 2
  • 6
7
votes
2 answers

Gtk: get usable area of each monitor (excluding panels)

Using gdk_screen_get_monitor_geometry, I can get the total area in pixels and the relative position of each monitor, even when there are two or more used as a single screen. However, I want to get the usable area (that is, excluding panels) of each…
Chris Camacho
  • 1,164
  • 1
  • 9
  • 31
7
votes
2 answers

How to use gdk_device_get_position()?

I am trying to get the pointer position on screen in Gdk and found gdk_display_get_pointer(), which works fine, but it's marked as deprecated and refers to gdk_device_get_position() now. But how do I use this function? I cannot get a GdkDevice,…
Kugel
  • 808
  • 8
  • 26
7
votes
1 answer

Pointers in Lisp?

I've started learning Lisp recently and wanted to write a program which uses gtk interface. I've installed lambda-gtk bindings (on CMUCL). I want to have putpixel/getpixel ability on a pixbuf. But I found that I'm unable to direct access memory. (or…
x13n
  • 4,103
  • 2
  • 21
  • 28
7
votes
2 answers

'gi.repository.Gtk' object has no attribute 'gdk'

I'm trying to create a multiple threading with GTK. Gtk.gdk is needed but i received error about no gdk attribute. I'm using a Raspberry Pi with Raspbian. This is how i import GTK library. try: import pygtk pygtk.require("2.0") except: …
Kin
  • 171
  • 1
  • 14
6
votes
1 answer

GDK Screen vs Monitor vs Display?

I'm currently working on a small app to take a screenshot of all the physical monitors. I am getting very confused though between all the terminology. I understand: that we can have multiple displays each display can have multiple monitors, which…
Noitidart
  • 35,443
  • 37
  • 154
  • 323
6
votes
3 answers

Groovy's extension-module compared to java's inheritance

Is groovy's extension module feature a hybrid form of java's inheritance feature? Why are the extension-module needs to be declared as static?
user2454455
1
2 3
21 22