~ubuntu-branches/ubuntu/natty/libxi/natty-201011191114

« back to all changes in this revision

Viewing changes to man/XGetDeviceProperty.man

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-11-21 18:39:28 UTC
  • mfrom: (1.1.10 upstream) (0.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20091121183928-ek2jwqx3rmhv3zjz
Tags: 2:1.3-1
* Bump Standards-Version to 3.8.3.
* Add build-deps on xmlto and asciidoc to build the manpages.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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__
 
1
'\" t
 
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/>
 
5
.\"      Date: 10/02/2009
 
6
.\"    Manual: [FIXME: manual]
 
7
.\"    Source: [FIXME: source]
 
8
.\"  Language: English
7
9
.\"
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
10
15
.nh
11
16
.\" disable justification (adjust text to left margin only)
12
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
13
21
.SH "NAME"
14
 
XGetDeviceProperty, XChangeDeviceProperty, XDeleteDeviceProperty - Get, change or delete a device's property.
15
 
.SH "SYNTAX"
16
 
.sp
17
 
.ft B
18
 
.nf
19
 
#include <X11/extensions/XInput\.h>
20
 
.fi
21
 
.ft
22
 
.HP 23
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" ");"
24
 
.HP 27
25
 
.BI "void XChangeDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ", Atom\ " "type" ", int\ " "format" ", int\ " "mode" ", const\ char\ *" "data" ", int\ " "nelements" ");"
26
 
.HP 27
27
 
.BI "void XDeleteDeviceProperty(Display\ *" "display" ", XDevice\ *" "device" ", Atom\ " "property" ");"
28
 
.SH "ARGUMENTS"
29
 
.PP
30
 
.PP
31
 
\fIactual_type_return\fR
32
 
.RS 4
33
 
Returns an atom identifier that defines the actual type of the property\.
34
 
.RE
35
 
.PP
36
 
\fIactual_format_return\fR
37
 
.RS 4
38
 
Returns the actual format of the property\.
39
 
.RE
40
 
.PP
41
 
\fIbytes_after_return\fR
42
 
.RS 4
43
 
Returns the number of bytes remaining to be read in the property if a partial read was performed\.
44
 
.RE
45
 
.PP
46
 
\fIdata\fR
47
 
.RS 4
48
 
Specifies the property data\.
49
 
.RE
50
 
.PP
51
 
\fIdelete\fR
52
 
.RS 4
53
 
Specifies a Boolean value that determines wether the property is deleted\.
54
 
.RE
55
 
.PP
56
 
\fIdisplay\fR
57
 
.RS 4
58
 
Specifies the connection to the X server\.
59
 
.RE
60
 
.PP
61
 
\fIdevice\fR
62
 
.RS 4
63
 
The device to grab\.
64
 
.RE
65
 
.PP
66
 
\fIformat\fR
67
 
.RS 4
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\.
70
 
.RE
71
 
.PP
72
 
\fIlength\fR
73
 
.RS 4
74
 
Specifies the length in 32\-bit multiplies of the data to be retrieved\.
75
 
.RE
76
 
.PP
77
 
\fImode\fR
78
 
.RS 4
79
 
Specifies the mode of operation\. You can pass
80
 
\fBPropModeReplace\fR,
81
 
\fBPropModePrepend\fR, or
82
 
\fBPropModeAppend\fR\.
83
 
.RE
84
 
.PP
85
 
\fInelements\fR
86
 
.RS 4
87
 
Specifies the number of elements in data\.
88
 
.RE
89
 
.PP
90
 
\fInitems_return\fR
91
 
.RS 4
92
 
Returns the actual number of 8\-bit, 16\-bit, or 32\-bit items stored in the prop_return array\.
93
 
.RE
94
 
.PP
95
 
\fInum_values\fR
96
 
.RS 4
97
 
Specifies the number of elements in the values list\.
98
 
.RE
99
 
.PP
100
 
