VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.0/xorg/gc.h@ 17236

Last change on this file since 17236 was 17236, checked in by vboxsync, 16 years ago

Additions/x11/x11include: blast! Reverted r43555 and r43556

  • Property svn:eol-style set to native
File size: 5.0 KB
Line 
1/* $XFree86: xc/programs/Xserver/include/gc.h,v 1.5 2001/12/14 19:59:54 dawes Exp $ */
2/***********************************************************
3
4Copyright 1987, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26
27Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
28
29 All Rights Reserved
30
31Permission to use, copy, modify, and distribute this software and its
32documentation for any purpose and without fee is hereby granted,
33provided that the above copyright notice appear in all copies and that
34both that copyright notice and this permission notice appear in
35supporting documentation, and that the name of Digital not be
36used in advertising or publicity pertaining to distribution of the
37software without specific, written prior permission.
38
39DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45SOFTWARE.
46
47******************************************************************/
48/* $Xorg: gc.h,v 1.4 2001/02/09 02:05:15 xorgcvs Exp $ */
49
50#ifndef GC_H
51#define GC_H
52
53#include <X11/X.h> /* for GContext, Mask */
54#include <X11/Xdefs.h> /* for Bool */
55#include <X11/Xproto.h>
56#include "screenint.h" /* for ScreenPtr */
57#include "pixmap.h" /* for DrawablePtr */
58
59/* clientClipType field in GC */
60#define CT_NONE 0
61#define CT_PIXMAP 1
62#define CT_REGION 2
63#define CT_UNSORTED 6
64#define CT_YSORTED 10
65#define CT_YXSORTED 14
66#define CT_YXBANDED 18
67
68#define GCQREASON_VALIDATE 1
69#define GCQREASON_CHANGE 2
70#define GCQREASON_COPY_SRC 3
71#define GCQREASON_COPY_DST 4
72#define GCQREASON_DESTROY 5
73
74#define GC_CHANGE_SERIAL_BIT (((unsigned long)1)<<31)
75#define GC_CALL_VALIDATE_BIT (1L<<30)
76#define GCExtensionInterest (1L<<29)
77
78#define DRAWABLE_SERIAL_BITS (~(GC_CHANGE_SERIAL_BIT))
79
80#define MAX_SERIAL_NUM (1L<<28)
81
82#define NEXT_SERIAL_NUMBER ((++globalSerialNumber) > MAX_SERIAL_NUM ? \
83 (globalSerialNumber = 1): globalSerialNumber)
84
85typedef struct _GCInterest *GCInterestPtr;
86typedef struct _GC *GCPtr;
87typedef struct _GCOps *GCOpsPtr;
88
89extern void ValidateGC(
90 DrawablePtr /*pDraw*/,
91 GCPtr /*pGC*/);
92
93extern int ChangeGC(
94 GCPtr/*pGC*/,
95 BITS32 /*mask*/,
96 XID* /*pval*/);
97
98extern int DoChangeGC(
99 GCPtr/*pGC*/,
100 BITS32 /*mask*/,
101 XID* /*pval*/,
102 int /*fPointer*/);
103
104typedef union {
105 CARD32 val;
106 pointer ptr;
107} ChangeGCVal, *ChangeGCValPtr;
108
109extern int dixChangeGC(
110 ClientPtr /*client*/,
111 GCPtr /*pGC*/,
112 BITS32 /*mask*/,
113 CARD32 * /*pval*/,
114 ChangeGCValPtr /*pCGCV*/);
115
116extern GCPtr CreateGC(
117 DrawablePtr /*pDrawable*/,
118 BITS32 /*mask*/,
119 XID* /*pval*/,
120 int* /*pStatus*/);
121
122extern int CopyGC(
123 GCPtr/*pgcSrc*/,
124 GCPtr/*pgcDst*/,
125 BITS32 /*mask*/);
126
127extern int FreeGC(
128 pointer /*pGC*/,
129 XID /*gid*/);
130
131extern void SetGCMask(
132 GCPtr /*pGC*/,
133 Mask /*selectMask*/,
134 Mask /*newDataMask*/);
135
136extern GCPtr CreateScratchGC(
137 ScreenPtr /*pScreen*/,
138 unsigned /*depth*/);
139
140extern void FreeGCperDepth(
141 int /*screenNum*/);
142
143extern Bool CreateGCperDepth(
144 int /*screenNum*/);
145
146extern Bool CreateDefaultStipple(
147 int /*screenNum*/);
148
149extern void FreeDefaultStipple(
150 int /*screenNum*/);
151
152extern int SetDashes(
153 GCPtr /*pGC*/,
154 unsigned /*offset*/,
155 unsigned /*ndash*/,
156 unsigned char* /*pdash*/);
157
158extern int VerifyRectOrder(
159 int /*nrects*/,
160 xRectangle* /*prects*/,
161 int /*ordering*/);
162
163extern int SetClipRects(
164 GCPtr /*pGC*/,
165 int /*xOrigin*/,
166 int /*yOrigin*/,
167 int /*nrects*/,
168 xRectangle* /*prects*/,
169 int /*ordering*/);
170
171extern GCPtr GetScratchGC(
172 unsigned /*depth*/,
173 ScreenPtr /*pScreen*/);
174
175extern void FreeScratchGC(
176 GCPtr /*pGC*/);
177
178#endif /* GC_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