1XGETDEVICEPROPERTY(libmansuffix) 2================================ 3 4NAME 5---- 6 7 XGetDeviceProperty, XChangeDeviceProperty, 8 XDeleteDeviceProperty - Get, change or delete a device's 9 property. 10 11SYNOPSIS 12-------- 13 14 #include <X11/extensions/XInput.h> 15 16 int XGetDeviceProperty( Display *display, 17 XDevice *device, 18 Atom property, 19 long offset, 20 long length, 21 Bool delete, 22 Atom req_type, 23 Atom *actual_type_return, 24 int *actual_format_return, 25 unsigned long *nitems_return, 26 unsigned long *bytes_after_return, 27 unsigned char **prop_return) 28 29 void XChangeDeviceProperty( Display *display, 30 XDevice *device, 31 Atom property, 32 Atom type, 33 int format, 34 int mode, 35 const unsigned char *data, 36 int nelements) 37 38 void XDeleteDeviceProperty( Display *display, 39 XDevice *device, 40 Atom property) 41 42 43 actual_type_return 44 Returns an atom identifier that defines the actual type 45 of the property. 46 47 actual_format_return 48 Returns the actual format of the property. 49 50 bytes_after_return 51 Returns the number of bytes remaining to be read in the 52 property if a partial read was performed. 53 54 data 55 Specifies the property data. 56 57 delete 58 Specifies a Boolean value that determines whether the 59 property is deleted. 60 61 display 62 Specifies the connection to the X server. 63 64 device 65 The device to grab. 66 67 format 68 Specifies whether the data should be viewed as a list of 69 8-bit, 16-bit, or 32-bit quantities. Possible values are 70 8, 16, and 32. This information allows the X server to 71 correctly perform byte-swap operations as necessary. If 72 the format is 16-bit or 32-bit, you must explicitly cast 73 the data pointer to an (unsigned char*) in the call to 74 XChangeDeviceProperty. 75 76 length 77 Specifies the length in 32-bit multiplies of the data to 78 be retrieved. 79 80 mode 81 Specifies the mode of operation. You can pass 82 PropModeReplace, PropModePrepend, or PropModeAppend. 83 84 nelements 85 Specifies the number of elements in data. 86 87 nitems_return 88 Returns the actual number of 8-bit, 16-bit, or 32-bit 89 items stored in the prop_return array. 90 91 num_values 92 Specifies the number of elements in the values list. 93 94 offset 95 Specifies the offset in the specified property (in 96 32-bit quantities) where the data is to be retrieved. 97 98 property 99 Specifies the property to modify or query. 100 101 prop_return 102 Returns the data in the specified format. If the 103 returned format is 8, the returned data is represented 104 as a char array. If the returned format is 16, the 105 returned data is represented as an array of short int 106 type and should be cast to that type to obtain the 107 elements. If the returned format is 32, the property 108 data will be stored as an array of longs (which in a 109 64-bit application will be 64-bit values that are padded 110 in the upper 4 bytes). 111 112 req_type 113 Specifies the atom identifier associated with the 114 property type or AnyPropertyType. 115 116DESCRIPTION 117----------- 118 119The XGetDeviceProperty function returns the actual type of the 120property; the actual format of the property; the number of 1218-bit, 16-bit, or 32-bit items transferred; the number of bytes 122remaining to be read in the property; and a pointer to the data 123actually returned. For a detailed description of this function, 124see the man page to XGetWindowProperty. 125 126The XChangeDeviceProperty function alters the property for the 127specified device and causes the server to generate a 128XPropertyNotifyEvent event on that device. For a detailed 129description of this function, see the man page to 130XChangeProperty. 131 132The XDeleteDeviceProperty function deletes the specified device 133property. Note that a client cannot delete a property created 134by a driver or the server. Attempting to do so will result in a 135BadAtom error. 136 137XGetDeviceProperty can generate a BadAtom, BadDevice error. 138 139XChangeDeviceProperty can generate a BadDevice, a BadMatch, a 140BadAtom, and a BadValue error. 141 142XDeleteDeviceProperty can generate a BadDevice, and a BadAtom 143error. 144 145DIAGNOSIS 146--------- 147 148 BadAtom 149 A value does not describe a valid named identifier or 150 the client attempted to remove a driver-allocated 151 property. 152 153 BadDevice 154 An invalid device was specified. The device does not 155 exist. 156 157SEE ALSO 158-------- 159 160 XListDeviceProperties(libmansuffix) 161