\fIoffset\fR
101
 
.RS 4
102
 
Specifies the offset in the specified property (in 32\-bit quantities) where the data is to be retrieved\.
103
 
.RE
104
 
.PP
105
 
\fIpending\fR
106
 
.RS 4
107
 
Specifies whether to retrieve the pending state of the property or the current state\.
108
 
.RE
109
 
.PP
110
 
\fIproperty\fR
111
 
.RS 4
112
 
Specifies the property to modify or query\.
113
 
.RE
114
 
.PP
115
 
\fIprop_return\fR
116
 
.RS 4
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)\.
118
 
.RE
119
 
.PP
120
 
\fIreq_type\fR
121
 
.RS 4
122
 
Specifies the atom identifier associated with the property type or
123
 
\fBAnyPropertyType\fR\.
124
 
.RE
 
22
XGetDeviceProperty, XChangeDeviceProperty, XDeleteDeviceProperty \- Get, change or delete a device\'s property\&.
 
23
.SH "SYNOPSIS"
 
24
.sp
 
25
.nf
 
26
#include <X11/extensions/XInput\&.h>
 
27
.fi
 
28
.sp
 
29
.nf
 
30
int XGetDeviceProperty( Display *display,
 
31
                        XDevice *device,
 
32
                        Atom property,
 
33
                        long offset,
 
34
                        long length,
 
35
                        Bool delete,
 
36
                        Bool pending,
 
37
                        Atom req_type,
 
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)
 
43
.fi
 
44
.sp
 
45
.nf
 
46
void XChangeDeviceProperty( Display *display,
 
47
                            XDevice *device,
 
48
                            Atom property,
 
49
                            Atom type,
 
50
                            int format,
 
51
                            int mode,
 
52
                            const char *data,
 
53
                            int nelements)
 
54
.fi
 
55
.sp
 
56
.nf
 
57
void XDeleteDeviceProperty( Display *display,
 
58
                            XDevice *device,
 
59
                            Atom property)
 
60
.fi
 
61
.sp
 
62
.nf
 
63
actual_type_return
 
64
       Returns an atom identifier that defines the actual type
 
65
       of the property\&.
 
66
.fi
 
67
.sp
 
68
.nf
 
69
actual_format_return
 
70
       Returns the actual format of the property\&.
 
71
.fi
 
72
.sp
 
73
.nf
 
74
bytes_after_return
 
75
       Returns the number of bytes remaining to be read in the
 
76
       property if a partial read was performed\&.
 
77
.fi
 
78
.sp
 
79
.nf
 
80
data
 
81
       Specifies the property data\&.
 
82
.fi
 
83
.sp
 
84
.nf
 
85
delete
 
86
       Specifies a Boolean value that determines whether the
 
87
       property is deleted\&.
 
88
.fi
 
89
.sp
 
90
.nf
 
91
display
 
92
       Specifies the connection to the X server\&.
 
93
.fi
 
94
.sp
 
95
.nf
 
96
device
 
97
       The device to grab\&.
 
98
.fi
 
99
.sp
 
100
.nf
 
101
format
 
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\&.
 
109
.fi
 
110
.sp
 
111
.nf
 
112
length
 
113
       Specifies the length in 32\-bit multiplies of the data to
 
114
       be retrieved\&.
 
115
.fi
 
116
.sp
 
117
.nf
 
118
mode
 
119
       Specifies the mode of operation\&. You can pass
 
120
       PropModeReplace, PropModePrepend, or PropModeAppend\&.
 
121
.fi
 
122
.sp
 
123
.nf
 
124
nelements
 
125
       Specifies the number of elements in data\&.
 
126
.fi
 
127
.sp
 
128
.nf
 
129
nitems_return
 
130
       Returns the actual number of 8\-bit, 16\-bit, or 32\-bit
 
131
       items stored in the prop_return array\&.
 
132
.fi
 
133
.sp
 
134
.nf
 
