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