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