summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-07 16:52:31 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-08 14:33:44 +1000
commitbae070914fc27db122e6131ae4838559c4a72f65 (patch)
tree7e92d1103a2013b3b70fb6c4e916a6010fdc44d5 /Xi
parent83f32d3972b8bfb0a87069dfb3fcd64b6b7c6424 (diff)
input: update to inputproto 1.9.99.8 XI2 defines.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/chdevhier.c24
-rw-r--r--Xi/exevents.c2
-rw-r--r--Xi/querydev.c24
-rw-r--r--Xi/selectev.c2
-rw-r--r--Xi/xiallowev.c12
-rw-r--r--Xi/xipassivegrab.c14
-rw-r--r--Xi/xiselectev.c7
7 files changed, 43 insertions, 42 deletions
diff --git a/Xi/chdevhier.c b/Xi/chdevhier.c
index 746f4a597..96b515df4 100644
--- a/Xi/chdevhier.c
+++ b/Xi/chdevhier.c
@@ -95,7 +95,7 @@ void XISendDeviceHierarchyEvent(int flags)
info++;
}
- dummyDev.id = AllDevices;
+ dummyDev.id = XIAllDevices;
SendEventToAllWindows(&dummyDev, (XI_HierarchyChangedMask >> 8), (xEvent*)ev, 1);
}
@@ -146,7 +146,7 @@ ProcXIChangeDeviceHierarchy(ClientPtr client)
switch(any->type)
{
- case CH_CreateMasterDevice:
+ case XICreateMasterDevice:
{
xXICreateMasterInfo* c = (xXICreateMasterInfo*)any;
char* name;
@@ -194,16 +194,16 @@ ProcXIChangeDeviceHierarchy(ClientPtr client)
AttachDevice(NULL, xtstkeybd, keybd);
xfree(name);
- flags |= HF_MasterAdded;
+ flags |= XIMasterAdded;
}
break;
- case CH_RemoveMasterDevice:
+ case XIRemoveMasterDevice:
{
xXIRemoveMasterInfo* r = (xXIRemoveMasterInfo*)any;
DeviceIntPtr xtstdevice;
- if (r->return_mode != AttachToMaster &&
- r->return_mode != Floating)
+ if (r->return_mode != XIAttachToMaster &&
+ r->return_mode != XIFloating)
return BadValue;
rc = dixLookupDevice(&ptr, r->deviceid, client,
@@ -300,7 +300,7 @@ ProcXIChangeDeviceHierarchy(ClientPtr client)
/* Disabling sends the devices floating, reattach them if
* desired. */
- if (r->return_mode == AttachToMaster)
+ if (r->return_mode == XIAttachToMaster)
{
DeviceIntPtr attached,
newptr,
@@ -360,10 +360,10 @@ ProcXIChangeDeviceHierarchy(ClientPtr client)
RemoveDevice(xtstkeybd);
RemoveDevice(keybd);
RemoveDevice(ptr);
- flags |= HF_MasterRemoved;
+ flags |= XIMasterRemoved;
}
break;
- case CH_DetachSlave:
+ case XIDetachSlave:
{
xXIDetachSlaveInfo* c = (xXIDetachSlaveInfo*)any;
DeviceIntPtr *xtstdevice;
@@ -392,10 +392,10 @@ ProcXIChangeDeviceHierarchy(ClientPtr client)
}
AttachDevice(client, ptr, NULL);
- flags |= HF_SlaveDetached;
+ flags |= XISlaveDetached;
}
break;
- case CH_AttachSlave:
+ case XIAttachSlave:
{
xXIAttachSlaveInfo* c = (xXIAttachSlaveInfo*)any;
DeviceIntPtr newmaster;
@@ -444,7 +444,7 @@ ProcXIChangeDeviceHierarchy(ClientPtr client)
goto unwind;
}
AttachDevice(client, ptr, newmaster);
- flags |= HF_SlaveAttached;
+ flags |= XISlaveAttached;
}
break;
}
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 12c53eba2..777202965 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -685,7 +685,7 @@ XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, DeviceChanged
dcce->time = GetTimeInMillis();
dcce->deviceid = master->id;
dcce->sourceid = device->id;
- dcce->reason = SlaveSwitch;
+ dcce->reason = XISlaveSwitch;
dcce->num_classes = 0;
dcce->length = (len - sizeof(xEvent))/4;
diff --git a/Xi/querydev.c b/Xi/querydev.c
index c7ee0e162..b50d0382e 100644
--- a/Xi/querydev.c
+++ b/Xi/querydev.c
@@ -70,7 +70,7 @@ ProcXIQueryDevice(ClientPtr client)
REQUEST(xXIQueryDeviceReq);
REQUEST_SIZE_MATCH(xXIQueryDeviceReq);
- if (stuff->deviceid != AllDevices && stuff->deviceid != AllMasterDevices)
+ if (stuff->deviceid != XIAllDevices && stuff->deviceid != XIAllMasterDevices)
{
rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
@@ -87,15 +87,15 @@ ProcXIQueryDevice(ClientPtr client)
len = 0;
for (dev = inputInfo.devices; dev; dev = dev->next)
{
- if (stuff->deviceid == AllDevices ||
- (stuff->deviceid == AllMasterDevices && dev->isMaster))
+ if (stuff->deviceid == XIAllDevices ||
+ (stuff->deviceid == XIAllMasterDevices && dev->isMaster))
len += SizeDeviceInfo(dev);
}
for (dev = inputInfo.off_devices; dev; dev = dev->next)
{
- if (stuff->deviceid == AllDevices ||
- (stuff->deviceid == AllMasterDevices && dev->isMaster))
+ if (stuff->deviceid == XIAllDevices ||
+ (stuff->deviceid == XIAllMasterDevices && dev->isMaster))
len += SizeDeviceInfo(dev);
}
@@ -125,8 +125,8 @@ ProcXIQueryDevice(ClientPtr client)
{
for (dev = inputInfo.devices; dev; dev = dev->next)
{
- if (stuff->deviceid == AllDevices ||
- (stuff->deviceid == AllMasterDevices && dev->isMaster))
+ if (stuff->deviceid == XIAllDevices ||
+ (stuff->deviceid == XIAllMasterDevices && dev->isMaster))
{
len = ListDeviceInfo(dev, (xXIDeviceInfo*)info);
if (client->swapped)
@@ -138,8 +138,8 @@ ProcXIQueryDevice(ClientPtr client)
for (dev = inputInfo.off_devices; dev; dev = dev->next)
{
- if (stuff->deviceid == AllDevices ||
- (stuff->deviceid == AllMasterDevices && dev->isMaster))
+ if (stuff->deviceid == XIAllDevices ||
+ (stuff->deviceid == XIAllMasterDevices && dev->isMaster))
{
len = ListDeviceInfo(dev, (xXIDeviceInfo*)info);
if (client->swapped)
@@ -329,14 +329,14 @@ int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment)
if (dev->isMaster)
{
DeviceIntPtr paired = GetPairedDevice(dev);
- use = IsPointerDevice(dev) ? MasterPointer : MasterKeyboard;
+ use = IsPointerDevice(dev) ? XIMasterPointer : XIMasterKeyboard;
*attachment = (paired ? paired->id : 0);
} else if (master)
{
- use = IsPointerDevice(master) ? SlavePointer : SlaveKeyboard;
+ use = IsPointerDevice(master) ? XISlavePointer : XISlaveKeyboard;
*attachment = master->id;
} else
- use = FloatingSlave;
+ use = XIFloatingSlave;
return use;
}
diff --git a/Xi/selectev.c b/Xi/selectev.c
index 45bf68b3b..013fdc930 100644
--- a/Xi/selectev.c
+++ b/Xi/selectev.c
@@ -106,7 +106,7 @@ HandleDevicePresenceMask(ClientPtr client, WindowPtr win,
/* We always only use mksidx = AllDevices for events not bound to
* devices */
- if (AddExtensionClient (win, client, mask, AllDevices) != Success)
+ if (AddExtensionClient (win, client, mask, XIAllDevices) != Success)
return BadAlloc;
RecalculateDeviceDeliverableEvents(win);
diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
index 4df9a1033..9eb36c42b 100644
--- a/Xi/xiallowev.c
+++ b/Xi/xiallowev.c
@@ -72,24 +72,24 @@ ProcXIAllowEvents(ClientPtr client)
time = ClientTimeToServerTime(stuff->time);
switch (stuff->mode) {
- case ReplayDevice:
+ case XIReplayDevice:
AllowSome(client, time, dev, NOT_GRABBED);
break;
- case SyncDevice:
+ case XISyncDevice:
AllowSome(client, time, dev, FREEZE_NEXT_EVENT);
break;
- case AsyncDevice:
+ case XIAsyncDevice:
AllowSome(client, time, dev, THAWED);
break;
- case AsyncPairedDevice:
+ case XIAsyncPairedDevice:
if (dev->isMaster)
AllowSome(client, time, dev, THAW_OTHERS);
break;
- case SyncPair:
+ case XISyncPair:
if (dev->isMaster)
AllowSome(client, time, dev, FREEZE_BOTH_NEXT_EVENT);
break;
- case AsyncPair:
+ case XIAsyncPair:
if (dev->isMaster)
AllowSome(client, time, dev, THAWED_BOTH);
break;
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 61f36d268..0a6f0e517 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -93,8 +93,8 @@ ProcXIPassiveGrabDevice(ClientPtr client)
if (ret != Success)
return ret;
- if (stuff->grab_type != GrabtypeButton &&
- stuff->grab_type != GrabtypeKeysym)
+ if (stuff->grab_type != XIGrabtypeButton &&
+ stuff->grab_type != XIGrabtypeKeysym)
{
client->errorValue = stuff->grab_type;
return BadValue;
@@ -149,11 +149,11 @@ ProcXIPassiveGrabDevice(ClientPtr client)
param.modifiers = *modifiers;
switch(stuff->grab_type)
{
- case GrabtypeButton:
+ case XIGrabtypeButton:
status = GrabButton(client, dev, mod_dev, stuff->detail,
&param, GRABTYPE_XI2, &mask);
break;
- case GrabtypeKeysym:
+ case XIGrabtypeKeysym:
status = GrabKey(client, dev, mod_dev, stuff->detail,
&param, GRABTYPE_XI2, &mask);
break;
@@ -231,8 +231,8 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
if (rc != Success)
return rc;
- if (stuff->grab_type != GrabtypeButton &&
- stuff->grab_type != GrabtypeKeysym)
+ if (stuff->grab_type != XIGrabtypeButton &&
+ stuff->grab_type != XIGrabtypeKeysym)
{
client->errorValue = stuff->grab_type;
return BadValue;
@@ -250,7 +250,7 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
tempGrab.device = dev;
tempGrab.window = win;
tempGrab.type =
- (stuff->grab_type == GrabtypeButton) ? XI_ButtonPress : XI_KeyPress;
+ (stuff->grab_type == XIGrabtypeButton) ? XI_ButtonPress : XI_KeyPress;
tempGrab.grabtype = GRABTYPE_XI2;
tempGrab.modifierDevice = mod_dev;
tempGrab.modifiersDetail.pMask = NULL;
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c
index 607b9b4d0..601dec3f9 100644
--- a/Xi/xiselectev.c
+++ b/Xi/xiselectev.c
@@ -82,7 +82,8 @@ ProcXISelectEvent(ClientPtr client)
num_masks = stuff->num_masks;
while(num_masks--)
{
- if (evmask->deviceid != AllDevices && evmask->deviceid != AllMasterDevices)
+ if (evmask->deviceid != XIAllDevices &&
+ evmask->deviceid != XIAllMasterDevices)
rc = dixLookupDevice(&dev, evmask->deviceid, client, DixReadAccess);
else {
/* XXX: XACE here? */
@@ -109,8 +110,8 @@ ProcXISelectEvent(ClientPtr client)
num_masks = stuff->num_masks;
while(num_masks--)
{
- if (evmask->deviceid == AllDevices ||
- evmask->deviceid == AllMasterDevices)
+ if (evmask->deviceid == XIAllDevices ||
+ evmask->deviceid == XIAllMasterDevices)
{
dummy.id = evmask->deviceid;
dev = &dummy;