Re: GTK3 -- query mouse pointer coordinates for keyboard input?



On 01/17/2014 11:21 PM, Stefan Salewski wrote:
On Fri, 2014-01-17 at 17:11 -0500, Jasper St. Pierre wrote:
Yeah. This is to maintain ABI compatibility. Technically, events have
private internal data, and you can use gdk_event_get_device(); to get
the
keyboard device for a key event.

This isn't documented very well; we should perhaps clean this up.

I guess current GTK3 Ruby bindings do not allow event_get_device() for
keyboard events :-(

As a workaround, why not write a ruby extension with a trivial function that wraps event_get_device? I don't have experience writing ruby extensions (we use Python), but judging by http://www.rubyinside.com/how-to-create-a-ruby-extension-in-c-in-under-5-minutes-100.html it doesn't seem very complicated.

Once the ruby bindings get proper support for it, you can retire the extension.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]