[PATCH 2/3] config: Introduce InputProperties in NewInputDeviceRequest
Peter Hutterer
peter.hutterer at who-t.net
Fri Oct 16 15:42:36 PDT 2009
On Fri, Oct 16, 2009 at 06:16:44AM -0700, Dan Nicholson wrote:
> On Thu, Oct 15, 2009 at 10:32 PM, Peter Hutterer
> <peter.hutterer at who-t.net> wrote:
> > On Sun, Oct 04, 2009 at 09:01:50AM -0700, Dan Nicholson wrote:
> >> In order to give NewInputDeviceRequest more information, a new
> >> InputProperties type is introduced. Currently, this collects the product
> >> name, device path, and sets booleans for having keys and/or a pointer.
> >> Only the HAL backend fills in the structure, though.
> >>
> >> Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
> >> ---
[...]
> >> diff --git a/include/input.h b/include/input.h
> >> index afcc006..683d031 100644
> >> --- a/include/input.h
> >> +++ b/include/input.h
> >> @@ -210,6 +210,13 @@ typedef struct _InputOption {
> >> struct _InputOption *next;
> >> } InputOption;
> >>
> >> +typedef struct _InputProperties {
> >> + char *name;
> >> + char *device;
> >> + Bool keyboard;
> >> + Bool pointer;
> >> +} InputProperties;
> >
> > how about a 'flags' field with the matching defines instead of two bools?
> > this seems more future-proof in terms of ABI.
>
> Yeah, that seems like a good idea. Any preferences for macro names?
> PROP_KEYBOARD/PROP_POINTER?
no specific preference, but now that I look at this bit again I'd prefer a
different name for this struct anyway. InputProperties is too close to input
device properties and would likely cause confusion for someone not
familiar with the code. maybe 'InputAttributes'?
Cheers,
Peter
More information about the xorg-devel
mailing list