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
6
votes
4 answers

Python GTK Drag and Drop - Get URL

I'm creating a small app must be able to receive URLs. If the apps window is open, I should be able to drag a link from a browser and drop it into the app - and the app will save the URL to a database. I'm creating this in Python/GTk. But I am a bit…
Binny V A
  • 2,036
  • 3
  • 20
  • 23
5
votes
0 answers

GTK: Check for KeyEvent including shift key

In my application, I would like to check for a GTK key_press event with the key combination <#>. My code: (In this case, Python, but the problem is language-independent, I guess) def on_key_press(self, widget, event): if…
user4209617
5
votes
0 answers

Copy-paste of selections with Xlib in X11: XA_TARGETS array of atoms

I've implemented copy-paste of text strings in an Xlib program. When my program owns the current selection, and I paste into xterm, or into a text field in gimp, or into firefox, it works fine: the program I'm pasting into sends a SelectionRequest…
5
votes
2 answers

Detecting when a GTK window is done moving/resizing by the user

I want to detect when the user finished re-sizing or moving the GTK window. Basically an equivalent of WM_EXITSIZEMOVE in windows. I have looked at GTK detecting window resize from the user and am able to detect size/location changes using the…
Manny
  • 699
  • 6
  • 19
4
votes
3 answers

How to get total screen size in Python / GTK without using deprecated Gdk.Screen.get_width()?

I want the X/Y pixel dimensions of the entire desktop (potentially spanning multiple monitors), e.g. to determine the optimal resolution of a background image. This Python code still works: from gi import require_version require_version("Gdk",…
Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
4
votes
1 answer

Why does gtk have gint, gdouble... which are just typedef?

According to the official GTK documentation, gdouble, gchar, etc are just typedef of the normal C types. What's the point of it ? Why not simply use the traditional name, int, char; why take the trouble to typedef them all and as far as I can see,…
user96649
  • 471
  • 1
  • 5
  • 22
4
votes
1 answer

Unable to change cursor with GTK3

I am trying to change the cursor of a window dynamically with GTK3 but gtk_widget_get_parent_window doesn't seem to work. Could someone please point out what I'm doing wrong? Thanks! //…
I .
  • 113
  • 1
  • 9
4
votes
2 answers

PyGObject and cx_freeze on Windows

I am trying to "freeze" a Python 3 file that uses PyGObject and Gdk/Gtk. Here is the Python script: from gi.repository import Gtk, Gdk class Handler: def onDeleteWindow(self, *args): Gtk.main_quit(*args) def searchPressed(self,…
Arc
  • 329
  • 3
  • 11
4
votes
1 answer

How to enable scrolling on a simpleadapter on Google Glass's firmware X16

After updating my Google Glass up to XE16 my listview, which I have built by using a simpleadapter, is not able to scroll anymore. Is there a way to manually enable scrolling nonetheless with the GDK or fix this issue?
BarryK88
  • 1,806
  • 2
  • 25
  • 41
4
votes
1 answer

Using GdkFrameClock to synchronize a GtkDrawingArea with the screen refresh rate

Background I want to synchronize the updating of a widget to the screen refresh rate using GdkFrameClock. This is for visual stimulation response measurements off of an LCD screen (and therefore requiring as-close-to-exact frame synchronization as…
user
  • 4,920
  • 3
  • 25
  • 38
4
votes
1 answer

Get pixel value on Gdk::Pixbuf, Set pixel value with Gdk::Cairo

I'm using a Gdk::Pixbuf to display an image with Gdk::Cairo in C++ : virtual bool on_draw(const Cairo::RefPtr& cr) { Glib::RefPtr image = Gdk::Pixbuf::create_from_file(filename); Gdk::Cairo::set_source_pixbuf(cr,…
Jav
  • 1,445
  • 1
  • 18
  • 47
4
votes
1 answer

Gdk: how to remove bit from event mask in Python?

I want to remove the POINTER_MOTION_MASK from my window's events. I tried: win.set_events(win.get_events() & ~Gdk.EventMask.POINTER_MOTION_MASK) however, I get this error: TypeError: Expected a Gdk.EventMask, but got int How should I remove the…
Charles Brunet
  • 21,797
  • 24
  • 83
  • 124
4
votes
2 answers

How is Cairo related to GDK?

What exactly is the function of the GDK library and how does Cairo fit in? Are they competing or complementary technologies? Does one of them depend upon the other in any way?
Nishant George Agrwal
  • 2,059
  • 2
  • 12
  • 14
3
votes
1 answer

Sending an image to ftp server from gchar buffer (libcurl)

I'm developing a linux app programmed in C which processes gdk pixbuf images and then should send them to a remote server via ftp (libcurl). The images are saved into a gchar buffer with gdk_pixbuf_save_to_buffer. The problem is I don't know how to…
drwn
  • 82
  • 1
  • 6
3
votes
1 answer

Scrolling GtkDrawingArea

(C language, GTK library) On my form, I have a GtkDrawingArea widget on which I draw GdkPixbufs (loaded from files) with Cairo. What I'd like to accomplish is to be able to scroll the drawing area with scrollbars while window size remains fixed (the…
Clueless
  • 605
  • 3
  • 10
  • 19
1
2
3
21 22