XChangeDeviceControl/XGetDeviceControl ?

Andrew Zabolotny anpaza at mail.ru
Wed Apr 19 13:13:00 PDT 2006


On Wed, 19 Apr 2006 16:32:47 +0300
Daniel Stone <daniel at fooishbar.org> wrote:

> > driver that turns to be a X11 protocol change; this means I have to
> > convince somebody that this option deserves to be included; then
> > recompile X11 and so on... this is a lot of absolutely unneeded
> > bureaucracy.
> If you need to do this that often, your configuration app is going to
> have a very short shelf life anyway, so your chances of having
> configuration make it into the standard desktop tools are pretty
> minimal.
Nope, I mean that some (standardized) basic parameters will be always
supported by the driver, and some extended parameters could be added
later, and more generic apps (like, say, generic Gnome or KDE tools for
setting up mouse/tablets/etc) will *still* be able to set up the basic
aspects of the device, and if you need more settings you get the
specialized device setup program.

Now suppose I write a new version of a driver and add a new special
parameter for the device. With the approach you propose I will have to
say in the INSTALL file: "Unfortunately, the proper X11 infrastructure
for supporting the new features in this new version isn't yet released,
you will have to wait for x.org 7.2 in order to be able to use these
features, which could be released in September or maybe later - who
knows".

How about something generic, like this:

#define DEVICE_GENERICPARAM #?

typedef struct {
	XID control;
	int length;
	char *parameter;
	char *value;
} XStringParamControl;

This will allow setting/querying any number of generic parameters, and
keep that backward/forward compatible. For example, I could just set
the "Button1" parameter of the tablet to "core ctrl alt BackSpace", or
something like "doubleclick 3", and same structure can be used in
XGetDeviceControl, just that the 'value' will be uninitialized on input
and filled on return. Maybe even drivers can support an "ListParams"
value which will return a string containing a comma-separated list of
changeable parameters, this will make it easier to write generic tools.

> > specific to a single driver or even to a single hardware model, and
> > I don't see why the need to standardize all this.
> Having a generic button -> action mapping might be a good thing;
> Zepheniah E. Hull can expand more on this, as he's dealing with the
> evdev driver quite extensively.
Yes, I'm impatiently waiting to see what will change in xinput API soon
as I was told it's going through some review; but in the meantime (and
for users of earlier x11 versions) I'm doing what I do now.

-- 
Greetings,
   Andrew



More information about the xorg mailing list