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
0 answers

GdkEventMotion x and y coordinates appears to refer to location within a different widget

It appears that if widget A is on top of widget B, for example, when using a GtkOverlay, and A and B has GDK_POINTER_MOTION_MASK set, the x and y members of the GdkEventMotion always refers to A coordinates, even in the event handler associated with…
user877329
  • 6,717
  • 8
  • 46
  • 88
1
vote
1 answer

Duplicate scroll events from GTK

I've been trying to process scroll-events from a GTK window. I have a custom scrollbar that handles smooth scrolling events and non-smooth scrolling events differently, and simulates smooth scrolling for non-smooth scrolling events. I learned from…
Luke Zhou
  • 125
  • 2
  • 10
1
vote
1 answer

Problem with not working gdk_test_simulate_button in GTK3

Can't get gdk_test_simulate_button working. Could someone help me, where is the error? The right mouse button pressed. The timer starts. After the timer elapsed, left button press is emulated. #include #include #include…
273K
  • 29,503
  • 10
  • 41
  • 64
1
vote
1 answer

Should I use threads in C with GTK+ for creating a GUI Controller for a Backdoor?

The Scenario: I have written a CLI Backdoor and a CLI Controller in C for Linux. I am using Glade along with GTK+3 to create a GUI interface for the Controller. I want the Controller (basically a server with reversed functionality) to accept…
1
vote
1 answer

How to copy a GdkPixbuf with a transparent background over another GdkPixbuf

While using GDK in C/C++, I try to copy a GdkPixbuf with a transparent background over another GdkPixbuf, gdk_pixbuf_copy_area() says: (scrol:6227): GdkPixbuf-CRITICAL **: 10:41:37.084: gdk_pixbuf_copy_area: assertion '!(gdk_pixbuf_get_has_alpha…
dave
  • 11
  • 1
1
vote
0 answers

Is it possible to use GDK or GTK to pull user generated content from an active firefox window? (Similair to FIndWIndow on Windows)

I am working on a bit of a hobby project while trying to better understand the windowing system in Linux. I want to create a program that will constantly print the contents of the active textbox in a firefox window. I know this is possible on…
tmprl3467
  • 19
  • 1
1
vote
0 answers

Getting pixels RGB colorspace with GDK using C++

I am trying to capture some screen using GDK in c++. I managed to do this and save it to file but now I need to get all pixels values in COLORSPACE RGB. So for example black is 0 0 0 and white is 255 255 255. In python I was setting COLORSPACE.RGB…
1
vote
0 answers

Rounding RGB value of all pixels to even shade

I have a script taking screenshot every 1sec and I need to round all pixels of same color, but different shade to same rgb value. Its 130.000 pixels so I am wondering what would be the best for this job. Also I am not good and gdk and don't if I…
1
vote
1 answer

Vertically center text inside label in Gtk using python

I'm trying to vertically center the text of a label inside a box. This is do code I'm trying: import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk win = Gtk.Window() win.set_default_size(200, 100) box =…
robfuscator
  • 631
  • 1
  • 5
  • 13
1
vote
3 answers

PyGTK3 : capturing a string from keybord

I had some code written in python3 using GTK3. The program waited for some inputs from the keyboard. For instance, if I pressed 'q' the program printed a specific symbol, etc. This code looks like keyname = Gdk.keyval_name(event.keyval) if…
111
  • 133
  • 6
1
vote
1 answer

Remove the background of a GtkViewport

Is it possible to remove the grey background of a GtkViewport (making the background transparent)?
Marin
  • 263
  • 3
  • 9
1
vote
1 answer

GTK 2 gtk_widget_add_accelerator error: ‘GDK_Z’ undeclared

I'm trying to assign an accelerator to a GTK menu item: group = gtk_accel_group_new(); item = gtk_image_menu_item_new_from_stock(GTK_STOCK_UNDO, group); gtk_widget_add_accelerator(item, "activate", group, GDK_Z, GDK_CONTROL_MASK,…
Luke
  • 20,878
  • 35
  • 119
  • 178
1
vote
1 answer

raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace Gtk not available

I have a small program on python, using python 3.4 . However I cant manage to get it working into a .exe using Cx_freeze on windows. I get the error : \build\exe.win-amd64-3.4>lcp.exe Traceback (most recent call last): File…
Victor Moreno
  • 11
  • 1
  • 4
1
vote
1 answer

Signal ::expose-event is invalid for GdkWindow and GdkX11Window

I had this following code pull from one of the tutorials on line. When I use gtk+-2.0, the following code works fine. But when I try compile with gtk+-3.0, the code gives this error: signal 'expose-event' is invalid for instance of type…
1
vote
1 answer

Gdk Event device type wrong

I'm trying to capture pen input using Gdk (in vala). Here's my code var source = anEvent.get_device().get_source(); if (source == Gdk.InputSource.MOUSE) { stdout.printf("mouse\n"); } else if (source == Gdk.InputSource.PEN) { …
JomanJi
  • 1,407
  • 1
  • 17
  • 27