summaryrefslogtreecommitdiff
path: root/XI2proto.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-07 17:51:04 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-12 16:27:38 +1000
commitdb98b817355ed12609cff077c4a12948ac41f88d (patch)
treea180e3e676725021b0b97704f652ab1a8849f006 /XI2proto.h
parent48cf9a56066c4b5a2136310da3cd6846dcf3b607 (diff)
Add a source field to the class information.
In some cases it is required to know the source device of a particular device class. In the future we might also do lazy copying of classes, meaning that for a given device, each class may come from a different source. Hence the source id should be included for each class. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'XI2proto.h')
-rw-r--r--XI2proto.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/XI2proto.h b/XI2proto.h
index 9661dfb..1bb5a50 100644
--- a/XI2proto.h
+++ b/XI2proto.h
@@ -156,6 +156,8 @@ typedef struct {
typedef struct {
uint16_t type; /**< One of *class */
uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
+ uint16_t pad;
} xXIAnyInfo;
/**
@@ -169,8 +171,8 @@ typedef struct {
typedef struct {
uint16_t type; /**< Always ButtonClass */
uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
uint16_t num_buttons; /**< Number of buttons provide */
- uint16_t pad;
} xXIButtonInfo;
/**
@@ -184,8 +186,8 @@ typedef struct {
typedef struct {
uint16_t type; /**< Always KeyClass */
uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
uint16_t num_keycodes; /**< Number of keys provided */
- uint16_t pad;
} xXIKeyInfo;
/**
@@ -198,13 +200,15 @@ typedef struct {
typedef struct {
uint16_t type; /**< Always ValuatorClass */
uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
+ uint16_t number; /**< Valuator number */
Atom name; /**< Valuator name */
FP3232 min; /**< Min value */
FP3232 max; /**< Max value */
uint32_t resolution; /**< Resolutions in units/m */
- uint16_t number; /**< Valuator number */
uint8_t mode; /**< ModeRelative or ModeAbsolute */
- uint8_t pad;
+ uint8_t pad1;
+ uint16_t pad2;
} xXIValuatorInfo;