Re: Directing input to another app



brian_urioste att net writes:
Does anybody know how to manipulate widgets in another
X/GTK app from a GTK app?  I'm looking to do something
like xkeycaps' "Type at window".

First I do a gdk_pointer_grab, wait for a button_release
and get a GdkEventButton.  But now what?  

Questions:

1) How do I take a GdkEventButton and determine what
window was picked?  (I'm thinking I need to somehow use
the event's x_root and y_root.  In X, the XButtonEvent
provides the picked window id in the subwindow field).

2) How do I redirect the input to that picked window? 
(In xkeycaps, XSendEvent is used.)


You can always use X - include gdk/gdkx.h - there's nothing wrong with
that when doing something that's already unportable like this.

But you might look at ee, gimp, and other apps that do screenshots to
see what they do.

Havoc




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