[Gtk-sharp-list] Whiteboard application

Stefano Del Furia delfo at edudotnet.it
Sat Jan 30 11:32:02 EST 2010


Hi,
thanks for your reply, but i had yet found your suggestion.
I'm "googleing"  from a week without any lucky.
i have tried also to wrap the XTestFakeButtonEvent but i don't know what 
library i must "importo": X11 or Xlib or xlibtst or xtst or xlibtst.so 6 ... 
and so on.
Thanks
Stefano
 


-----Original Message-----
From: Brad Taylor <brad at getcoded.net>
To: Stefano Del Furia <delfo at edudotnet.it>
Cc: gtk-sharp-list at lists.ximian.com
Date: Sat, 30 Jan 2010 10:12:09 -0500
Subject: Re: [Gtk-sharp-list] Whiteboard application


Hey,

> i'm developing a whiteboard application for using a Wiimote as mouse 
controller.
> I have almost do everything but i'm stuck on the problem about how to move 
the mouse cursor programmatically, send mouse input to all windows on 
desktop and so on.
> I know that "normal" c++ software can use this code:
>  
> void fake_move(int x, int y)
> {
> Display* display = XOpenDisplay(0);
> XTestFakeMotionEvent(display, -1, x, y, 0);
> XCloseDisplay(display);
> DEBUG_MSG(4, "Mouse moved: %dx%d\n", x, y);
> }
>  
>  
>  
> void fake_button(int button, bool pressed)
> {
> Display* display = XOpenDisplay(0);
> XTestFakeButtonEvent(display, button, pressed, 0);
> XCloseDisplay(display);
> DEBUG_MSG(4, "Mouse button #%d's state changed to %d\n", button,
> pressed); }
> 
> but i don't know how if this "X" call are supported by the library or how 
to import and use  this functions.

Check out 
http://lists.ximian.com/pipermail/gtk-sharp-list/2008-November/009202.html.  
You should be able to use Gdk.Display.WarpPointer to move the cursor, but I 
don't think that Gtk# is properly wrapping Gdk.Event, so there appears to be 
no way to construct a new event to feed to Gdk.Display.PutEvent.  (However, 
this is just what I've figured out with ~3 minutes of googling, so I could 
be wrong.)

Best,

-Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20100130/c8695356/attachment-0001.html 


More information about the Gtk-sharp-list mailing list