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