# To subscribers of the xforms list from Steve Lamont <firstname.lastname@example.org> :
> Actually, I create a window GL "A" with fl_glwincreate, on which I
> define a callback for every kind of event using fl_add_event_callback.
> I create also forms, let's say a form B with some input
> Then, I wanna treat SOME of the KeyPress events of the A GL window
> as if they were raised in the XFORMS B window... that is: put into
> the input fiels of the B window the text that was typed in the A window.
> To me, this could be achieved by calling when necessary the B
> window callback from the A window callback, with the event received... But
> I don't know how to call a form callback !
You could use XSendEvent() to send your events, as per the following
fl_add_event_callback( window, KeyPress, handler, fd_form );
int handler( XEvent *xev, void *data )
FD_form *fd_form = ( FD_form *) data;
XKeyPressedEvent *xkpe = ( XKeyPressedEvent *) xev;
xkpe->send_event = True;
xkpe->window = FL_ObjWin( fd_form->input );
fl_set_focus_object( fd_form->form, fd_form->input );
FL_ObjWin( fd_form->input ),
To unsubscribe, send the message "unsubscribe" to
email@example.com or see
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Mon May 07 2001 - 10:16:59 EDT