1 /* $XFree86: xc/programs/Xserver/include/cursor.h,v 1.6 2002/09/17 01:15:14 dawes Exp $ */
2 /***********************************************************
4 Copyright 1987, 1998 The Open Group
6 Permission to use, copy, modify, distribute, and sell this software and its
7 documentation for any purpose is hereby granted without fee, provided that
8 the above copyright notice appear in all copies and that both that
9 copyright notice and this permission notice appear in supporting
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 Except as contained in this notice, the name of The Open Group shall not be
23 used in advertising or otherwise to promote the sale, use or other dealings
24 in this Software without prior written authorization from The Open Group.
27 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
31 Permission to use, copy, modify, and distribute this software and its
32 documentation for any purpose and without fee is hereby granted,
33 provided that the above copyright notice appear in all copies and that
34 both that copyright notice and this permission notice appear in
35 supporting documentation, and that the name of Digital not be
36 used in advertising or publicity pertaining to distribution of the
37 software without specific, written prior permission.
39 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
47 ******************************************************************/
48 /* $Xorg: cursor.h,v 1.4 2001/02/09 02:05:15 xorgcvs Exp $ */
53 #include "screenint.h"
56 #define NullCursor ((CursorPtr)NULL)
58 /* Provide support for alpha composited cursors */
63 typedef struct _Cursor *CursorPtr;
64 typedef struct _CursorMetric *CursorMetricPtr;
66 extern CursorPtr rootCursor;
68 extern int FreeCursor(
69 #if NeedFunctionPrototypes
75 /* Quartz support on Mac OS X pulls in the QuickDraw
76 framework whose AllocCursor function conflicts here. */
78 #define AllocCursor Darwin_X_AllocCursor
80 extern CursorPtr AllocCursor(
81 #if NeedFunctionPrototypes
82 unsigned char* /*psrcbits*/,
83 unsigned char* /*pmaskbits*/,
84 CursorMetricPtr /*cm*/,
86 unsigned /*foreGreen*/,
87 unsigned /*foreBlue*/,
89 unsigned /*backGreen*/,
94 extern CursorPtr AllocCursorARGB(
95 #if NeedFunctionPrototypes
96 unsigned char* /*psrcbits*/,
97 unsigned char* /*pmaskbits*/,
99 CursorMetricPtr /*cm*/,
100 unsigned /*foreRed*/,
101 unsigned /*foreGreen*/,
102 unsigned /*foreBlue*/,
103 unsigned /*backRed*/,
104 unsigned /*backGreen*/,
105 unsigned /*backBlue*/
109 extern int AllocGlyphCursor(
110 #if NeedFunctionPrototypes
112 unsigned int /*sourceChar*/,
114 unsigned int /*maskChar*/,
115 unsigned /*foreRed*/,
116 unsigned /*foreGreen*/,
117 unsigned /*foreBlue*/,
118 unsigned /*backRed*/,
119 unsigned /*backGreen*/,
120 unsigned /*backBlue*/,
121 CursorPtr* /*ppCurs*/,
126 extern CursorPtr CreateRootCursor(
127 #if NeedFunctionPrototypes
129 unsigned int /*glyph*/
133 extern int ServerBitsFromGlyph(
134 #if NeedFunctionPrototypes
137 register CursorMetricPtr /*cm*/,
138 unsigned char ** /*ppbits*/
142 extern Bool CursorMetricsFromGlyph(
143 #if NeedFunctionPrototypes
146 CursorMetricPtr /*cm*/
150 extern void CheckCursorConfinement(
151 #if NeedFunctionPrototypes
156 extern void NewCurrentScreen(
157 #if NeedFunctionPrototypes
158 ScreenPtr /*newScreen*/,
164 extern Bool PointerConfinedToScreen(
165 #if NeedFunctionPrototypes
170 extern void GetSpritePosition(
171 #if NeedFunctionPrototypes
178 extern int XineramaGetCursorScreen(
179 #if NeedFunctionPrototypes
183 #endif /* PANORAMIX */
185 #endif /* CURSOR_H */