1 | /* $XdotOrg: xserver/xorg/include/cursor.h,v 1.6 2005/08/24 11:18:30 daniels Exp $ */
|
---|
2 | /* $XFree86: xc/programs/Xserver/include/cursor.h,v 1.6 2002/09/17 01:15:14 dawes Exp $ */
|
---|
3 | /***********************************************************
|
---|
4 |
|
---|
5 | Copyright 1987, 1998 The Open Group
|
---|
6 |
|
---|
7 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
8 | documentation for any purpose is hereby granted without fee, provided that
|
---|
9 | the above copyright notice appear in all copies and that both that
|
---|
10 | copyright notice and this permission notice appear in supporting
|
---|
11 | documentation.
|
---|
12 |
|
---|
13 | The above copyright notice and this permission notice shall be included in
|
---|
14 | all copies or substantial portions of the Software.
|
---|
15 |
|
---|
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
19 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
22 |
|
---|
23 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
24 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
25 | in this Software without prior written authorization from The Open Group.
|
---|
26 |
|
---|
27 |
|
---|
28 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
29 |
|
---|
30 | All Rights Reserved
|
---|
31 |
|
---|
32 | Permission to use, copy, modify, and distribute this software and its
|
---|
33 | documentation for any purpose and without fee is hereby granted,
|
---|
34 | provided that the above copyright notice appear in all copies and that
|
---|
35 | both that copyright notice and this permission notice appear in
|
---|
36 | supporting documentation, and that the name of Digital not be
|
---|
37 | used in advertising or publicity pertaining to distribution of the
|
---|
38 | software without specific, written prior permission.
|
---|
39 |
|
---|
40 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
---|
41 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
---|
42 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
---|
43 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
---|
44 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
---|
45 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
46 | SOFTWARE.
|
---|
47 |
|
---|
48 | ******************************************************************/
|
---|
49 | /* $Xorg: cursor.h,v 1.4 2001/02/09 02:05:15 xorgcvs Exp $ */
|
---|
50 |
|
---|
51 | #ifndef CURSOR_H
|
---|
52 | #define CURSOR_H
|
---|
53 |
|
---|
54 | #include "misc.h"
|
---|
55 | #include "screenint.h"
|
---|
56 | #include "window.h"
|
---|
57 |
|
---|
58 | #define NullCursor ((CursorPtr)NULL)
|
---|
59 |
|
---|
60 | /* Provide support for alpha composited cursors */
|
---|
61 | #ifdef RENDER
|
---|
62 | #define ARGB_CURSOR
|
---|
63 | #endif
|
---|
64 |
|
---|
65 | typedef struct _Cursor *CursorPtr;
|
---|
66 | typedef struct _CursorMetric *CursorMetricPtr;
|
---|
67 |
|
---|
68 | extern CursorPtr rootCursor;
|
---|
69 |
|
---|
70 | extern int FreeCursor(
|
---|
71 | pointer /*pCurs*/,
|
---|
72 | XID /*cid*/);
|
---|
73 |
|
---|
74 | /* Quartz support on Mac OS X pulls in the QuickDraw
|
---|
75 | framework whose AllocCursor function conflicts here. */
|
---|
76 | #ifdef __DARWIN__
|
---|
77 | #define AllocCursor Darwin_X_AllocCursor
|
---|
78 | #endif
|
---|
79 | extern CursorPtr AllocCursor(
|
---|
80 | unsigned char* /*psrcbits*/,
|
---|
81 | unsigned char* /*pmaskbits*/,
|
---|
82 | CursorMetricPtr /*cm*/,
|
---|
83 | unsigned /*foreRed*/,
|
---|
84 | unsigned /*foreGreen*/,
|
---|
85 | unsigned /*foreBlue*/,
|
---|
86 | unsigned /*backRed*/,
|
---|
87 | unsigned /*backGreen*/,
|
---|
88 | unsigned /*backBlue*/);
|
---|
89 |
|
---|
90 | extern CursorPtr AllocCursorARGB(
|
---|
91 | unsigned char* /*psrcbits*/,
|
---|
92 | unsigned char* /*pmaskbits*/,
|
---|
93 | CARD32* /*argb*/,
|
---|
94 | CursorMetricPtr /*cm*/,
|
---|
95 | unsigned /*foreRed*/,
|
---|
96 | unsigned /*foreGreen*/,
|
---|
97 | unsigned /*foreBlue*/,
|
---|
98 | unsigned /*backRed*/,
|
---|
99 | unsigned /*backGreen*/,
|
---|
100 | unsigned /*backBlue*/);
|
---|
101 |
|
---|
102 | extern int AllocGlyphCursor(
|
---|
103 | Font /*source*/,
|
---|
104 | unsigned int /*sourceChar*/,
|
---|
105 | Font /*mask*/,
|
---|
106 | unsigned int /*maskChar*/,
|
---|
107 | unsigned /*foreRed*/,
|
---|
108 | unsigned /*foreGreen*/,
|
---|
109 | unsigned /*foreBlue*/,
|
---|
110 | unsigned /*backRed*/,
|
---|
111 | unsigned /*backGreen*/,
|
---|
112 | unsigned /*backBlue*/,
|
---|
113 | CursorPtr* /*ppCurs*/,
|
---|
114 | ClientPtr /*client*/);
|
---|
115 |
|
---|
116 | extern CursorPtr CreateRootCursor(
|
---|
117 | char* /*pfilename*/,
|
---|
118 | unsigned int /*glyph*/);
|
---|
119 |
|
---|
120 | extern int ServerBitsFromGlyph(
|
---|
121 | FontPtr /*pfont*/,
|
---|
122 | unsigned int /*ch*/,
|
---|
123 | register CursorMetricPtr /*cm*/,
|
---|
124 | unsigned char ** /*ppbits*/);
|
---|
125 |
|
---|
126 | extern Bool CursorMetricsFromGlyph(
|
---|
127 | FontPtr /*pfont*/,
|
---|
128 | unsigned /*ch*/,
|
---|
129 | CursorMetricPtr /*cm*/);
|
---|
130 |
|
---|
131 | extern void CheckCursorConfinement(
|
---|
132 | WindowPtr /*pWin*/);
|
---|
133 |
|
---|
134 | extern void NewCurrentScreen(
|
---|
135 | ScreenPtr /*newScreen*/,
|
---|
136 | int /*x*/,
|
---|
137 | int /*y*/);
|
---|
138 |
|
---|
139 | extern Bool PointerConfinedToScreen(void);
|
---|
140 |
|
---|
141 | extern void GetSpritePosition(
|
---|
142 | int * /*px*/,
|
---|
143 | int * /*py*/);
|
---|
144 |
|
---|
145 | #ifdef PANORAMIX
|
---|
146 | extern int XineramaGetCursorScreen(void);
|
---|
147 | #endif /* PANORAMIX */
|
---|
148 |
|
---|
149 | #endif /* CURSOR_H */
|
---|