hi there,
I want to add some input device/event facilities to berlin. The first step
is to be able to query the console about the supported input devices and
their associated event types. Using inputdump.c as an example, I notice
that the way to do it is to send a 'GII_CMDCODE_GETDEVINFO' event to 'all'
and then wait and see what command events come back.
This procedure is very asynchronous in nature, not only because I have to poll
for the results of my query, but also because it doesn't appear I can ever know
whether I'v got all the info I asked for (what is missing is for example an event
that tells me how many devices were found, such that I know how many command events
to wait for for device specific info).
Is this a deliberate choice, or would it be equally possible to make a synchronous
call ? In the context I envision (berlin), I'd much prefer a synchronous mechanism,
such that I can block until all the data are delivered. In fact, what I'm envisioning
is a little event mapping framework such that I can map between event types such
that I can use my stylus as a generic mouse replacement (i.e. map from valuators
to positions), etc.
Thus, I'd like to be able to generate a device capability table at startup, and
then generate an 'event synthesizer' out of configuration and device data.
Any hints would be highly appreciated.
Stefan