1 .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
3 .\" Permission is hereby granted, free of charge, to any person obtaining
4 .\" a copy of this software and associated documentation files (the
5 .\" "Software"), to deal in the Software without restriction, including
6 .\" without limitation the rights to use, copy, modify, merge, publish,
7 .\" distribute, sublicense, and/or sell copies of the Software, and to
8 .\" permit persons to whom the Software is furnished to do so, subject to
9 .\" the following conditions:
11 .\" The above copyright notice and this permission notice shall be included
12 .\" in all copies or substantial portions of the Software.
14 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 .\" OTHER DEALINGS IN THE SOFTWARE.
22 .\" Except as contained in this notice, the name of the X Consortium shall
23 .\" not be used in advertising or otherwise to promote the sale, use or
24 .\" other dealings in this Software without prior written authorization
25 .\" from the X Consortium.
27 .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
28 .\" Digital Equipment Corporation
30 .\" Portions Copyright \(co 1990, 1991 by
33 .\" Permission to use, copy, modify and distribute this documentation for
34 .\" any purpose and without fee is hereby granted, provided that the above
35 .\" copyright notice appears in all copies and that both that copyright notice
36 .\" and this permission notice appear in all copies, and that the names of
37 .\" Digital and Tektronix not be used in in advertising or publicity pertaining
38 .\" to this documentation without specific, written prior permission.
39 .\" Digital and Tektronix makes no representations about the suitability
40 .\" of this documentation for any purpose.
41 .\" It is provided ``as is'' without express or implied warranty.
44 .ds xT X Toolkit Intrinsics \- C Language Interface
45 .ds xW Athena X Widgets \- C Language X Toolkit Interface
46 .ds xL Xlib \- C Language X Interface
47 .ds xC Inter-Client Communication Conventions Manual
54 .\".if \\n(VS>=40 .vs \\n(VSu
55 .\".if \\n(VS<=39 .vs \\n(VSp
66 .de IN \" send an index entry to the stderr
69 .ie t \\$1\fB\^\\$2\^\fR\\$3
70 .el \\$1\fI\^\\$2\^\fP\\$3
73 .ie t \fB\^\\$1\^\fR\\$2
74 .el \fI\^\\$1\^\fP\\$2
77 .ie t <\fB\\$1\fR>\\$2
81 .TH XCreateFontCursor __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
83 XCreateFontCursor, XCreatePixmapCursor, XCreateGlyphCursor \- create cursors
85 \&#include <X11/cursorfont.h>
87 Cursor XCreateFontCursor\^(\^Display *\fIdisplay\fP\^, unsigned int
90 Cursor XCreatePixmapCursor\^(\^Display *\fIdisplay\fP\^, Pixmap
91 \fIsource\fP\^, Pixmap \fImask\fP\^, XColor *\fIforeground_color\fP\^, XColor
92 *\fIbackground_color\fP\^, unsigned int \fIx\fP\^, unsigned int \fIy\fP\^);
94 Cursor XCreateGlyphCursor\^(\^Display *\fIdisplay\fP\^, Font
95 \fIsource_font\fP\^, Font \fImask_font\fP\^, unsigned int \fIsource_char\fP\^,
96 unsigned int \fImask_char\fP\^, XColor *\fIforeground_color\fP\^, XColor
97 *\fIbackground_color\fP\^);
99 .IP \fIbackground_color\fP 1i
100 Specifies the RGB values for the background of the source.
102 Specifies the connection to the X server.
103 .IP \fIforeground_color\fP 1i
104 Specifies the RGB values for the foreground of the source.
106 Specifies the cursor's source bits to be displayed or
108 .IP \fImask_char\fP 1i
109 Specifies the glyph character for the mask.
110 .IP \fImask_font\fP 1i
111 Specifies the font for the mask glyph or
114 Specifies the shape of the cursor.
116 Specifies the shape of the source cursor.
117 .\" *** JIM: NEED TO CHECK THIS. ***
118 .IP \fIsource_char\fP 1i
119 Specifies the character glyph for the source.
120 .IP \fIsource_font\fP 1i
121 Specifies the font for the source glyph.
122 .ds Xy , which indicate the hotspot relative to the source's origin
127 Specify the x and y coordinates\*(Xy.
129 X provides a set of standard cursor shapes in a special font named
131 Applications are encouraged to use this interface for their cursors
132 because the font can be customized for the individual display type.
133 The shape argument specifies which glyph of the standard fonts
136 The hotspot comes from the information stored in the cursor font.
137 The initial colors of a cursor are a black foreground and a white
139 .ZN XRecolorCursor ).
141 .ZN XCreateFontCursor
149 .ZN XCreatePixmapCursor
150 function creates a cursor and returns the cursor ID associated with it.
151 The foreground and background RGB values must be specified using
152 foreground_color and background_color,
153 even if the X server only has a
158 The foreground color is used for the pixels set to 1 in the
159 source, and the background color is used for the pixels set to 0.
160 Both source and mask, if specified, must have depth one (or a
162 error results) but can have any root.
163 The mask argument defines the shape of the cursor.
164 The pixels set to 1 in the mask define which source pixels are displayed,
165 and the pixels set to 0 define which pixels are ignored.
167 all pixels of the source are displayed.
168 The mask, if present, must be the same size as the pixmap defined by the
169 source argument, or a
172 The hotspot must be a point within the source,
177 The components of the cursor can be transformed arbitrarily to meet
179 The pixmaps can be freed immediately if no further explicit references
180 to them are to be made.
181 Subsequent drawing in the source or mask pixmap has an undefined effect on the
183 The X server might or might not make a copy of the pixmap.
185 .ZN XCreatePixmapCursor
193 .ZN XCreateGlyphCursor
194 function is similar to
195 .ZN XCreatePixmapCursor
196 except that the source and mask bitmaps are obtained from the specified
198 The source_char must be a defined glyph in source_font,
202 If mask_font is given,
203 mask_char must be a defined glyph in mask_font,
207 The mask_font and character are optional.
208 The origins of the source_char and mask_char (if defined) glyphs are
209 positioned coincidently and define the hotspot.
210 The source_char and mask_char need not have the same bounding box metrics,
211 and there is no restriction on the placement of the hotspot relative to the bounding
213 If no mask_char is given, all pixels of the source are displayed.
214 You can free the fonts immediately by calling
216 if no further explicit references to them are to be made.
218 For 2-byte matrix fonts,
219 the 16-bit value should be formed with the byte1
220 member in the most significant byte and the byte2 member in the
221 least significant byte.
223 .ZN XCreateGlyphCursor
233 The server failed to allocate the requested resource or server memory.
236 A value for a Font or GContext argument does not name a defined Font.
239 Some argument or pair of arguments has the correct type and range but fails
240 to match in some other way required by the request.
243 A value for a Pixmap argument does not name a defined Pixmap.
246 Some numeric value falls outside the range of values accepted by the request.
247 Unless a specific range is specified for an argument, the full range defined
248 by the argument's type is accepted. Any argument defined as a set of
249 alternatives can generate this error.
251 XDefineCursor(__libmansuffix__),
252 XLoadFont(__libmansuffix__),
253 XRecolorCursor(__libmansuffix__)