XChangeDeviceControl/XGetDeviceControl ?

Aivils Stoss aivils at latnet.lv
Tue Apr 18 01:41:46 PDT 2006


On Pirmdiena, 17. Aprīlis 2006 03:01, Andrew Zabolotny wrote:
> On Sun, 16 Apr 2006 21:06:08 +0300
>
> Daniel Stone <daniel at freedesktop.org> wrote:
> > Uhm, XChangeDeviceControl has n+1 parameters.  One is the control
> > (e.g. DEVICE_RESOLUTION, DEVICE_TOUCHSCREEN, DEVICE_CORE, ...), and
> > the other n is the arbitrary data structure associated with the
> > control.  You can do what you like with it.
>
> Hmm, what's DEVICE_TOUCHSCREEN and DEVICE_CORE? By looking
> into extensions/XI.h I can see only DEVICE_RESOLUTION there. And using
> anything but DEVICE_RESOLUTION will end in getting BadValue, as you can
> clearly see from xc/programs/Xserver/Xi/getdctl.c function
> ProcXGetDeviceControl(). Besides, the protocol is tied to the specific
> 'control' values, because the structure is being serialized into the
> wires, and it contains pointers.
>
> Too bad there's no way to use that in a generic way; that would make
> prototyping and developing stuff a lot easier.
>
> > If the Wacom guys need to use their own controls, they should get in
> > touch with us, and we can get their specific needs integrated into a
> > later version of Xorg.  Having an abundance of modules like SISCTRL[0]
> > is not useful in the long term.  Having widely configurable input, is.
>
> I don't like the idea to have specialized structures for every input
> device in the world; the structures will be different even amongst
> different tablet drivers, not speaking of more exotic devices. What I
> have now is about 50 parameters which are quite different e.g. I
> wouldn't like to have them all changed in one call.

Of course You can use more or less heretical protocol:
http://www.ltn.lv/~aivils/files/xdevice-0.01.tar.bz2

> And one question still left unanswered: how do I get something back
> from the driver? Notably what I want is to have a tool that could save
> driver state to a file in order to load it later at will; the current
> implementation is that the driver itself saves and loads its state to
> /etc/wacom.dat which looks crappy.

Classic stuff to learn. Very nice XChangeDeviceControl implementation.
http://sourceforge.net/projects/aiptektablet

Aivils Stoss



More information about the xorg mailing list