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
1
vote
1 answer

Gtk GLArea Widget in C not displaying gl commands

I have asked a question earlier (Use of the Gtk.GLArea in Pygobject GTK3) about trying to use the GLArea widget in PyGObject. I never did get the python version to draw commands so I thought I'd give the c version a try to understand it better.…
1
vote
0 answers

Is there a more resilient alternative to GdkPixbuf for getting pixbufs in Gtk?

I've been using GdkPixbuf for displaying downloaded images in a program, which works well, but occasionally encounter JPEGs with non-fatal corruption (eg. "Application transferred too few scanlines") that GdkPixbuf can't handle. I can usually…
andy.holmes
  • 3,383
  • 17
  • 28
1
vote
1 answer

Issue with gdkpixbuff

I'm working on a iMX6, with Yocto, and I'm trying to use a Gstreamer plugin : gdkpixbufoverlay on my board, but I got the following error: gst-launch-1.0 autovideosrc ! gdkpixbufoverlay location=image.png ! autovideosink (gst-launch-1.0:441):…
PierreOlivier
  • 1,387
  • 9
  • 23
1
vote
1 answer

Is it possible to call Gdk.Seat.grab() in GJS?

It seems when I call Gdk.Seat.grab() in GJS I get an error: Gjs-WARNING **: JS ERROR: TypeError: Gdk.Seat.grab is not a function This function and class is listed in the GJS Docs, but maybe I'm calling it wrong? If I call typeof on Gdk.Seat.grab it…
andy.holmes
  • 3,383
  • 17
  • 28
1
vote
1 answer

Drawing through GdkPixbuf draws at wrong pixel coordinates

This is my current code: static void put_pixel (GdkPixbuf *pixbuf, int x, int y, guchar red, guchar green, guchar blue, guchar alpha) { int width, height, rowstride, n_channels; guchar *pixels, *p; rowstride = gdk_pixbuf_get_rowstride…
user8137082
1
vote
3 answers

Gtk: send focus to a toplevel window without losing the first toplevel window

Here is the situation: 1) I have two toplevel windows, A and B 2) A is in front of B How can I send to keyboard focus to the window B while keeping the window A in front of B ?
Tarantula
  • 19,031
  • 12
  • 54
  • 71
1
vote
1 answer

How to find the current font for GtkLabel

I know that similar question was already asked here: How to get a current font for GtkTextView? But gtk_style_context_get_font has been deprecated since version 3.8 and should not be used in newly-written code. Use gtk_style_context_get() for…
ProNOOB
  • 504
  • 2
  • 14
1
vote
1 answer

How to write contents of a Cairo Image surface into a Gdk Pixbuf?

I have a canvas(Gdk Drawing Area), which I can draw into it using Cairo, but I need to save contents of my canvas into a buffer which in my case is a Gdk Pixbuf. I want to know if it's possible or not, if there is a better way I would like to…
sepisoad
  • 2,201
  • 5
  • 26
  • 37
1
vote
1 answer

GDK cross compilation error

I have cross-compiled libpng 1.6.28, libjpeg-turbo 1.5.1 and GLib 2.50.3 for MS Windows with i686-w64-mingw32 on Debian Stretch to a special folder, but still can't get gdk-pixbuf working. My commandline used for configure is: ./configure…
Maju
  • 13
  • 5
1
vote
1 answer

save current window as image using gtk#

How can I save the current window as an image file such as a png? I know I can get a gdkWindow from current windows. I can even get an image. From this image struct I can even query each pixel. But from what I understand what I really need is to…
frenchone
  • 1,547
  • 4
  • 19
  • 34
1
vote
0 answers

Set window gravity in PyGObject?

Every time I try to set the gravity of my application, it keeps throwing an error message like this: AttributeError: 'gi.repository.Gdk' object has no attribute 'GRAVITY_SOUTH_EAST' What is the correct method for setting the gravity of a GTK3…
imyxh
  • 164
  • 10
1
vote
1 answer

How to instantiate GdkDeviceManager?

I'm trying to figure out how to use GdkDeviceManager, so I wrote the following program that is supposed to print all physical input devices: #include #include int main(int argc, char **argv) { GList *devices, *it; …
Iskren
  • 1,301
  • 10
  • 15
1
vote
3 answers

Undefined symbols for architecture x86_64: "_g_object_unref"

I'm really new to makefiles and also to the libraries or frameworks I'm using (Gtk, Gdk and OpenCL) to create a program which should display the mandelbrot set as a dynamic image. I've created this make file based on a makefile provided by my…
nbro
  • 15,395
  • 32
  • 113
  • 196
1
vote
0 answers

How do you draw a GdkPixbuf in python?

Ok, so I'm trying to overlay a picture of a printer on top of a image (blueprint of floorplan). I originally was looking at pixmaps, but had trouble finding anything about them in GTK 3.0 (found how to use them in pygtk, but not the same thing). …
TheEggSample
  • 333
  • 4
  • 5
  • 18
1
vote
1 answer

AddTimeout or AddIdle for UI updates on GTK main thread?

When making UI updates with GTK# (GDK2), such as changing label text, setting button visibility etc, should I as a general rule be using Gdk.Threads.AddTimeout or Gdk.Threads.AddIdle? The GDK2 documentation states that AddIdle Adds a function to…
Owen Pauling
  • 11,349
  • 20
  • 53
  • 64