summaryrefslogtreecommitdiff
path: root/include/X11/Xmu/Xmu.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/X11/Xmu/Xmu.h')
-rw-r--r--include/X11/Xmu/Xmu.h83
1 files changed, 77 insertions, 6 deletions
diff --git a/include/X11/Xmu/Xmu.h b/include/X11/Xmu/Xmu.h
index 416d1fa..0959249 100644
--- a/include/X11/Xmu/Xmu.h
+++ b/include/X11/Xmu/Xmu.h
@@ -25,6 +25,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/Xmu/Xmu.h,v 1.9 2001/12/14 19:55:59 dawes Exp $ */
/*
* The interfaces described by this header file are for miscellaneous utilities
@@ -34,12 +35,6 @@ in this Software without prior written authorization from The Open Group.
#ifndef _XMU_H_
#define _XMU_H_
-/*
- * This include file is obsolete and is provided only for compatibility with
- * MIT Release 3 clients. Callers should use the appropriate include file.
- *
- * DO NOT ADD ANY NEW INCLUDES OR DEFINITIONS TO THIS FILE!
- */
#include <X11/Intrinsic.h>
#include <X11/Xmu/Atoms.h> /* _XA_... */
#include <X11/Xmu/CharSet.h> /* CopyISOLatin1Lowered */
@@ -48,5 +43,81 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xmu/Error.h> /* PrintDefaultError */
#include <X11/Xmu/StdSel.h> /* ConvertStandardSelection */
+/*
+ * clip lists
+ */
+typedef struct _XmuSegment {
+ int x1, x2;
+ struct _XmuSegment *next;
+} XmuSegment;
+
+typedef struct _XmuScanline {
+ int y;
+ XmuSegment *segment;
+ struct _XmuScanline *next;
+} XmuScanline;
+
+typedef struct _XmuArea {
+ XmuScanline *scanline;
+} XmuArea;
+
+#define XmuCreateArea() XmuNewArea(0, 0, 0, 0)
+#define XmuAreaOr(dst, src) XmuAreaOrXor((dst), (src), True)
+#define XmuAreaXor(dst, src) XmuAreaOrXor((dst), (src), False)
+
+#define XmuDestroyArea(a) \
+ do { \
+ XmuDestroyScanlineList((a)->scanline); \
+ XtFree((char *)(a)); \
+ } while (0)
+
+#define FreeArea(a) \
+ do { \
+ XmuDestroyScanlineList((a)->scanline); \
+ a->scanline = (Scanline *)0; \
+ } while (0)
+
+#define XmuValidSegment(s) ((s)->x1 < (s)->x2)
+#define XmuSegmentEqu(s1, s2) ((s1)->x1 == (s2)->x1 && (s1)->x2 == (s2)->x2)
+#define XmuDestroySegment(s) XtFree((char *)(s))
+
+#define XmuDestroyScanline(s) \
+ do { \
+ XmuDestroySegmentList((s)->segment); \
+ XtFree((char*)(s)); \
+ } while (0)
+
+XmuArea *XmuNewArea(int, int, int, int);
+XmuArea *XmuAreaDup(XmuArea*);
+XmuArea *XmuAreaCopy(XmuArea*, XmuArea*);
+XmuArea *XmuAreaNot(XmuArea*, int, int, int, int);
+XmuArea *XmuAreaOrXor(XmuArea*, XmuArea*, Bool);
+XmuArea *XmuAreaAnd(XmuArea*, XmuArea*);
+Bool XmuValidArea(XmuArea*);
+Bool XmuValidScanline(XmuScanline*);
+Bool XmuScanlineEqu(XmuScanline*, XmuScanline*);
+XmuSegment *XmuNewSegment(int, int);
+void XmuDestroySegmentList(XmuSegment*);
+XmuScanline *XmuScanlineCopy(XmuScanline*, XmuScanline*);
+Bool XmuAppendSegment(XmuSegment*, XmuSegment*);
+XmuScanline *XmuOptimizeScanline(XmuScanline*);
+XmuScanline *XmuScanlineNot(XmuScanline *scanline, int, int);
+XmuScanline *XmuScanlineOr(XmuScanline*, XmuScanline*);
+XmuScanline *XmuScanlineAnd(XmuScanline*, XmuScanline*);
+XmuScanline *XmuScanlineXor(XmuScanline*, XmuScanline*);
+XmuScanline *XmuNewScanline(int, int, int);
+void XmuDestroyScanlineList(XmuScanline*);
+XmuArea *XmuOptimizeArea(XmuArea *area);
+
+#ifndef notdef
+XmuScanline *XmuScanlineOrSegment(XmuScanline*, XmuSegment*);
+XmuScanline *XmuScanlineAndSegment(XmuScanline*, XmuSegment*);
+XmuScanline *XmuScanlineXorSegment(XmuScanline*, XmuSegment*);
+#endif /* notdef */
+
+#ifndef _SYSUTIL_H_
+int XmuSnprintf(char *str, int size, _Xconst char *fmt, ...);
+#endif
+
#endif /* _XMU_H_ */