VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.6.5/mispritest.h

Last change on this file was 49174, checked in by vboxsync, 11 years ago

Additions/x11: replace header files for X.Org Server 1.6.0 with those for version 1.6.5 due to an ABI bump in-between.

  • Property svn:eol-style set to native
File size: 3.7 KB
Line 
1/*
2 * mispritest.h
3 *
4 * mi sprite structures
5 */
6
7
8/*
9
10Copyright 1989, 1998 The Open Group
11
12Permission to use, copy, modify, distribute, and sell this software and its
13documentation for any purpose is hereby granted without fee, provided that
14the above copyright notice appear in all copies and that both that
15copyright notice and this permission notice appear in supporting
16documentation.
17
18The above copyright notice and this permission notice shall be included in
19all copies or substantial portions of the Software.
20
21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
28Except as contained in this notice, the name of The Open Group shall not be
29used in advertising or otherwise to promote the sale, use or other dealings
30in this Software without prior written authorization from The Open Group.
31*/
32
33#ifdef HAVE_DIX_CONFIG_H
34#include <dix-config.h>
35#endif
36
37#ifndef _MISPRITEST_H_
38#define _MISPRITEST_H_
39
40# include "misprite.h"
41#ifdef RENDER
42# include "picturestr.h"
43#endif
44# include "damage.h"
45
46typedef struct {
47 CursorPtr pCursor;
48 int x; /* cursor hotspot */
49 int y;
50 BoxRec saved; /* saved area from the screen */
51 Bool isUp; /* cursor in frame buffer */
52 Bool shouldBeUp; /* cursor should be displayed */
53 WindowPtr pCacheWin; /* window the cursor last seen in */
54 Bool isInCacheWin;
55 Bool checkPixels; /* check colormap collision */
56 ScreenPtr pScreen;
57} miCursorInfoRec, *miCursorInfoPtr;
58
59/*
60 * per screen information
61 */
62
63typedef struct {
64 /* screen procedures */
65 CloseScreenProcPtr CloseScreen;
66 GetImageProcPtr GetImage;
67 GetSpansProcPtr GetSpans;
68 SourceValidateProcPtr SourceValidate;
69
70 /* window procedures */
71 CopyWindowProcPtr CopyWindow;
72
73 /* colormap procedures */
74 InstallColormapProcPtr InstallColormap;
75 StoreColorsProcPtr StoreColors;
76
77 /* os layer procedures */
78 ScreenBlockHandlerProcPtr BlockHandler;
79
80 /* device cursor procedures */
81 DeviceCursorInitializeProcPtr DeviceCursorInitialize;
82 DeviceCursorCleanupProcPtr DeviceCursorCleanup;
83
84 xColorItem colors[2];
85 ColormapPtr pInstalledMap;
86 ColormapPtr pColormap;
87 VisualPtr pVisual;
88 miSpriteCursorFuncPtr funcs;
89 DamagePtr pDamage; /* damage tracking structure */
90} miSpriteScreenRec, *miSpriteScreenPtr;
91
92#define SOURCE_COLOR 0
93#define MASK_COLOR 1
94
95/*
96 * Overlap BoxPtr and Box elements
97 */
98#define BOX_OVERLAP(pCbox,X1,Y1,X2,Y2) \
99 (((pCbox)->x1 <= (X2)) && ((X1) <= (pCbox)->x2) && \
100 ((pCbox)->y1 <= (Y2)) && ((Y1) <= (pCbox)->y2))
101
102/*
103 * Overlap BoxPtr, origins, and rectangle
104 */
105#define ORG_OVERLAP(pCbox,xorg,yorg,x,y,w,h) \
106 BOX_OVERLAP((pCbox),(x)+(xorg),(y)+(yorg),(x)+(xorg)+(w),(y)+(yorg)+(h))
107
108/*
109 * Overlap BoxPtr, origins and RectPtr
110 */
111#define ORGRECT_OVERLAP(pCbox,xorg,yorg,pRect) \
112 ORG_OVERLAP((pCbox),(xorg),(yorg),(pRect)->x,(pRect)->y, \
113 (int)((pRect)->width), (int)((pRect)->height))
114/*
115 * Overlap BoxPtr and horizontal span
116 */
117#define SPN_OVERLAP(pCbox,y,x,w) BOX_OVERLAP((pCbox),(x),(y),(x)+(w),(y))
118
119#define LINE_SORT(x1,y1,x2,y2) \
120{ int _t; \
121 if (x1 > x2) { _t = x1; x1 = x2; x2 = _t; } \
122 if (y1 > y2) { _t = y1; y1 = y2; y2 = _t; } }
123
124#define LINE_OVERLAP(pCbox,x1,y1,x2,y2,lw2) \
125 BOX_OVERLAP((pCbox), (x1)-(lw2), (y1)-(lw2), (x2)+(lw2), (y2)+(lw2))
126
127#endif /* _MISPRITEST_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette