1
.\" Title: XGetDeviceProperty
2
.\" Author: Peter Hutterer
3
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
4
.\" Date: <pubdate>July 9, 2008</pubdate>
5
.\" Manual: XINPUT FUNCTIONS
6
.\" Source: __xorgversion__
2
.\" Title: xgetdeviceproperty
3
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4
.\" Generator: DocBook XSL Stylesheets v1.74.3 <http://docbook.sf.net/>
6
.\" Manual: [FIXME: manual]
7
.\" Source: [FIXME: source]
8
.TH "XGETDEVICEPROPERTY" "__libmansuffix__" "<pubdate>July 9, 2008</pubdate>" "__xorgversion__" "XINPUT FUNCTIONS"
10
.TH "XGETDEVICEPROPERTY" "libmansuffix" "10/02/2009" "[FIXME: source]" "[FIXME: manual]"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
9
14
.\" disable hyphenation
11
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
14
XGetDeviceProperty, XChangeDeviceProperty, XDeleteDeviceProperty - Get, change or delete a device's property.
19
#include <X11/extensions/XInput\.h>
23
.BI "int XGetDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ", long\ " "offset" ", long\ " "length" ", Bool\ " "delete" ", Bool\ " "pending" ", Atom\ " "req_type" ", Atom\ *" "actual_type_return" ", int\ *" "actual_format_return" ", unsigned\ long\ *" "nitems_return" ", unsigned\ long\ *" "bytes_after_return" ", unsigned\ char\ **" "prop_return" ");"
25
.BI "void XChangeDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ", Atom\ " "type" ", int\ " "format" ", int\ " "mode" ", const\ char\ *" "data" ", int\ " "nelements" ");"
27
.BI "void XDeleteDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ");"
31
\fIactual_type_return\fR
33
Returns an atom identifier that defines the actual type of the property\.
36
\fIactual_format_return\fR
38
Returns the actual format of the property\.
41
\fIbytes_after_return\fR
43
Returns the number of bytes remaining to be read in the property if a partial read was performed\.
48
Specifies the property data\.
53
Specifies a Boolean value that determines wether the property is deleted\.
58
Specifies the connection to the X server\.
68
Specifies whether the data should be viewed as a list of 8\-bit, 16\-bit, or 32\-bit quantities\. Possible values are 8, 16, and 32\. This information allows the X server to correctly perform byte\-swap operations as necessary\. If the format is 16\-bit or 32\-bit, you must explicitly cast the data pointer to an (unsigned char*) in the call to
69
\fBXChangeDeviceProperty\fR\.
74
Specifies the length in 32\-bit multiplies of the data to be retrieved\.
79
Specifies the mode of operation\. You can pass
80
\fBPropModeReplace\fR,
81
\fBPropModePrepend\fR, or
82
\fBPropModeAppend\fR\.
87
Specifies the number of elements in data\.
92
Returns the actual number of 8\-bit, 16\-bit, or 32\-bit items stored in the prop_return array\.
97
Specifies the number of elements in the values list\.
102
Specifies the offset in the specified property (in 32\-bit quantities) where the data is to be retrieved\.
107
Specifies whether to retrieve the pending state of the property or the current state\.
112
Specifies the property to modify or query\.
117
Returns the data in the specified format\. 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 an array of short int type and should be cast to that type to obtain the elements\. If the returned format is 32, the property data will be stored as an array of longs (which in a 64\-bit application will be 64\-bit values that are padded in the upper 4 bytes)\.
122
Specifies the atom identifier associated with the property type or
123
\fBAnyPropertyType\fR\.
22
XGetDeviceProperty, XChangeDeviceProperty, XDeleteDeviceProperty \- Get, change or delete a device\'s property\&.
26
#include <X11/extensions/XInput\&.h>
30
int XGetDeviceProperty( Display *display,
38
Atom *actual_type_return,
39
int *actual_format_return,
40
unsigned long *nitems_return,
41
unsigned long *bytes_after_return,
42
unsigned char **prop_return)
46
void XChangeDeviceProperty( Display *display,
57
void XDeleteDeviceProperty( Display *display,
64
Returns an atom identifier that defines the actual type
70
Returns the actual format of the property\&.
75
Returns the number of bytes remaining to be read in the
76
property if a partial read was performed\&.
81
Specifies the property data\&.
86
Specifies a Boolean value that determines whether the
87
property is deleted\&.
92
Specifies the connection to the X server\&.
102
Specifies whether the data should be viewed as a list of
103
8\-bit, 16\-bit, or 32\-bit quantities\&. Possible values are
104
8, 16, and 32\&. This information allows the X server to
105
correctly perform byte\-swap operations as necessary\&. If
106
the format is 16\-bit or 32\-bit, you must explicitly cast
107
the data pointer to an (unsigned char*) in the call to
108
XChangeDeviceProperty\&.
113
Specifies the length in 32\-bit multiplies of the data to
119
Specifies the mode of operation\&. You can pass
120
PropModeReplace, PropModePrepend, or PropModeAppend\&.
125
Specifies the number of elements in data\&.
130
Returns the actual number of 8\-bit, 16\-bit, or 32\-bit
131
items stored in the prop_return array\&.
136
Specifies the number of elements in the values list\&.
141
Specifies the offset in the specified property (in
142
32\-bit quantities) where the data is to be retrieved\&.
147
Specifies whether to retrieve the pending state of the
148
property or the current state\&.
153
Specifies the property to modify or query\&.
158
Returns the data in the specified format\&. If the
159
returned format is 8, the returned data is represented
160
as a char array\&. If the returned format is 16, the
161
returned data is represented as an array of short int
162
type and should be cast to that type to obtain the
163
elements\&. If the returned format is 32, the property
164
data will be stored as an array of longs (which in a
165
64\-bit application will be 64\-bit values that are padded
166
in the upper 4 bytes)\&.
171
Specifies the atom identifier associated with the
172
property type or AnyPropertyType\&.
125
174
.SH "DESCRIPTION"
128
\fBXGetDeviceProperty\fR
129
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\. For a detailed description of this function, see the man page to
130
\fBXGetWindowProperty\fR\.
133
\fBXChangeDeviceProperty\fR
134
function alters the property for the specified device and causes the server to generate a
135
\fBXPropertyNotifyEvent\fR
136
event on that device\. For a detailed description of this function, see the man page to
137
\fBXChangeProperty\fR\.
140
\fBXDeleteDeviceProperty\fR
141
function deletes the specified device property\. Note that a client cannot delete a property created by a driver or the server\. Attempting to do so will result in a
146
\fBXGetDeviceProperty\fR
153
\fBXChangeDeviceProperty\fR
162
\fBXDeleteDeviceProperty\fR
176
The XGetDeviceProperty 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\&. For a detailed description of this function, see the man page to XGetWindowProperty\&.
178
The XChangeDeviceProperty function alters the property for the specified device and causes the server to generate a XPropertyNotifyEvent event on that device\&. For a detailed description of this function, see the man page to XChangeProperty\&.
180
The XDeleteDeviceProperty function deletes the specified device property\&. Note that a client cannot delete a property created by a driver or the server\&. Attempting to do so will result in a BadAtom error\&.
182
XGetDeviceProperty can generate a BadAtom, BadDevice error\&.
184
XChangeDeviceProperty can generate a BadDevice, a BadMatch, a BadAtom, and a BadValue error\&.
186
XDeleteDeviceProperty can generate a BadDevice, and a BadAtom error\&.
194
A value does not describe a valid named identifier or
195
the client attempted to remove a driver\-allocated
172
A value does not describe a valid named identifier or the client attempted to remove a driver\-allocated property\.
177
An invalid device was specified\. The device does not exist\.
207
An invalid device was specified\&. The device does not
182
\fBXListDeviceProperties\fR,
183
\fBXQueryDeviceProperty\fR,
184
\fBXConfigureDeviceProperty\fR\.
190
Specification and implementation\.
219
XListDeviceProperties(libmansuffix)