On Tue, May 05, 2009 at 07:27:30PM +0200, Sven Neumann wrote:
> Hi,
> 
> the DFBInputEvent struct has min and max fields that can optionally be
> set. The documentation for DFBInputEventFlags indicates that they are
> useful for handling absolute motion events. And indeed that's where I
> would like to use them. Unfortunately it appears that the linux-input
> driver does not set these fields. Can that be considered a bug and would
> you accept a patch that fixes this? Or am I misunderstanding the purpose
> of these fields?

You understanding matches mine, but I didn't add that stuff so who
knows :)

> On a related note, I found DFBInputDeviceAxisInfo in the directfb.h
> header file. This looks useful, but unfortunately I did not find any
> method to query the input device for this information. Did I miss
> something obvious?

Since the struct is public I guess a public method for querying it was
planned but never added. Or maybe DFBInputDeviceAxisInfo was
accidentally misplaced.

An input driver can implement the GetAxisInfo() method which the input
core then can use to get the min/max values during init. It will then
fill the min/max in an axis abs event with those values unless they
were already set.

With linux_input it's at least theoretically possible that the min/max
values can change during the lifetime of the device so I'm not sure if
GetAxisInfo() would be the best option. On the other hand there doesn't
seem to be any event sent when those parameters change so users of the
device wouldn't notice the change anyway unless they actively poll the
device. Maybe EV_SYN/SYN_CONFIG was meant for that but at least I can't
see any use of that event in the kernel source.

-- 
Ville Syrjälä
syrj...@sci.fi
http://www.sci.fi/~syrjala/
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to