2 .\" Title: xichangeproperty
3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
6 .\" Manual: [FIXME: manual]
7 .\" Source: [FIXME: source]
10 .TH "XICHANGEPROPERTY" "libmansuffix" "12/21/2011" "[FIXME: source]" "[FIXME: manual]"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 XIChangeProperty, XIGetProperty, XIDeleteProperty \- change, retrieve or delete a device\*(Aqs property\&.
35 #include <X11/extensions/XInput2\&.h>
39 void XIChangeProperty( Display* dpy,
50 void XIDeleteProperty( Display *dpy,
56 Status XIGetProperty( Display *dpy,
65 unsigned long *num_items_return,
66 unsigned long *bytes_after_return,
72 Returns the number of bytes remaining to be read in the prop\-
73 erty if a partial read was performed\&.
78 Specifies the property data\&.
83 Specifies the connection to the X server\&.
88 Specifies a Boolean value that determines whether the property
94 The device to list the properties for\&.
99 Specifies whether the data should be viewed as a list of
100 8\-bit, 16\-bit, or 32\-bit quantities\&. Possible values are 8,
101 16, and 32\&. This information allows the X server to correctly
102 perform byte\-swap operations as necessary\&. If the
103 format is 16\-bit or 32\-bit, you must explicitly cast your
104 data pointer to an (unsigned char *) in the call to
110 Returns the actual format of the property\&.
115 Specifies the length in 32\-bit multiples of the data to be
121 Specifies the offset in the specified property (in 32\-bit
122 quantities) where the data is to be retrieved\&.
127 One of XIPropModeAppend, XIPropModePrepend or XIPropModeReplace\&.
132 Number of items in data in the format specified\&.
137 Returns the actual number of 8\-bit, 16\-bit, or 32\-bit items
143 Specifies the property name\&.
148 Specifies the type of the property\&. The X server does not
149 interpret the type but simply passes it back to an application
150 that later calls XIGetProperty\&.
155 Returns the atom identifier that defines the actual type of
160 The XIGetProperty function returns the actual type of the property; the actual format of the property; the number of 8\-bit, 16\-bit, or 32\-bit items transferred; the number of bytes remaining to be read in the property; and a pointer to the data actually returned\&. XIGetProperty sets the return arguments as follows:
170 If the specified property does not exist for the specified device, XIGetProperty returns None to actual_type_return and the value zero to actual_format_return and bytes_after_return\&. The nitems_return argument is empty\&. In this case, the delete argument is ignored\&.
181 If the specified property exists but its type does not match the specified type, XIGetProperty returns the actual property type to actual_type_return, the actual property format (never zero) to actual_format_return, and the property length in bytes (even if the actual_format_return is 16 or 32) to bytes_after_return\&. It also ignores the delete argument\&. The nitems_return argument is empty\&.
192 If the specified property exists and either you assign XIAnyPropertyType to the req_type argument or the specified type matches the actual property type, XIGetProperty returns the actual property type to actual_type_return and the actual property format (never zero) to actual_format_return\&. It also returns a value to bytes_after_return and nitems_return, by defining the following values:
198 N = length of the stored property in bytes
201 L = MINIMUM(T, 4 * length)
209 The returned value starts at byte index I in the property (indexing from zero), and its length in bytes is L\&. If the value for long_offset causes L to be negative, a BadValue error results\&. The value of bytes_after_return is A, giving the number of trailing unread bytes in the stored property\&.
211 If the returned format is 8, the returned data is represented as a char array\&. If the returned format is 16, the returned data is represented as a uint16_t array and should be cast to that type to obtain the ele\- ments\&. If the returned format is 32, the returned data is represented as a uint32_t array and should be cast to that type to obtain the elements\&.
213 XIGetProperty always allocates one extra byte in prop_return (even if the property is zero length) and sets it to zero so that simple properties consisting of characters do not have to be copied into yet another string before use\&.
215 If delete is True and bytes_after_return is zero, XIGetProperty deletes the property from the window and generates an XIPropertyNotify event on the window\&.
217 The function returns Success if it executes successfully\&. To free the resulting data, use XFree\&.
219 XIGetProperty can generate BadAtom, BadValue, and BadWindow errors\&.
221 The XIChangeProperty function alters the property for the specified device and causes the X server to generate a XIPropertyNotify event for that device\&. XIChangeProperty performs the following:
231 If mode is XIPropModeReplace, XIChangeProperty discards the previous property value and stores the new data\&.
242 If mode is XIPropModePrepend or XIPropModeAppend, XIChangeProperty inserts the specified data before the beginning of the existing data or onto the end of the existing data, respectively\&. The type and format must match the existing property value, or a BadMatch error results\&. If the property is undefined, it is treated as defined with the correct type and format with zero\-length data\&.
245 If the specified format is 8, the property data must be a char array\&. If the specified format is 16, the property data must be a uint16_t array\&. If the specified format is 32, the property data must be a uint32_t array\&.
247 The lifetime of a property is not tied to the storing client\&. Properties remain until explicitly deleted, until the device is removed, or until the server resets\&. The maximum size of a property is server dependent and can vary dynamically depending on the amount of memory the server has available\&. (If there is insufficient space, a BadAlloc error results\&.)
249 XIChangeProperty can generate BadAlloc, BadAtom, BadMatch, BadValue, and BadDevice errors\&.
251 The XIDeleteProperty function deletes the specified property only if the property was defined on the specified device and causes the X server to generate a XIPropertyNotify event for the device unless the property does not exist\&.
253 XIDeleteProperty can generate BadAtom and BadDevice errors\&.
256 BadAlloc The server failed to allocate the requested resource or server memory\&.
258 BadAtom A value for an Atom argument does not name a defined Atom\&.
260 BadValue Some numeric value falls outside the range of values accepted by the request\&. Unless a specific range is specified for an argument, the full range defined by the argument\(cqs type is accepted\&. Any argument defined as a set of alternatives can generate this error\&.
262 BadDevice An invalid device was specified\&. The device does not exist\&.
264 BadAtom An invalid property was specified\&. The property does not exist\&.
271 The protocol headers for XI 2\&.0 did not provide
272 XIAnyPropertyType, XIPropModeReplace, XIPropModePrepend or
273 XIPropModeAppend\&. Use AnyPropertyType, PropModeReplace,
274 PropModePrepend and PropModeAppend instead, respectively\&.
281 XIListProperties(libmansuffix)