I'm working on WinTab (industrial standard API for graphic tablets) support
under Wine. Quite an obvious and probably the only way to do it, is to use
XInput extension. It is standard and supported by some X applications
(Gimp). Also, it already has drivers for about ten brands. Next, I want to
make WinTab implementation X independent as much as possible. So I'm trying
to come up with some XInput/Wine (WInput?) layer which will take care about
device sharing (we can have several "over-XInput" API's), simplifies event
processing, make code clearer, without ifdefed sections. I'll post proposal
for this WInput API as soon as things will be more or less clear, but mostly
it is wrappers for XInput functions.
The problem I stuck at is XInput support under Wine. First of all, this
layer must be hooked up to the X-event processing. Second, it requires
access to some X11_DRV specific data (XDisplay *, Window *, etc). It looks
like it has to be part of x11drv code. From the other hand, usage of this
layer is very optional: if you don't have a tablet or your application
doesn't use it, it will be dead code wasting some memory. So, it could be
good idea to make it loadable on demand, or depending on configuration. In
this case we need some support from x11drv (and any other user driver). This
extension API can be very simple, and will provide unified way for adding
support any other X extension library.
This is what this extension support API can implement:
1. GetDriverType - returns type of USER driver (X11, TTY, etc.). So
extension can prevent loading if system uses wrong driver (this is only
required for load-on-demand way).
2. RegisterExtension - this will register event filter, create/destroy
X-window hook, etc... Should return Dispaly pointer, ...
It could be very useful, if we can allow to specify size of per-X-window
data required by extension and allocate this data on window creation.
UnregisterExtension is required for load-on-demand implementation only.
Though it may be good to have it anyway to allow some cleanup.
3. FindWindow - this will return X Window pointer corresponding to HWND.
Required modifications:
EVENT_ProcessEvent - default section must pass event to every registered
extension until someone will handle it.
WND_Create(Destroy)Window - call extension hook to allow it to do some
per-X-window stuff (like selecting default events, etc.)
---
I would really appreciate any comments/suggestions.
Thanks
--
Serge Ivanov
[EMAIL PROTECTED]
--
The address in the headers is not the poster's real email address. Do not send
private mail to the poster using your mailer's "reply" feature. CC's of mail
to mailing lists are OK. Problem reports to "[EMAIL PROTECTED]".
The poster's email address is "[EMAIL PROTECTED]".