[XForms] Client Message handler success.
Jean-Marc Lasgouttes
Jean-Marc.Lasgouttes at inria.fr
Tue Mar 16 10:48:31 EST 2004
>>>>> "Jeff" == Jeff <wd4nmq at comcast.net> writes:
Jeff> To subscribers of the xforms list Angus and Jean-marc,
Jeff> (Lets try this using my registered email account :-), Sorry)
Jeff> I have the code working to allow for a user supplied callback to
Jeff> handle ClientMessage XEvents.
Jeff> It was actually very little code to change. Just tracing the
Jeff> code to find where to put it was a royal pain .
Jeff> I quick synopsis.
The general idea looks fine. Let's see the details :)
Jeff> line 649: typedef void (*FL_CLIENT_CALLBACK)(void *);
Why not like the others
typedef void (*FL_CLIENT_CALLBACK)(struct forms_ *, void *);
Is should be possible, like with the atclose callback to set either a
global client callback or a forms one. Or maybe what I am saying does
not make sense?
Also, if you add this new callback to forms_ struct, you break binary
comaptibility, right? Can we avoid that somehow?
Jeff> What this does is test to see if a client callback has been set,
Jeff> if not, it goes through fl_handle_form just like before. Also
Jeff> the client callback returns a TRUE if it did consume the event
Jeff> and a FLASE if it did not. If a FALSE is returned,
Jeff> fl_handle_form() is called as in original code.
This is OK.
Jeff> So, in the users code you need only assign a function pointer to
Jeff> (your form name)->client_callback to get ClientMessage's sent to
Jeff> you code.
fd_testEvent-> testEvent->client_callback = clientCallback;
I'd rather see something like
fl_set_client_callback(fd_testEvent->testEvent, clientCallback);
if only to do something similar to the other callbacks.
Jeff> This is just a prelimenary annoucement. I am doing more testing
Jeff> and once I believe it is stable and introduces no bugs, I will
Jeff> do difff and pass the patch to you. I hope to make it into the
Jeff> next release, which I also hope is coming soon, as I want to use
Jeff> this on an amatuer radio application I wrote. And, if I use it
Jeff> others need to be able to get the same xforms version from
Jeff> savannah.
This is definitely something that could go in next version, excpet
that I am a bit worried about binary compatibility.
Jeff> Any idea on when the next release will happen?
I do not know yet :(
JMarc
More information about the Xforms
mailing list