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

lambda-gtk negative pointer

I was trying to write my own put-pixel on (Gdk) pixbuf in Lisp. When I finally realized how I can operate on C pointers in CL, new obstacle came along - (gdk:pixbuf-get-pixels pb) returns me negative number. My question is: can I convert it somehow…
x13n
  • 4,103
  • 2
  • 21
  • 28
3
votes
1 answer

Why we should return True in the end of button_press_event.handler?

Look at the example in the bottom of this page: http://www.pygtk.org/pygtk2tutorial/sec-EventHandling.html it says: 57 def button_press_event(widget, event): 58 if event.button == 1 and pixmap != None: 59 …
scythargon
  • 3,363
  • 3
  • 32
  • 62
3
votes
1 answer

How to catch gtk scroll-event on menu item

Gtk widgets emit a signal scroll-event. I would like to connect a function to that signal on a MenuItem. The following example code doesn't work. $ cat scroll-event-on-menu-item.c #include void scroll_cb(GtkStatusIcon* icon, GdkEvent*…
chris
  • 3,986
  • 1
  • 26
  • 32
3
votes
1 answer

Is there a way to get SendInput to work with an application using GDK?

I have an application that can successfully inject keyboard input using the SendInput API with the UNICODE flag set. This causes WM_KEYUP and WM_KEYDOWN messages to be generated with the VK code of E7 (VK_PACKET), which gets appropriately translated…
wkf
  • 842
  • 9
  • 17
2
votes
3 answers

How to get events in X11 child window?

I need to handle events (MouseDown, MouseUp, MouseMove, KeyDown, KeyUp) in X11 child window. Parent of this child X11 window - GtkWidget, so I can't create main loop... How can I do this? Thanks!
Alexander
  • 275
  • 2
  • 4
  • 13
2
votes
1 answer

Anyone know how to edit the VC++ directories in Visual Studio 2008?

Right now we are configuring a lab at the college to use the DarkGDK with Visual Studio 2008. Here is a link for those of you who are unfamiliar: check it out here Considering how tedious the installation and setup is, I've decided to write a batch…
2
votes
1 answer

Drawing Oval with Gdk Cairo Context

I want to draw only the circumference of an oval. I use this: gc->save(); gc->translate( xc, yc ); gc->arc( 0.0, 0.0, 1.0, 0.0, 2.0*M_PI ); gc->scale( width*0.5, height*0.5 ); gc->stroke(); gc->restore(); but I constantly get a filled oval. What am…
user804723
  • 329
  • 1
  • 3
  • 9
2
votes
3 answers

How do I find out what GDK events are required for a GTK+ signal?

I'm using Glade-3 for my GUI design, but I keep hitting this problem. I don't see anything in the GTK+ documentation mapping signals to events or in Glade-3 (3.4.5). Is there a place in the GTK+ source code to find this information? Note: It is…
Harvey
  • 5,703
  • 1
  • 32
  • 41
2
votes
2 answers

How to get clipboard content with Python3 & GDK 4?

GTK4 doens't manage the Clipboard anymore, now it's done from GDK4. I was not lucky migrating this code from GTK3 to GDK4? from gi.repository import Gtk, Gdk cb = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD) content = cb.wait_for_text() Any idea…
Costales
  • 2,799
  • 1
  • 17
  • 21
2
votes
1 answer

gdk/gdk.h: No such file or directory

I am trying to use gui with gkt-2.0 in Linux mint 32bit. When I try to compile gui.c I encountered following error message: #include void main(){ } In file included from gui.c:1:0: /usr/include/gtk-2.0/gtk/gtk.h:32:10: fatal…
Anonymous
  • 318
  • 4
  • 14
2
votes
1 answer

How do I draw a Pixmap with GTK?

Using GTK3, I have been trying to draw a Pixmap from a memory buffer. I have just created a memory buffer, and filled it with alternating rows of colours in the 32-bit RGBA format. I have been trying the following…
2
votes
0 answers

Cannot use both opencv and Gdk in python

This simple program imports both cv2 and Gdk and tries to do a simple imshow() which fails with a bunch of assertions: import cv2 import numpy as np import gi gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') from gi.repository…
bearclaw
  • 61
  • 3
2
votes
1 answer

pygtk WINDOW_TYPE_HINT_DOCK not working on windows

I've been developing a dock-like program for linux, but the problem is that when I wanna run it on windows (xp/vista/7) these properties don't work: self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK) and self.window.get_toplevel().show() #…
lamp ard
  • 871
  • 2
  • 10
  • 19
2
votes
0 answers

GTK3 on MSYS2 segmentation fault on start

I compiled the basic GTK+ example that just creates a window. When compiling the source code no errors occur. Also running it is fine. Note: For some reason it does not use the expected gnome style window appreance but rather the "normal" Windows 10…
Jakob Leifhelm
  • 127
  • 1
  • 10
2
votes
1 answer

Create Gtk.Atom with PyGobject Introspection and Gtk+3

Context: There was once a post on preventing window overlap with Gtk+2.x Recent changes in Gtk+3 have however affected the gdk_property_change() function, which has the PyGobject Introspection (hereafter referred to as PyGI) equivalent of…
neydroydrec
  • 6,973
  • 9
  • 57
  • 89