Ok, I'm about to start some serious implementation on the wintab dll. What I need now is some giudance as to how to proceed, regarding integration with X11 code.
Please comment on anything mentioned below. If this is too concise, please ask for further clasification.
*****Requirement for interfacing with X11*****
To access the graphics tablet, the dll must access the XInput extension to X11. Therefore it needs some level of cooperation/integration with x11_drv. The reqirements are:
Access to an XDisplay object.
Event dispatch code similar to event.c It must be able to claim XInput events, and expose them through the wintab32.dll interface. Wintab32.dll is defined as having it's own event dispatch system, totally distinct from the win32 system.
Access to an X window that contains the wine/win32 window client area. This is available in a win32 property named: __wine_x11_client_window. It is also accessible through x11_drv internals. If necessary, could always use the DefaultRootWindow(display)!.
*********Assumptions******
It is bad practice/impossible to call functions from one dll in another, if they are not defined in the .spec file. I'm also assuming the same applies to variables.
A call to XOpenDisplay(NULL) will ensure the same display is accessed as in X11_Drv.
It is a good idea to call XInput functions in the wintab32.dll.
It is a good idea to access the X11 windows needed by the Win32 window's propery. will reqire that the GetProp and GlobalFindAtom functions in wine.
Wintab can be given it's own version of WaitForMultipleObjectsEx that will deal solely with XInput events. I'm also assuming that there is no reason why XInput events should occur in
***********Questions*******
Is function X11DRV_MsgWaitForMultipleObjectsEx really the place where all X11 events enter the system before being translated into win32/16 events?
It appears to be a principle of wine design that all X11 code should live in the x11_drv dll. Therefore, when complete, where should XInput code live?
*************Design principles**********
Genericity. I would like anything in X11_drv to be as generic as possible. So, Initially, I'd like to keep code in X11_drv to a minimun.
Therefore, Given the ideas above, all XInput code is in wintab32.dll!
********** And that's it! ***********
Well that's the lot, Please comment Cheers -Rob.