1
/* $XFree86: xc/programs/Xserver/include/gc.h,v 1.5 2001/12/14 19:59:54 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: gc.h,v 1.4 2001/02/09 02:05:15 xorgcvs Exp $ */
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 */
59
/* clientClipType field in GC */
65
#define CT_YXSORTED 14
66
#define CT_YXBANDED 18
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
74
#define GC_CHANGE_SERIAL_BIT (((unsigned long)1)<<31)
75
#define GC_CALL_VALIDATE_BIT (1L<<30)
76
#define GCExtensionInterest (1L<<29)
78
#define DRAWABLE_SERIAL_BITS (~(GC_CHANGE_SERIAL_BIT))
80
#define MAX_SERIAL_NUM (1L<<28)
82
#define NEXT_SERIAL_NUMBER ((++globalSerialNumber) > MAX_SERIAL_NUM ? \
83
(globalSerialNumber = 1): globalSerialNumber)
85
typedef struct _GCInterest *GCInterestPtr;
86
typedef struct _GC *GCPtr;
87
typedef struct _GCOps *GCOpsPtr;
89
extern void ValidateGC(
90
DrawablePtr /*pDraw*/,
98
extern int DoChangeGC(
107
} ChangeGCVal, *ChangeGCValPtr;
109
extern int dixChangeGC(
110
ClientPtr /*client*/,
114
ChangeGCValPtr /*pCGCV*/);
116
extern GCPtr CreateGC(
117
DrawablePtr /*pDrawable*/,
131
extern void SetGCMask(
134
Mask /*newDataMask*/);
136
extern GCPtr CreateScratchGC(
137
ScreenPtr /*pScreen*/,
140
extern void FreeGCperDepth(
143
extern Bool CreateGCperDepth(
146
extern Bool CreateDefaultStipple(
149
extern void FreeDefaultStipple(
152
extern int SetDashes(
156
unsigned char* /*pdash*/);
158
extern int VerifyRectOrder(
160
xRectangle* /*prects*/,
163
extern int SetClipRects(
168
xRectangle* /*prects*/,
171
extern GCPtr GetScratchGC(
173
ScreenPtr /*pScreen*/);
175
extern void FreeScratchGC(