XIChangeHierarchy.txt revision c27c18e8
1XICHANGEHIERARCHY(libmansuffix) 2=============================== 3 4NAME 5---- 6 7 XIChangeHierarchy - change the device hierarchy. 8 9SYNOPSIS 10-------- 11 12 #include <X11/extensions/XInput2.h> 13 14 Status XIChangeHierarchy( Display *display, 15 XIAnyHierarchyChangeInfo *changes, 16 int num_changes); 17 18 display 19 Specifies the connection to the X server. 20 21 num_changes 22 Specifies the number of elements in changes. 23 24 changes 25 Specifies the changes to be made. 26 27DESCRIPTION 28----------- 29 30 XIChangeHierarchy modifies the device hierarchy by creating or 31 removing master devices or changing the attachment of slave 32 devices. If num_changes is non-zero, changes is an array of 33 XIAnyHierarchyChangeInfo structures. 34 35 XIChangeHierarchy processes changes in order, effective 36 immediately. If an error occurs, processing is aborted and the 37 error is reported to the client. Changes already made remain 38 effective. 39 40 The list of changes is any combination of 41 XIAnyHierarchyChangeInfo. The type of a hierarchy change can be 42 XIAddMaster, XIRemoveMaster, XIAttachSlave or XIDetachSlave. 43 44 typedef union { 45 int type; 46 XIAddMasterInfo add; 47 XIRemoveMasterInfo remove; 48 XIAttachSlave attach; 49 XIDetachSlave detach; 50 } XIAnyHierarchyChangeInfo; 51 52 typedef struct { 53 int type; /* XIAddMaster */ 54 char* name; 55 Bool send_core; 56 Bool enable; 57 } XIAddMasterInfo; 58 59 typedef struct { 60 int type; /* XIRemoveMaster */ 61 int deviceid; 62 int return_mode; 63 int return_pointer; 64 int return_keyboard; 65 } XIRemoveMasterInfo; 66 67 typedef struct { 68 int type; /* XIAttachSlave */ 69 int deviceid; 70 int new_master; 71 } XIAttachSlaveInfo; 72 73 typedef struct { 74 int type; /* XIDetachSlave */ 75 int deviceid; 76 } XIDetachSlaveInfo; 77 78 XIAddMasterInfo creates a new master pointer and a new 79 master keyboard labelled "name pointer" and "name keyboard" 80 respectively. If sendCore is True, the devices will send core 81 events. If enable is True, the device is enabled immediately. 82 83 XIAddMasterInfo can generate a BadValue error. 84 85 XIRemoveMasterInfo removes device and its paired master device. 86 If returnMode is XIAttachToMaster, all pointers attached to 87 device or its paired master device are attached to 88 returnPointer. Likewise, all keyboards are attached to 89 returnKeyboard. If returnMode is XIFloating, all attached 90 devices are set to floating. 91 92 XIRemoveMasterInfo can generate a BadValue and a BadDevice 93 error. 94 95 XIAttachSlaveInfo attaches device to newMaster. If the device 96 is currently attached to a master device, it is detached from 97 the master device and attached to the new master device. 98 99 XIAttachSlaveInfo can generate a BadDevice error. 100 101 XIDettachSlaveInfo deattaches device from the current master 102 device and sets it floating. If the device is already floating, 103 no changes are made. 104 105 XIDetachSlaveInfo can generate a BadDevice error. 106 107 XIChangeHierarchy generates an XIHierarchyEvent if any 108 modifications were successful. 109 110DIAGNOSTICS 111----------- 112 113 BadDevice 114 An invalid device was specified. The device does not 115 exist or is not a appropriate for the type of change. 116 117 BadValue 118 Some numeric value falls out of the allowed range. 119 120