[Gambas-devel] Events

Laurent Carlier lordheavy at ...141...
Fri Sep 15 18:35:03 CEST 2006


Le vendredi 15 septembre 2006 18:29, Laurent Carlier a écrit :
> Le vendredi 15 septembre 2006 17:04, Rob a écrit :
> > As for SendKeys itself, I'm not sure whether or not it's possible
> > in Qt or Gtk to do that, if it's something you can even do at
> > the toolkit level.  I'm not even sure how it works under
> > Windows, since it works even if you have other applications
> > focused (which was when I mostly used it.)  Maybe there's a way
> > to inject keyboard events into some global X11 queue, I don't
> > know.  I'm pretty sure they must have done it in VB at a lower
> > level than MFC.  In any case, it sure would be useful to have.
> >
> > Rob
>
> I've take a small look to Qt doc, and i guess it can be done with through
> the static method QApplication::sendEvent( QObject * receiver, QEvent *
> event ). I don't know if it can work and if it exist with gtk° ....
>
> ++
>

I've just take a look at gtk+ doc, it seem that gtk_propagate_event(GtkWidget 
*widget, GdkEvent *event) have the same effect.

For gtk+ :
http://developer.gnome.org/doc/API/2.0/gtk/gtk-General.html#gtk-propagate-event
For Qt :
http://doc.trolltech.com/3.3/qapplication.html#sendEvent

Regards,





More information about the Devel mailing list