1 | /* $XFree86: xc/programs/Xserver/include/cursor.h,v 1.6 2002/09/17 01:15:14 dawes Exp $ */
|
---|
2 | /***********************************************************
|
---|
3 |
|
---|
4 | Copyright 1987, 1998 The Open Group
|
---|
5 |
|
---|
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
|
---|
10 | documentation.
|
---|
11 |
|
---|
12 | The above copyright notice and this permission notice shall be included in
|
---|
13 | all copies or substantial portions of the Software.
|
---|
14 |
|
---|
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.
|
---|
21 |
|
---|
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.
|
---|
25 |
|
---|
26 |
|
---|
27 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
28 |
|
---|
29 | All Rights Reserved
|
---|
30 |
|
---|
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.
|
---|
38 |
|
---|
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
|
---|
45 | SOFTWARE.
|
---|
46 |
|
---|
47 | ******************************************************************/
|
---|
48 | /* $Xorg: cursor.h,v 1.4 2001/02/09 02:05:15 xorgcvs Exp $ */
|
---|
49 | #ifndef CURSOR_H
|
---|
50 | #define CURSOR_H
|
---|
51 |
|
---|
52 | #include "misc.h"
|
---|
53 | #include "screenint.h"
|
---|
54 | #include "window.h"
|
---|
55 |
|
---|
56 | #define NullCursor ((CursorPtr)NULL)
|
---|
57 |
|
---|
58 | /* Provide support for alpha composited cursors */
|
---|
59 | #ifdef RENDER
|
---|
60 | #define ARGB_CURSOR
|
---|
61 | #endif
|
---|
62 |
|
---|
63 | typedef struct _Cursor *CursorPtr;
|
---|
64 | typedef struct _CursorMetric *CursorMetricPtr;
|
---|
65 |
|
---|
66 | extern CursorPtr rootCursor;
|
---|
67 |
|
---|
68 | extern int FreeCursor(
|
---|
69 | #if NeedFunctionPrototypes
|
---|
70 | pointer /*pCurs*/,
|
---|
71 | XID /*cid*/
|
---|
72 | #endif
|
---|
73 | );
|
---|
74 |
|
---|
75 | /* Quartz support on Mac OS X pulls in the QuickDraw
|
---|
76 | framework whose AllocCursor function conflicts here. */
|
---|
77 | #ifdef __DARWIN__
|
---|
78 | #define AllocCursor Darwin_X_AllocCursor
|
---|
79 | #endif
|
---|
80 | extern CursorPtr AllocCursor(
|
---|
81 | #if NeedFunctionPrototypes
|
---|
82 | unsigned char* /*psrcbits*/,
|
---|
83 | unsigned char* /*pmaskbits*/,
|
---|
84 | CursorMetricPtr /*cm*/,
|
---|
85 | unsigned /*foreRed*/,
|
---|
86 | unsigned /*foreGreen*/,
|
---|
87 | unsigned /*foreBlue*/,
|
---|
88 | unsigned /*backRed*/,
|
---|
89 | unsigned /*backGreen*/,
|
---|
90 | unsigned /*backBlue*/
|
---|
91 | #endif
|
---|
92 | );
|
---|
93 |
|
---|
94 | extern CursorPtr AllocCursorARGB(
|
---|
95 | #if NeedFunctionPrototypes
|
---|
96 | unsigned char* /*psrcbits*/,
|
---|
97 | unsigned char* /*pmaskbits*/,
|
---|
98 | CARD32* /*argb*/,
|
---|
99 | CursorMetricPtr /*cm*/,
|
---|
100 | unsigned /*foreRed*/,
|
---|
101 | unsigned /*foreGreen*/,
|
---|
102 | unsigned /*foreBlue*/,
|
---|
103 | unsigned /*backRed*/,
|
---|
104 | unsigned /*backGreen*/,
|
---|
105 | unsigned /*backBlue*/
|
---|
106 | #endif
|
---|
107 | );
|
---|
108 |
|
---|
109 | extern int AllocGlyphCursor(
|
---|
110 | #if NeedFunctionPrototypes
|
---|
111 | Font /*source*/,
|
---|
112 | unsigned int /*sourceChar*/,
|
---|
113 | Font /*mask*/,
|
---|
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*/,
|
---|
122 | ClientPtr /*client*/
|
---|
123 | #endif
|
---|
124 | );
|
---|
125 |
|
---|
126 | extern CursorPtr CreateRootCursor(
|
---|
127 | #if NeedFunctionPrototypes
|
---|
128 | char* /*pfilename*/,
|
---|
129 | unsigned int /*glyph*/
|
---|
130 | #endif
|
---|
131 | );
|
---|
132 |
|
---|
133 | extern int ServerBitsFromGlyph(
|
---|
134 | #if NeedFunctionPrototypes
|
---|
135 | FontPtr /*pfont*/,
|
---|
136 | unsigned int /*ch*/,
|
---|
137 | register CursorMetricPtr /*cm*/,
|
---|
138 | unsigned char ** /*ppbits*/
|
---|
139 | #endif
|
---|
140 | );
|
---|
141 |
|
---|
142 | extern Bool CursorMetricsFromGlyph(
|
---|
143 | #if NeedFunctionPrototypes
|
---|
144 | FontPtr /*pfont*/,
|
---|
145 | unsigned /*ch*/,
|
---|
146 | CursorMetricPtr /*cm*/
|
---|
147 | #endif
|
---|
148 | );
|
---|
149 |
|
---|
150 | extern void CheckCursorConfinement(
|
---|
151 | #if NeedFunctionPrototypes
|
---|
152 | WindowPtr /*pWin*/
|
---|
153 | #endif
|
---|
154 | );
|
---|
155 |
|
---|
156 | extern void NewCurrentScreen(
|
---|
157 | #if NeedFunctionPrototypes
|
---|
158 | ScreenPtr /*newScreen*/,
|
---|
159 | int /*x*/,
|
---|
160 | int /*y*/
|
---|
161 | #endif
|
---|
162 | );
|
---|
163 |
|
---|
164 | extern Bool PointerConfinedToScreen(
|
---|
165 | #if NeedFunctionPrototypes
|
---|
166 | void
|
---|
167 | #endif
|
---|
168 | );
|
---|
169 |
|
---|
170 | extern void GetSpritePosition(
|
---|
171 | #if NeedFunctionPrototypes
|
---|
172 | int * /*px*/,
|
---|
173 | int * /*py*/
|
---|
174 | #endif
|
---|
175 | );
|
---|
176 |
|
---|
177 | #ifdef PANORAMIX
|
---|
178 | extern int XineramaGetCursorScreen(
|
---|
179 | #if NeedFunctionPrototypes
|
---|
180 | void
|
---|
181 | #endif
|
---|
182 | );
|
---|
183 | #endif /* PANORAMIX */
|
---|
184 |
|
---|
185 | #endif /* CURSOR_H */
|
---|