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

sprite map issues using gdk_pixbuf_composite()

I'm having problems trying to chop sprites out of a sprite map. I can get my first sprite from the top left corner with this: gdk_pixbuf_composite( sprite_src, sprite_buf, 0, 0, sprite_w, sprite_h, 0.0,…
gdonald
  • 984
  • 2
  • 12
  • 23
1
vote
1 answer

Fill a rectangle with a larger image with Cairo

I'm developing an application in C# with GTk. In this application I have to display boxes. Some are filled with color and others with an image. These boxes are resizable and movable. Boxes are displayed in a DrawingArea. When I draw an image with…
Julien Pires
  • 512
  • 7
  • 18
1
vote
0 answers

GDK: Is there a way I can get if an arbitrary keyval or mouse button is down during a GdkEvent, or to see what GdkModifierType bits map?

(I asked a similar, unanswered question (only a X11-specific comment) months ago specifically pertaining to the Alt key; I have since refactored my requirements.) I'd like to be able to see if the Alt key or if mouse buttons 8 or 9 are held at the…
andlabs
  • 11,290
  • 1
  • 31
  • 52
1
vote
1 answer

Conversion of Gdk Events in Mono

I'm trying to intercept events using Gdk.Window.AddFilter(Gdk.FilterFunc) in Mono. So far, I have been able to hook up the filter function, but now I am trying to use the events in the filter function. This is what I have in the filter function so…
Zach Johnson
  • 23,678
  • 6
  • 69
  • 86
1
vote
1 answer

Gtk# Multiple File Filter

I want to display only image files in GTK# File Chooser fc.SelectMultiple = true; FileFilter filter = new FileFilter(); filter.Name = "Image files"; filter.AddPattern ("*.jpg;*.jpeg;*.png;*.tif;*.bmp;*.gif;*.tiff"); …
techno
  • 6,100
  • 16
  • 86
  • 192
1
vote
1 answer

Gdk::Pixmap is giving me a segmentation fault on create()

I am doing pixel drawing onto a Gtk::DrawingArea. Sometimes an expose event occurs and I need to redraw everything. But drawing every pixel again is slow, so I'm trying to create a Sdk::Pixmap and draw to it, then draw it to the screen when…
yuf
  • 3,082
  • 3
  • 20
  • 18
1
vote
0 answers

Why are GTK widgets unreachable after gtk_main() is called

I have an important question. I am writing a medium scale program part of which displays current weather conditions in various areas of Turkey. Weather data is renewed with basically the following snippet of code which exist in a function of it's…
whotheman
  • 117
  • 1
  • 2
  • 13
1
vote
2 answers

Gdk::Pixbuf does not load images

I'm trying to load a *.jpg image into a Gdk:: Pixbuf, but it fails and keeps telling me: Error interpreting JPEG image file (Wrong JPEG library version: library is 62, caller expects 80) try{ Gdk::Pixbuf::create_from_file(".../Test.jpg"); } …
VoodooCode
  • 287
  • 2
  • 15
1
vote
3 answers

GTK+3 porting: GdkDeviceAxis

Currently i have this gtk2 code: GList *input_devices = gdk_devices_list(); while(input_devices) { GdkDevice *device = (GdkDevice*)input_devices->data; for(int i = 0; i < gdk_device_get_n_axes(device); i++) { GdkDeviceAxis* axis =…
LebedevRI
  • 45
  • 1
  • 4
1
vote
1 answer

Make writing and lines appear on a GTK Window ... XLIB and GDK used

What my code (below) does: Creates a XLIB window with a background color Draws a string on the window Draws a line on the window Creates a GTK+ window Makes the GTK+ window realise the XLIB window exsists via a GDK window Display the output of the…
cxzp
  • 652
  • 2
  • 14
  • 28
1
vote
1 answer

How to make a GTK3+ window with a background image

The Pixbuf method doesn't work anymore for GTK3+ because obsoleted/removed. I want to put a background image in the back of a GtkFixed, on the gdk part of the GtkWindow or a GtkBox. I believe I need Cairo graphics library to do this. Can a pleasant…
whotheman
  • 117
  • 1
  • 2
  • 13
1
vote
1 answer

Deprecated In Groovy 2.1.X but where to find explanation and alternatives?

I see that there are many deprecated methods and fields in the GDK (http://groovy.codehaus.org/api/deprecated-list.html). For example, DefaultGroovyMethods.withObjectInputStream{} is deprecated now. I need to understand what the alternatives (the…
Armin
  • 1,367
  • 1
  • 12
  • 17
1
vote
1 answer

How do i read the Title property of a GDK.Window

I'm converting an .NET Windows application for Mono to run on Linux (Ubuntu). One of the features depends on a native library (user32.dll). The Mono guide that talks about conversion of applications (Linux Platform Differences) suggests that one…
1
vote
2 answers

Can GDK/GTK recognize two keys pressed simultaneously?

So I'm trying to work toward developing a platform style game, writing in C and using GTK as my graphical toolkit. Right now I have a program that places three blocks on the screen. Two of them are platforms, and the third can be moved laterally by…
1
vote
1 answer

Convert Gdk.Pixbuf to System.Drawing.Bitmap?

How do you convert a Gdk.Pixbuf (_pixbuf below) into a Windows Forms (System.Drawing) Bitmap? Below is code that uses Gtk.DotNet.Graphics, but it just gives a white image. Is there a better, more direct way, that works? I'm using C# on Mono, but I…
Doug Blank
  • 2,031
  • 18
  • 36