summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/cfb/cfb.h
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/cfb/cfb.h')
-rw-r--r--xc/programs/Xserver/cfb/cfb.h71
1 files changed, 44 insertions, 27 deletions
diff --git a/xc/programs/Xserver/cfb/cfb.h b/xc/programs/Xserver/cfb/cfb.h
index 255b1f129..ac1bf6593 100644
--- a/xc/programs/Xserver/cfb/cfb.h
+++ b/xc/programs/Xserver/cfb/cfb.h
@@ -27,11 +27,12 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
-/* $XFree86: xc/programs/Xserver/cfb/cfb.h,v 3.20 1999/12/13 02:13:06 robin Exp $ */
+/* $XFree86: xc/programs/Xserver/cfb/cfb.h,v 3.23 2000/02/12 03:39:19 dawes Exp $ */
#if !defined(__CFB_H__) || defined(CFB_PROTOTYPES_ONLY)
#include "X.h"
+#include "globals.h"
#include "pixmap.h"
#include "region.h"
#include "gc.h"
@@ -44,6 +45,10 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "cfbmap.h"
+#ifndef CfbBits
+#define CfbBits CARD32
+#endif
+
#ifndef CFB_PROTOTYPES_ONLY
#define __CFB_H__
/*
@@ -62,7 +67,7 @@ typedef struct {
unsigned char ropOpStip; /* rop for opaque stipple */
/* this value is ropFillArea in mfb, usurped for cfb */
unsigned char oneRect; /* drawable has one clip rect */
- unsigned long xor, and; /* reduced rop values */
+ CfbBits xor, and; /* reduced rop values */
} cfbPrivGC;
typedef cfbPrivGC *cfbPrivGCPtr;
@@ -75,7 +80,7 @@ typedef cfbPrivGC *cfbPrivGCPtr;
/* way to carry RROP info around */
typedef struct {
unsigned char rop;
- unsigned long xor, and;
+ CfbBits xor, and;
} cfbRRopRec, *cfbRRopPtr;
/* private field of window */
@@ -96,15 +101,15 @@ typedef struct {
extern int cfbSetStipple(
int /*alu*/,
- unsigned long /*fg*/,
- unsigned long /*planemask*/
+ CfbBits /*fg*/,
+ CfbBits /*planemask*/
);
extern int cfbSetOpaqueStipple(
int /*alu*/,
- unsigned long /*fg*/,
- unsigned long /*bg*/,
- unsigned long /*planemask*/
+ CfbBits /*fg*/,
+ CfbBits /*bg*/,
+ CfbBits /*planemask*/
);
extern int cfbComputeClipMasks32(
@@ -426,9 +431,9 @@ extern void cfbDoBitbltXor(
extern void cfbBresS(
int /*rop*/,
- unsigned long /*and*/,
- unsigned long /*xor*/,
- unsigned long * /*addrl*/,
+ CfbBits /*and*/,
+ CfbBits /*xor*/,
+ CfbBits * /*addrl*/,
int /*nlwidth*/,
int /*signdx*/,
int /*signdy*/,
@@ -449,7 +454,7 @@ extern void cfbBresD(
int /*numInDashList*/,
int * /*pdashOffset*/,
int /*isDoubleDash*/,
- unsigned long * /*addrl*/,
+ CfbBits * /*addrl*/,
int /*nlwidth*/,
int /*signdx*/,
int /*signdy*/,
@@ -665,11 +670,11 @@ extern void cfbPolyGlyphRop8(
);
/* cfbhrzvert.c */
-extern int cfbHorzS(
+extern void cfbHorzS(
int /*rop*/,
- unsigned long /*and*/,
- unsigned long /*xor*/,
- unsigned long * /*addrl*/,
+ CfbBits /*and*/,
+ CfbBits /*xor*/,
+ CfbBits * /*addrl*/,
int /*nlwidth*/,
int /*x1*/,
int /*y1*/,
@@ -678,9 +683,9 @@ extern int cfbHorzS(
extern void cfbVertS(
int /*rop*/,
- unsigned long /*and*/,
- unsigned long /*xor*/,
- unsigned long * /*addrl*/,
+ CfbBits /*and*/,
+ CfbBits /*xor*/,
+ CfbBits * /*addrl*/,
int /*nlwidth*/,
int /*x1*/,
int /*y1*/,
@@ -866,10 +871,10 @@ extern void cfb8FillRectStippledUnnatural(
extern int cfbReduceRasterOp(
int /*rop*/,
- unsigned long /*fg*/,
- unsigned long /*pm*/,
- unsigned long * /*andp*/,
- unsigned long * /*xorp*/
+ CfbBits /*fg*/,
+ CfbBits /*pm*/,
+ CfbBits * /*andp*/,
+ CfbBits * /*xorp*/
);
/* cfbscrinit.c */
@@ -933,7 +938,7 @@ extern void cfbSegmentSD(
);
/* cfbsetsp.c */
-extern int cfbSetScanline(
+extern void cfbSetScanline(
int /*y*/,
int /*xOrigin*/,
int /*xStart*/,
@@ -1239,7 +1244,7 @@ extern int cfbScreenPrivateIndex;
#define cfbGetPixelWidth(pDrawable) cfbGetTypedWidth(pDrawable, PixelType)
-#define cfbGetLongWidth(pDrawable) cfbGetTypedWidth(pDrawable, unsigned long)
+#define cfbGetLongWidth(pDrawable) cfbGetTypedWidth(pDrawable, CfbBits)
#define cfbGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\
PixmapPtr _pPix; \
@@ -1255,7 +1260,7 @@ extern int cfbScreenPrivateIndex;
cfbGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned char, unsigned char)
#define cfbGetLongWidthAndPointer(pDrawable, width, pointer) \
- cfbGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned long, unsigned long)
+ cfbGetTypedWidthAndPointer(pDrawable, width, pointer, CfbBits, CfbBits)
#define cfbGetPixelWidthAndPointer(pDrawable, width, pointer) \
cfbGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType)
@@ -1267,7 +1272,7 @@ extern int cfbScreenPrivateIndex;
}
#define cfbGetWindowLongWidthAndPointer(pWin, width, pointer) \
- cfbGetWindowTypedWidthAndPointer(pWin, width, pointer, unsigned long, unsigned long)
+ cfbGetWindowTypedWidthAndPointer(pWin, width, pointer, CfbBits, CfbBits)
#define cfbGetWindowByteWidthAndPointer(pWin, width, pointer) \
cfbGetWindowTypedWidthAndPointer(pWin, width, pointer, unsigned char, unsigned char)
@@ -1275,6 +1280,18 @@ extern int cfbScreenPrivateIndex;
#define cfbGetWindowPixelWidthAndPointer(pDrawable, width, pointer) \
cfbGetWindowTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType)
+/*
+ * XFree86 empties the root BorderClip when the VT is inactive,
+ * here's a macro which uses that to disable GetImage and GetSpans
+ */
+#define cfbWindowEnabled(pWin) \
+ REGION_NOTEMPTY((pWin)->drawable.pScreen, \
+ &WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
+
+#define cfbDrawableEnabled(pDrawable) \
+ ((pDrawable)->type == DRAWABLE_PIXMAP ? \
+ TRUE : cfbWindowEnabled((WindowPtr) pDrawable))
+
/* Macros which handle a coordinate in a single register */
/* Most compilers will convert divide by 65536 into a shift, if signed