diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2009-09-02 06:47:13 -0700 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2009-12-22 23:24:13 -0800 |
commit | 0711598dd3e8366217676f462f1af7d0899656d9 (patch) | |
tree | 48d031084a36d03dab4ba9726712b74597d37bac /include | |
parent | c6e8637e29e0ca11dfb35c02da7ca6002ac8c597 (diff) |
config: Introduce InputAttributes in NewInputDeviceRequest
In order to give NewInputDeviceRequest more information, a new
InputAttributes type is introduced. Currently, this collects the product
and vendor name, device path, and sets booleans for attributes such as
having keys and/or a pointer. Only the HAL backend fills in the
attributes, though.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/input.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/input.h b/include/input.h index afcc006f8..7a6242d08 100644 --- a/include/input.h +++ b/include/input.h @@ -52,6 +52,7 @@ SOFTWARE. #include "screenint.h" #include <X11/Xmd.h> #include <X11/Xproto.h> +#include <stdint.h> #include "window.h" /* for WindowPtr */ #include "xkbrules.h" #include "events.h" @@ -210,6 +211,20 @@ typedef struct _InputOption { struct _InputOption *next; } InputOption; +typedef struct _InputAttributes { + char *product; + char *vendor; + char *device; + uint32_t flags; +} InputAttributes; + +#define ATTR_KEYBOARD (1<<0) +#define ATTR_POINTER (1<<1) +#define ATTR_JOYSTICK (1<<2) +#define ATTR_TABLET (1<<3) +#define ATTR_TOUCHPAD (1<<4) +#define ATTR_TOUCHSCREEN (1<<5) + /* Key has been run through all input processing and events sent to clients. */ #define KEY_PROCESSED 1 /* Key has not been fully processed, no events have been sent. */ @@ -514,6 +529,7 @@ void FixUpEventFromWindow(DeviceIntPtr pDev, /* Implemented by the DDX. */ extern _X_EXPORT int NewInputDeviceRequest( InputOption *options, + InputAttributes *attrs, DeviceIntPtr *dev); extern _X_EXPORT void DeleteInputDeviceRequest( DeviceIntPtr dev); |