Imported Upstream version 1.6.1
[platform/upstream/libXi.git] / man / XIDefineCursor.man
1 '\" t
2 .\"     Title: xidefinecursor
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\"      Date: 09/23/2011
6 .\"    Manual: [FIXME: manual]
7 .\"    Source: [FIXME: source]
8 .\"  Language: English
9 .\"
10 .TH "XIDEFINECURSOR" "libmansuffix" "09/23/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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 XIDefineCursor, XIUndefineCursor \- define device cursors\&.
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 #include <X11/extensions/XInput2\&.h>
36 .fi
37 .sp
38 .nf
39 int XIDefineCursor( Display *display,
40                     int deviceid,
41                     Window win,
42                     Cursor cursor);
43 .fi
44 .sp
45 .nf
46 int XIUndefineCursor( Display *display,
47                       int deviceid,
48                       Window win);
49 .fi
50 .sp
51 .nf
52 cursor
53        Specifies the cursor that is to be displayed or None\&.
54 .fi
55 .sp
56 .nf
57 deviceid
58        Specifies the device whose cursor is to change\&.
59 .fi
60 .sp
61 .nf
62 display
63        Specifies the connection to the X server\&.
64 .fi
65 .sp
66 .nf
67 win
68        Specifies the window\&.
69 .fi
70 .SH "DESCRIPTION"
71 .sp
72 .if n \{\
73 .RS 4
74 .\}
75 .nf
76 If a cursor is set, it will be used when the device\*(Aqs pointer
77 is in the window\&. If the cursor is None, it is equivalent to
78 XIUndefineCursor\&.
79 .fi
80 .if n \{\
81 .RE
82 .\}
83 .sp
84 .if n \{\
85 .RS 4
86 .\}
87 .nf
88 The deviceid must be a master pointer device or a BadDevice error is
89 returned\&.
90 .fi
91 .if n \{\
92 .RE
93 .\}
94 .sp
95 .if n \{\
96 .RS 4
97 .\}
98 .nf
99 XIDefineCursor can generate BadDevice, BadCursor and BadWindow\&.
100 .fi
101 .if n \{\
102 .RE
103 .\}
104 .sp
105 .if n \{\
106 .RS 4
107 .\}
108 .nf
109 The XIUndefineCursor function undoes the effect of a previous
110 XIDefineCursor for this window\&. When the pointer is in the
111 window, the window\*(Aqs default cursor will now be used\&. If no
112 default cursor is defined, the parent\*(Aqs cursor for this device
113 will be used (if defined) or the parent\*(Aqs default cursor will
114 be used\&.
115 .fi
116 .if n \{\
117 .RE
118 .\}
119 .sp
120 .if n \{\
121 .RS 4
122 .\}
123 .nf
124 XIDefineCursor and XIUndefineCursor are identical to
125 XDefineCursor and XUndefineCursor but specify the device
126 explicitly\&.
127 .fi
128 .if n \{\
129 .RE
130 .\}
131 .sp
132 .if n \{\
133 .RS 4
134 .\}
135 .nf
136 XIUndefineCursor can generate a BadDevice and a BadWindow
137 error\&.
138 .fi
139 .if n \{\
140 .RE
141 .\}
142 .SH "DIAGNOSTICS"
143 .sp
144 .if n \{\
145 .RS 4
146 .\}
147 .nf
148 BadCursor
149        A value for a cursor argument does not name a defined
150        cursor\&.
151 .fi
152 .if n \{\
153 .RE
154 .\}
155 .sp
156 .if n \{\
157 .RS 4
158 .\}
159 .nf
160 BadDevice
161        An invalid device was specified\&. The device does not
162        exist or is not a pointer device\&.
163 .fi
164 .if n \{\
165 .RE
166 .\}
167 .sp
168 .if n \{\
169 .RS 4
170 .\}
171 .nf
172 BadWindow
173        A value for a Window argument does not name a defined
174        window\&.
175 .fi
176 .if n \{\
177 .RE
178 .\}
179 .sp
180 See also
181 .sp
182 .if n \{\
183 .RS 4
184 .\}
185 .nf
186 XDefineCursor, XUndefineCursor
187 .fi
188 .if n \{\
189 .RE
190 .\}