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

Noisy cairo-created custom cursor in GTK3

I'm working on an image annotation tool. It involves drawing circles of different size on top of an image. For convenience, I'd like to modify the cursor to be a circle of some radius. The snippet below (custom_cursor() function in particular)…
0
votes
0 answers

How to mask/unmask some of the areas of GdkPixbuf from displaying?

I have a GdkPixbuf data structure loaded from a svg file (Environment - Python3.7; Linux). Depending upon the area of different object id in svg, I want to mask/unmask the GdkPixBuf Image. I have searched the python binding for Gtk, Gdk and…
MS_
  • 741
  • 1
  • 6
  • 10
0
votes
1 answer

Java GDK+: Pixbuf image not found

Relative to which directory is the file path argument of the org.gnome.gdk.Pixbuf constructor? And where should I place the file? Main.java public class Main { public static void main( String... args ) { Gtk.init( args ); new…
jrswgtr
  • 2,287
  • 8
  • 23
  • 49
0
votes
1 answer

What does "Gdk-WARNING **: gdk-frame-clock: layout continuously requested, giving up after 4 tries" mean?

When I run the gtk3 python code using pygobject in Ubuntu 18.04, the code runs without any warnings. But when I build it on Ubuntu 16.04 for snap, I am getting these warnings: Gdk-WARNING **: gdk-frame-clock: layout continuously requested, giving up…
Cijo
  • 2,726
  • 1
  • 14
  • 24
0
votes
1 answer

Cairo: How to clip text to a rect?

Using Cairo under C++ on a Raspberry Pi, and trying to clip text drawing to inside a given rectangle. I'd have thought that it would be as simple as this: cairo_t* cp = cairo_create(psurface); // set font, etc cairo_rectangle(cp, 0, 0, 100, 100); //…
dlchambers
  • 3,511
  • 3
  • 29
  • 34
0
votes
0 answers

GTK3 - Catch error when GdkDisplay is unavailable

Given the following code: #include int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GdkDisplay *display = gdk_display_open(":2"); gtk_main(); return(0); } How can you catch the error, when the X server for…
Martin
  • 3
  • 1
0
votes
0 answers

How to detect focus on GtkSocket

I have a window with a child window containing a socket. I need to detect when the keyboard focus changes from a widget in the parent window to a widget in the plug window. I am getting no gdk events once the mouse enters the plug window until it…
Monte Goulding
  • 2,380
  • 1
  • 21
  • 25
0
votes
0 answers

Conversion from Visual* to GdkVisual*

I can do vice-versa using below api Visual *gdk_x11_visual_get_xvisual (GdkVisual *visual); but i don't find any api which can provide me GdkVisual* out of Visual*
Naseeb Panghal
  • 159
  • 1
  • 11
0
votes
1 answer

How this if statement works in C. I know what it does but I can't brake it in pieces

I'm struggling to understand how this if statement works: if (keyval == GDK_PLUS && (event->state & ~consumed & ALL_ACCELS_MASK) == GDK_CONTROL_MASK) founded here…
0
votes
1 answer

Wrong Colormap assigned to gtk window created using gtk_drawing_area_new

I have created a drawing area using gtk_drawing_area_new(). Window handle(say drawing_handle) of this widget is extracted using GDK_WINDOW_XID. Using xwininfo i checked the attributes of drawing_handle window. Output: ubuntu@wandboard:~$ …
Naseeb Panghal
  • 159
  • 1
  • 11
0
votes
1 answer

gtk.gdk: make image 50% grayer

I have an image wiht gtk.gdk. I want to make it look grayed out, so I wanna do something like draw a gray rectangle over it with 50% alpha value. How would I do this? The docs are so confusing.
Claudiu
  • 224,032
  • 165
  • 485
  • 680
0
votes
1 answer

GTK3 with g_timeout_add service doesn't always update GTK widgets

I'm using GTK+3 / GDK on Ubuntu 16. I have a g_timer service routine that does some busy work and then updates some GTK label and graphic widgets. In some instances I have noticed if the service routine for a GDK timer (setup with g_timeout_add() )…
Nathan Smith
  • 1,573
  • 2
  • 10
  • 17
0
votes
1 answer

GDK: How to refresh transparent background?

In a purely GDK 3.10 (no GTK) project how do I refresh/clear/redraw a transparent background of a GdkWindow? This test.c sets the background correctly on initialization (gdk_window_show()) and when I iconify+deiconify the window but not on resizing…
MattSchmatt
  • 850
  • 8
  • 18
0
votes
1 answer

Setting a ClutterImage using a GdkPixbuf

I'm trying to do what I would have thought would be trivial, but no matter what I try with a ClutterImage I get the error message Unable to load image data. The language I'm using is Vala, so there's a possibility that the Vapi file for Clutter is…
geoffjay
  • 413
  • 4
  • 13
0
votes
1 answer

C# KeyPressEventArgs Multiple Keypress

Using KeyPressEventArgs I want to be able to detect multiple keypresses. I have tried it like this without luck. [GLib.ConnectBefore] public override void OnKeyPress (object o, global::Gtk.KeyPressEventArgs args) { if ((args.Event.Key ==…
Nulle
  • 1,301
  • 13
  • 28