mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
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>
This commit is contained in:
parent
cd56bd7b3e
commit
218752bdc5
18 changed files with 152 additions and 158 deletions
|
|
@ -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 */,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue