File indexing completed on 2025-01-30 10:26:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #ifndef _XMU_H_
0033 #define _XMU_H_
0034
0035 #include <X11/Xfuncproto.h>
0036 #include <X11/Intrinsic.h>
0037 #include <X11/Xmu/Atoms.h> /* _XA_... */
0038 #include <X11/Xmu/CharSet.h> /* CopyISOLatin1Lowered */
0039 #include <X11/Xmu/Converters.h> /* CvtStringTo... */
0040 #include <X11/Xmu/Drawing.h> /* DrawRoundedRect, DrawLogo */
0041 #include <X11/Xmu/Error.h> /* PrintDefaultError */
0042 #include <X11/Xmu/StdSel.h> /* ConvertStandardSelection */
0043
0044
0045
0046
0047 typedef struct _XmuSegment {
0048 int x1, x2;
0049 struct _XmuSegment *next;
0050 } XmuSegment;
0051
0052 typedef struct _XmuScanline {
0053 int y;
0054 XmuSegment *segment;
0055 struct _XmuScanline *next;
0056 } XmuScanline;
0057
0058 typedef struct _XmuArea {
0059 XmuScanline *scanline;
0060 } XmuArea;
0061
0062 #define XmuCreateArea() XmuNewArea(0, 0, 0, 0)
0063 #define XmuAreaOr(dst, src) XmuAreaOrXor((dst), (src), True)
0064 #define XmuAreaXor(dst, src) XmuAreaOrXor((dst), (src), False)
0065
0066 #define XmuDestroyArea(a) \
0067 do { \
0068 XmuDestroyScanlineList((a)->scanline); \
0069 XtFree((char *)(a)); \
0070 } while (0)
0071
0072 #define FreeArea(a) \
0073 do { \
0074 XmuDestroyScanlineList((a)->scanline); \
0075 a->scanline = (Scanline *)0; \
0076 } while (0)
0077
0078 #define XmuValidSegment(s) ((s)->x1 < (s)->x2)
0079 #define XmuSegmentEqu(s1, s2) ((s1)->x1 == (s2)->x1 && (s1)->x2 == (s2)->x2)
0080 #define XmuDestroySegment(s) XtFree((char *)(s))
0081
0082 #define XmuDestroyScanline(s) \
0083 do { \
0084 XmuDestroySegmentList((s)->segment); \
0085 XtFree((char*)(s)); \
0086 } while (0)
0087
0088 XmuArea *XmuNewArea(int, int, int, int);
0089 XmuArea *XmuAreaDup(XmuArea*);
0090 XmuArea *XmuAreaCopy(XmuArea*, XmuArea*);
0091 XmuArea *XmuAreaNot(XmuArea*, int, int, int, int);
0092 XmuArea *XmuAreaOrXor(XmuArea*, XmuArea*, Bool);
0093 XmuArea *XmuAreaAnd(XmuArea*, XmuArea*);
0094 Bool XmuValidArea(XmuArea*);
0095 Bool XmuValidScanline(XmuScanline*);
0096 Bool XmuScanlineEqu(XmuScanline*, XmuScanline*);
0097 XmuSegment *XmuNewSegment(int, int);
0098 void XmuDestroySegmentList(XmuSegment*);
0099 XmuScanline *XmuScanlineCopy(XmuScanline*, XmuScanline*);
0100 Bool XmuAppendSegment(XmuSegment*, XmuSegment*);
0101 XmuScanline *XmuOptimizeScanline(XmuScanline*);
0102 XmuScanline *XmuScanlineNot(XmuScanline *scanline, int, int);
0103 XmuScanline *XmuScanlineOr(XmuScanline*, XmuScanline*);
0104 XmuScanline *XmuScanlineAnd(XmuScanline*, XmuScanline*);
0105 XmuScanline *XmuScanlineXor(XmuScanline*, XmuScanline*);
0106 XmuScanline *XmuNewScanline(int, int, int);
0107 void XmuDestroyScanlineList(XmuScanline*);
0108 XmuArea *XmuOptimizeArea(XmuArea *area);
0109
0110 XmuScanline *XmuScanlineOrSegment(XmuScanline*, XmuSegment*);
0111 XmuScanline *XmuScanlineAndSegment(XmuScanline*, XmuSegment*);
0112 XmuScanline *XmuScanlineXorSegment(XmuScanline*, XmuSegment*);
0113
0114 #ifndef _SYSUTIL_H_
0115 int XmuSnprintf(char *str, int size, _Xconst char *fmt, ...)
0116 _X_ATTRIBUTE_PRINTF(3,4);
0117 #endif
0118
0119 #endif
0120