[Gtk-sharp-list] Mouse position, click emulation

Chris Howie cdhowie at gmail.com
Wed Nov 26 13:59:15 EST 2008


On Wed, Nov 26, 2008 at 10:14 AM, Mauricio Henriquez
<mhenriquezs at terra.cl> wrote:
> Hi Guys:
>
> I need a way to emulate mouse position and mouse click from a mono c#
> console app (may be with a gtk-sharp hidden window app?), the mono-dev
> guys sugestme to use the System.Windows.Form.Cursor (sorry to try first
> wiht MWF :-S ..and is very easy to move the mouse cursor but a nightmare
> to emulate the click (all "click emulation" Windows solution involve
> wrappers for some user32.dll API functions, bad, to bad)...
>
> So, before write a lib for some X functions and then a C# wrapper I
> wonder if there is some *easy* way to do something like that using
> gtk-sharp *something*,
>
> Thanks, any sugestion/direction is going to be apreciated.

The first part can be done with
Gdk.Display.Default.WarpPointer(Gdk.Display.Default.DefaultScreen, x,
y).  I have not yet found a way to send a click event though.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers


More information about the Gtk-sharp-list mailing list