anpaza at mail.ru
Tue Apr 18 00:40:20 PDT 2006
On Tue, 18 Apr 2006 00:57:43 +0300
Daniel Stone <daniel at fooishbar.org> wrote:
> > Why? The Unix ioctl is used a lot of years, and it has proven
> > himself a handy mechanism for exchanging data with the driver. I
> > don't see a big need for those structures to be officialy approved
> > by the X.org developers, this will certainly be an extra barrier
> > for driver developers, and they will anyway tend to overcome it in
> > some perverted way.
> And ioctls are now more-or-less deprecated in favour of sysfs. Go
> figure, I guess ...
Well, I never heard it put so straight "deprecated", I was under
impression that sysfs is meant to complement ioctl. And anyways, the
sysfs ideology is quite far from XChangeDeviceControl; while ioctl() is
it's closest cousine :)
> If there are hundreds of such structures, we're already doing
> something wrong. What use cases do you have in mind?
Well, here are the parameters for Wacom tablets:
These four already fit in a separate structure, like DEVICE_ACTIVEAREA
or something like this.
This one doesn't make sense to be put into any other structure?
So a separate DEVICE_DEBUGLEVEL? :-)
Well, with a big strain we can put all of the above into a single
structure, but this will introduce an additional level of complexity
like parsing masks or checking for -1 (DONTCHANGE flags) and such.
These definitely belong to a different structure, like
DEVICE_BUTTONACTIONS, and again there's the problem that you can't
change a single button assignment at a time. Right now it's simple:
call XChangeDeviceControl with DEVICE_RESOLUTION,
resolutions  = XWACOM_PARAM_BUTTONX; resolutions  = action;
and you're done.
More information about the xorg