XCHANGEDEVICEHIERARC(3) libXi XCHANGEDEVICEHIERARC(3)NAMEXChangeDeviceHierarchy - change the device hierarchy.
SYNTAX
#include <X11/extensions/XInput.h>
Status XChangeDeviceHierarchy(Display *display,
XAnyHierarchyChangeInfo *changes,
int num_changes);
ARGUMENTS
display
Specifies the connection to the X server.
num_changes
Specifies the number of elements in changes.
changes
Specifies the changes to be made.
DESCRIPTIONXChangeDeviceHierarchy modifies the device hierarchy by creating or
removing master devices or changing the attachment of slave devices. If
num_changes is non-zero, changes is an array of XAnyHierarchyChangeInfo
structures.
XChangeDeviceHierarchy processes changes in order, effective
immediately. If an error occurs, processing is aborted and the error is
reported to the client. Changes already made remain effective.
The list of changes is any combination of XAnyHierarchyChangeInfo. The
type of a hierarchy change can be CH_CreateMasterDevice,
CH_RemoveMasterDevice or CH_ChangeAttachment.
typedef union {
int type;
XCreateMasterInfo create;
XRemoveMasterInfo remove;
XChangeAttachmentInfo change;
} XAnyHierarchyChangeInfo;
typedef struct {
int type; /* CH_CreateMasterDevice */
char* name;
Bool sendCore;
Bool enable;
} XCreateMasterInfo;
typedef struct {
int type; /* CH_RemoveMasterDevice */
XDevice* device;
int returnMode;
XDevice* returnPointer;
XDevice* returnKeyboard;
} XRemoveMasterInfo;
typedef struct {
int type; /* CH_ChangeAttachment */
XDevice* device;
int changeMode;
XDevice* newMaster;
} XChangeAttachmentInfo;
XCreateMasterInfo creates a new master pointer and a new master
keyboard labelled "name pointer" and "name keyboard" respectively. If
sendCore is True, the devices will send core events. If enable is True,
the device is enabled immediately.
XCreateMasterInfo can generate a BadValue error.
XRemoveMasterInfo removes device and its paired master device. If
returnMode is AttachToMaster, all pointers attached to device or its
paired master device are attached to returnPointer. Likewise, all
keyboards are attached to returnKeyboard. If returnMode is Floating,
all attached devices are set to floating.
XRemoveMasterInfo can generate a BadValue and a BadDevice error.
XChangeAttachmentInfo changes the attachment of device to newMaster if
changeMode is AttachToMaster. Otherwise, if changeMode is Floating,
device is set floating.
XChangeAttachmentInfo can generate a BadDevice and a BadValue error.
DIAGNOSIS
BadDevice
An invalid device was specified. The device does not exist or is not
a appropriate for the type of change.
BadValue
Some numeric value falls out of the allowed range.
AUTHOR
Peter Hutterer
Specification and implementation.
February 14, 2008 XCHANGEDEVICEHIERARC(3)