diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-08 14:27:01 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-13 13:24:08 +1000 |
commit | 218752bdc5d9323d1e6202e762573a925cf8a4eb (patch) | |
tree | 7613d317f6306fdc03ff32c94b2657b1e3987d0a /include | |
parent | cd56bd7b3ee34a4b10eb3a57a6e94cac7512167a (diff) |
input: replace GRABTYPE_* with the InputLevel enums
They achieve the same thing, re-use the more generic InputLevel so we can
convert to/fro easier.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/dixgrabs.h | 2 | ||||
-rw-r--r-- | include/eventconvert.h | 6 | ||||
-rw-r--r-- | include/exevents.h | 6 | ||||
-rw-r--r-- | include/input.h | 6 | ||||
-rw-r--r-- | include/inputstr.h | 8 |
5 files changed, 11 insertions, 17 deletions
diff --git a/include/dixgrabs.h b/include/dixgrabs.h index ea8877072..4dd5eae6d 100644 --- a/include/dixgrabs.h +++ b/include/dixgrabs.h @@ -40,7 +40,7 @@ extern GrabPtr CreateGrab( DeviceIntPtr /* device */, DeviceIntPtr /* modDevice */, WindowPtr /* window */, - GrabType /* grabtype */, + enum InputLevel /* grabtype */, GrabMask * /* mask */, struct _GrabParameters * /* param */, int /* type */, diff --git a/include/eventconvert.h b/include/eventconvert.h index bb45eefef..571a51109 100644 --- a/include/eventconvert.h +++ b/include/eventconvert.h @@ -31,12 +31,6 @@ #define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16)) -enum InputLevel { - CORE, - XI, - XI2, -}; - _X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count); _X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count); _X_EXPORT int EventToXI2(InternalEvent *ev, xEvent **xi); diff --git a/include/exevents.h b/include/exevents.h index 12ea37885..0ab04f525 100644 --- a/include/exevents.h +++ b/include/exevents.h @@ -159,7 +159,7 @@ typedef struct _XIClientRec { typedef struct _GrabParameters { - int grabtype; /* GRABTYPE_CORE, etc. */ + int grabtype; /* CORE, etc. */ unsigned int ownerEvents; unsigned int this_device_mode; unsigned int other_devices_mode; @@ -200,7 +200,7 @@ GrabButton( DeviceIntPtr /* modifier_device */, int /* button */, GrabParameters* /* param */, - GrabType /* grabtype */, + enum InputLevel /* grabtype */, GrabMask* /* eventMask */); extern int @@ -210,7 +210,7 @@ GrabKey( DeviceIntPtr /* modifier_device */, int /* key */, GrabParameters* /* param */, - GrabType /* grabtype */, + enum InputLevel /* grabtype */, GrabMask* /* eventMask */); extern int diff --git a/include/input.h b/include/input.h index cbfaba714..7c5ad3cd9 100644 --- a/include/input.h +++ b/include/input.h @@ -102,6 +102,12 @@ SOFTWARE. #define RevertToFollowKeyboard 3 #endif +enum InputLevel { + CORE, + XI, + XI2, +}; + typedef unsigned long Leds; typedef struct _OtherClients *OtherClientsPtr; typedef struct _InputClients *InputClientsPtr; diff --git a/include/inputstr.h b/include/inputstr.h index 5634f3cfc..754a3f850 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -167,12 +167,6 @@ typedef struct _DetailRec { /* Grab details may be bit masks */ Mask *pMask; } DetailRec; -typedef enum { - GRABTYPE_CORE, - GRABTYPE_XI, - GRABTYPE_XI2 -} GrabType; - union _GrabMask { Mask core; Mask xi; @@ -200,7 +194,7 @@ typedef struct _GrabRec { unsigned ownerEvents:1; unsigned keyboardMode:1; unsigned pointerMode:1; - GrabType grabtype; + enum InputLevel grabtype; CARD8 type; /* event type */ DetailRec modifiersDetail; DeviceIntPtr modifierDevice; |