135
num_values
 
136
       Specifies the number of elements in the values list\&.
 
137
.fi
 
138
.sp
 
139
.nf
 
140
offset
 
141
       Specifies the offset in the specified property (in
 
142
       32\-bit quantities) where the data is to be retrieved\&.
 
143
.fi
 
144
.sp
 
145
.nf
 
146
pending
 
147
       Specifies whether to retrieve the pending state of the
 
148
       property or the current state\&.
 
149
.fi
 
150
.sp
 
151
.nf
 
152
property
 
153
       Specifies the property to modify or query\&.
 
154
.fi
 
155
.sp
 
156
.nf
 
157
prop_return
 
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)\&.
 
167
.fi
 
168
.sp
 
169
.nf
 
170
req_type
 
171
       Specifies the atom identifier associated with the
 
172
       property type or AnyPropertyType\&.
 
173
.fi
125
174
.SH "DESCRIPTION"
126
 
.PP
127
 
The
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\.
131
 
.PP
132
 
The
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\.
138
 
.PP
139
 
The
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
142
 
BadAtom
143
 
error\.
144
 
.PP
145
 
 
146
 
\fBXGetDeviceProperty\fR
147
 
can generate a
148
 
BadAtom,
149
 
BadDevice
150
 
error\.
151
 
.PP
152
 
 
153
 
\fBXChangeDeviceProperty\fR
154
 
can generate a
155
 
BadDevice, a
156
 
BadMatch, a
157
 
BadAtom, and a
158
 
BadValue
159
 
error\.
160
 
.PP
161
 
 
162
 
\fBXDeleteDeviceProperty\fR
163
 
can generate a
164
 
BadDevice, and a
165
 
BadAtom
166
 
error\.
 
175
.sp
 
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\&.
 
177
.sp
 
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\&.
 
179
.sp
 
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\&.
 
181
.sp
 
182
XGetDeviceProperty can generate a BadAtom, BadDevice error\&.
 
183
.sp
 
184
XChangeDeviceProperty can generate a BadDevice, a BadMatch, a BadAtom, and a BadValue error\&.
 
185
.sp
 
186
XDeleteDeviceProperty can generate a BadDevice, and a BadAtom error\&.
167
187
.SH "DIAGNOSIS"
168
 
.PP
169
 
.PP
 
188
.sp
 
189
.if n \{\
 
190
.RS 4
 
191
.\}
 
192
.nf
170
193
BadAtom
 
194
       A value does not describe a valid named identifier or
 
195
       the client attempted to remove a driver\-allocated
 
196
       property\&.
 
197
.fi
 
198
.if n \{\
 
199
.RE
 
200
.\}
 
201
.sp
 
202
.if n \{\
171
203
.RS 4
172
 
A value does not describe a valid named identifier or the client attempted to remove a driver\-allocated property\.
173
 
.RE
174
 
.PP
 
204
.\}
 
205
.nf
175
206
BadDevice
176
 
.RS 4
177
 
An invalid device was specified\. The device does not exist\.
 
207
       An invalid device was specified\&. The device does not
 
208
       exist\&.
 
209
.fi
 
210
.if n \{\
178
211
.RE
 
212
.\}
179
213
.SH "SEE ALSO"
180
 
.PP
181
 
 
182
 
\fBXListDeviceProperties\fR,
183
 
\fBXQueryDeviceProperty\fR,
184
 
\fBXConfigureDeviceProperty\fR\.
185
 
.SH "AUTHOR"
186
 
.PP
187
 
\fBPeter Hutterer\fR
188
 
.sp -1n
189
 
.IP "" 4
190
 
Specification and implementation\.
191
 
 
 
214
.sp
 
215
.if n \{\
 
216
.RS 4
 
217
.\}
 
218
.nf
 
219
XListDeviceProperties(libmansuffix)
 
220
.fi
 
221
.if n \{\
 
222
.RE
 
223
.\}