> The first is what functions do I have to implement. I see that there
> are places for:
>
> GIIeventpoll
> GIIsendevent
> GIIseteventmask
> GIIgeteventmask
> GIIgetselectfdset
> GIIhandler
> GIIclose
Yeah.
> I understand what most of them do. However, I am not sure of the
> purpose of GIIhandler.
This is not for inputs, but for filters. Filters can be used to modify the
event stream at generation time. Basically, whenever an event is enqueued,
all the ->filter functions are executed thus allowing to link in stuff like
the keymapper or the mouse accelerator or a save/replay system (which are
all implemented).
You can disregard that for a real input.
> Do all of them need to be implemented? I would imagine the first four
> are a must.
GIIsendevent is basically a must as it is required for the deviceinfo query.
GIIeventpoll is a must of course (except for filters, where handler takes
its place).
GIIseteventmask and GIIgeteventmask have a reasonable default fallback
entry. You may want to intercept seteventmask to adjust window-system
internal masks accordingly thus saving syscalls.
GIIgetselectfdset also has a reasonable default. it can be intercepted for
targets that must dynamically change the fdset.
GIIclose is also a must-implement usually to allow for cleanup after closing
the event source (if you leave it NULL it won't be called, so if you really
need no cleanup, that's o.k.).
CU, ANdy
--
= Andreas Beck | Email : <[EMAIL PROTECTED]> =