From a30fef9956b296f59ea18a9ee38d0abafeb15a4e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 16 Jun 2009 16:38:11 +1000 Subject: input: Add labels to buttons and valuators - ABI_XINPUT_VERSION 7 Signed-off-by: Peter Hutterer --- include/exevents.h | 1 + include/input.h | 6 +++++- include/inputstr.h | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/exevents.h b/include/exevents.h index 80eaa768d..861d0ddb1 100644 --- a/include/exevents.h +++ b/include/exevents.h @@ -73,6 +73,7 @@ extern _X_EXPORT int InitProximityClassDeviceStruct( extern _X_EXPORT void InitValuatorAxisStruct( DeviceIntPtr /* dev */, int /* axnum */, + Atom /* label */, int /* minval */, int /* maxval */, int /* resolution */, diff --git a/include/input.h b/include/input.h index b3d56b31c..9711fa87d 100644 --- a/include/input.h +++ b/include/input.h @@ -274,11 +274,13 @@ extern _X_EXPORT Bool SetKeySymsMap( extern _X_EXPORT Bool InitButtonClassDeviceStruct( DeviceIntPtr /*device*/, int /*numButtons*/, + Atom* /* labels */, CARD8* /*map*/); extern _X_EXPORT Bool InitValuatorClassDeviceStruct( DeviceIntPtr /*device*/, int /*numAxes*/, + Atom* /* labels */, int /*numMotionEvents*/, int /*mode*/); @@ -351,9 +353,11 @@ extern _X_EXPORT Bool InitPointerDeviceStruct( DevicePtr /*device*/, CARD8* /*map*/, int /*numButtons*/, + Atom* /* btn_labels */, PtrCtrlProcPtr /*controlProc*/, int /*numMotionEvents*/, - int /*numAxes*/); + int /*numAxes*/, + Atom* /* axes_labels */); extern _X_EXPORT Bool InitKeyboardDeviceStruct( DeviceIntPtr /*device*/, diff --git a/include/inputstr.h b/include/inputstr.h index 23c34a5e8..b284ea4e9 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -215,6 +215,7 @@ typedef struct _AxisInfo { int max_resolution; int min_value; int max_value; + Atom label; } AxisInfo, *AxisInfoPtr; typedef struct _ValuatorAccelerationRec { @@ -254,6 +255,7 @@ typedef struct _ButtonClassRec { CARD8 postdown[DOWN_LENGTH]; CARD8 map[MAP_LENGTH]; union _XkbAction *xkb_acts; + Atom labels[MAX_BUTTONS]; } ButtonClassRec, *ButtonClassPtr; typedef struct _FocusClassRec { -- cgit v1.2.3