diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/X11/Xmu/Atoms.h | 62 | ||||
-rw-r--r-- | include/X11/Xmu/CharSet.h | 53 | ||||
-rw-r--r-- | include/X11/Xmu/CloseHook.h | 56 | ||||
-rw-r--r-- | include/X11/Xmu/Converters.h | 345 | ||||
-rw-r--r-- | include/X11/Xmu/CurUtil.h | 10 | ||||
-rw-r--r-- | include/X11/Xmu/CvtCache.h | 13 | ||||
-rw-r--r-- | include/X11/Xmu/DisplayQue.h | 82 | ||||
-rw-r--r-- | include/X11/Xmu/Drawing.h | 223 | ||||
-rw-r--r-- | include/X11/Xmu/Editres.h | 9 | ||||
-rw-r--r-- | include/X11/Xmu/EditresP.h | 111 | ||||
-rw-r--r-- | include/X11/Xmu/Error.h | 27 | ||||
-rw-r--r-- | include/X11/Xmu/ExtAgent.h | 17 | ||||
-rw-r--r-- | include/X11/Xmu/Initer.h | 28 | ||||
-rw-r--r-- | include/X11/Xmu/StdCmap.h | 143 | ||||
-rw-r--r-- | include/X11/Xmu/StdSel.h | 26 | ||||
-rw-r--r-- | include/X11/Xmu/SysUtil.h | 20 | ||||
-rw-r--r-- | include/X11/Xmu/WidgetNode.h | 57 | ||||
-rw-r--r-- | include/X11/Xmu/WinUtil.h | 34 | ||||
-rw-r--r-- | include/X11/Xmu/Xct.h | 41 | ||||
-rw-r--r-- | include/X11/Xmu/Xmu.h | 83 |
20 files changed, 793 insertions, 647 deletions
diff --git a/include/X11/Xmu/Atoms.h b/include/X11/Xmu/Atoms.h index 53c16b3..64b6b08 100644 --- a/include/X11/Xmu/Atoms.h +++ b/include/X11/Xmu/Atoms.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/Atoms.h,v 1.7 2001/12/14 19:55:33 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -61,7 +62,8 @@ extern AtomPtr _XA_TARGETS, _XA_TEXT, _XA_TIMESTAMP, - _XA_USER; + _XA_USER, + _XA_UTF8_STRING; #define XA_ATOM_PAIR(d) XmuInternAtom(d, _XA_ATOM_PAIR) #define XA_CHARACTER_POSITION(d) XmuInternAtom(d, _XA_CHARACTER_POSITION) @@ -85,43 +87,39 @@ extern AtomPtr #define XA_TEXT(d) XmuInternAtom(d, _XA_TEXT) #define XA_TIMESTAMP(d) XmuInternAtom(d, _XA_TIMESTAMP) #define XA_USER(d) XmuInternAtom(d, _XA_USER) +#define XA_UTF8_STRING(d) XmuInternAtom(d, _XA_UTF8_STRING) _XFUNCPROTOBEGIN -extern char *XmuGetAtomName( -#if NeedFunctionPrototypes - Display * /* dpy */, - Atom /* atom */ -#endif +char *XmuGetAtomName +( + Display *dpy, + Atom atom + ); + +Atom XmuInternAtom +( + Display *dpy, + AtomPtr atom_ptr + ); + +void XmuInternStrings +( + Display *dpy, + String *names, + Cardinal count, + Atom *atoms_return ); -extern Atom XmuInternAtom( -#if NeedFunctionPrototypes - Display * /* dpy */, - AtomPtr /* atom_ptr */ -#endif -); - -extern void XmuInternStrings( -#if NeedFunctionPrototypes - Display * /* dpy */, - String * /* names */, - Cardinal /* count */, - Atom * /* atoms_return */ -#endif -); +AtomPtr XmuMakeAtom +( + _Xconst char *name + ); -extern AtomPtr XmuMakeAtom( -#if NeedFunctionPrototypes - _Xconst char * /* name */ -#endif -); - -extern char *XmuNameOfAtom( -#if NeedFunctionPrototypes - AtomPtr /* atom_ptr */ -#endif -); +char *XmuNameOfAtom +( + AtomPtr atom_ptr + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/CharSet.h b/include/X11/Xmu/CharSet.h index e017458..dfecf45 100644 --- a/include/X11/Xmu/CharSet.h +++ b/include/X11/Xmu/CharSet.h @@ -26,6 +26,8 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xmu/CharSet.h,v 1.8 2001/12/14 19:55:33 dawes Exp $ */ + /* * The interfaces described by this header file are for miscellaneous utilities * and are not part of the Xlib standard. @@ -38,26 +40,37 @@ in this Software without prior written authorization from The Open Group. _XFUNCPROTOBEGIN -extern void XmuCopyISOLatin1Lowered( -#if NeedFunctionPrototypes - char * /* dst_return */, - _Xconst char * /* src */ -#endif -); - -extern void XmuCopyISOLatin1Uppered( -#if NeedFunctionPrototypes - char * /* dst_return */, - _Xconst char * /* src */ -#endif -); - -extern int XmuCompareISOLatin1( -#if NeedFunctionPrototypes - _Xconst char * /* first */, - _Xconst char * /* second */ -#endif -); +void XmuCopyISOLatin1Lowered +( + char *dst_return, + _Xconst char *src + ); + +void XmuCopyISOLatin1Uppered +( + char *dst_return, + _Xconst char *src + ); + +int XmuCompareISOLatin1 +( + _Xconst char *first, + _Xconst char *second + ); + +void XmuNCopyISOLatin1Lowered +( + char *dst_return, + _Xconst char *src, + int size + ); + +void XmuNCopyISOLatin1Uppered +( + char *dst_return, + _Xconst char *src, + int size + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/CloseHook.h b/include/X11/Xmu/CloseHook.h index b69290a..971a763 100644 --- a/include/X11/Xmu/CloseHook.h +++ b/include/X11/Xmu/CloseHook.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/CloseHook.h,v 1.7 2001/12/14 19:55:35 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -36,43 +37,36 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xlib.h> #include <X11/Xfuncproto.h> +#include <X11/Xlibint.h> typedef XPointer CloseHook; -typedef int (*XmuCloseHookProc)( -#if NeedFunctionPrototypes - Display* /* dpy */, - XPointer /* data */ -#endif -); +typedef int (*XmuCloseHookProc)(Display *dpy, XPointer data); _XFUNCPROTOBEGIN -extern CloseHook XmuAddCloseDisplayHook( -#if NeedFunctionPrototypes - Display * /* dpy */, - XmuCloseHookProc /* proc */, - XPointer /* arg */ -#endif -); - -extern Bool XmuLookupCloseDisplayHook( -#if NeedFunctionPrototypes - Display * /* dpy */, - CloseHook /* handle */, - XmuCloseHookProc /* proc */, - XPointer /* arg */ -#endif -); - -extern Bool XmuRemoveCloseDisplayHook( -#if NeedFunctionPrototypes - Display * /* dpy */, - CloseHook /* handle */, - XmuCloseHookProc /* proc */, - XPointer /* arg */ -#endif -); +CloseHook XmuAddCloseDisplayHook +( + Display *dpy, + XmuCloseHookProc proc, + XPointer arg + ); + +Bool XmuLookupCloseDisplayHook +( + Display *dpy, + CloseHook handle, + XmuCloseHookProc proc, + XPointer arg + ); + +Bool XmuRemoveCloseDisplayHook +( + Display *dpy, + CloseHook handle, + XmuCloseHookProc proc, + XPointer arg + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/Converters.h b/include/X11/Xmu/Converters.h index 3b3a448..fa1be53 100644 --- a/include/X11/Xmu/Converters.h +++ b/include/X11/Xmu/Converters.h @@ -26,6 +26,8 @@ in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/Xmu/Converters.h,v 1.6 2001/12/14 19:55:35 dawes Exp $ */ + /* * The interfaces described by this header file are for miscellaneous utilities * and are not part of the Xlib standard. @@ -39,26 +41,14 @@ in this Software without prior written authorization from The Open Group. _XFUNCPROTOBEGIN -/* - * Converters - insert in alphabetical order - */ - -/****************************************************************************** - * XmuCvtFunctionToCallback - */ -extern void XmuCvtFunctionToCallback( -#if NeedFunctionPrototypes - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */ -#endif -); - +void XmuCvtFunctionToCallback +( + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal + ); -/****************************************************************************** - * XmuCvtStringToBackingStore - */ #define XtNbackingStore "backingStore" #define XtCBackingStore "BackingStore" #define XtRBackingStore "BackingStore" @@ -66,46 +56,45 @@ extern void XmuCvtFunctionToCallback( #define XtEwhenMapped "whenMapped" #define XtEalways "always" #define XtEdefault "default" -extern void XmuCvtStringToBackingStore( -#if NeedFunctionPrototypes - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */ -#endif -); - - -/****************************************************************************** - * XmuCvtStringToCursor - */ -extern void XmuCvtStringToCursor( -#if NeedFunctionPrototypes - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */ -#endif -); -extern Boolean XmuCvtStringToColorCursor( -#if NeedFunctionPrototypes - Display* /* dpy */, - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */, - XtPointer* /* converter_data */ -#endif -); +void XmuCvtStringToBackingStore +( + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal + ); + +Boolean XmuCvtBackingStoreToString +( + Display *dpy, + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal, + XtPointer *converter_data + ); + +void XmuCvtStringToCursor +( + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal + ); #define XtRColorCursor "ColorCursor" #define XtNpointerColor "pointerColor" #define XtNpointerColorBackground "pointerColorBackground" +Boolean XmuCvtStringToColorCursor +( + Display *dpy, + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal, + XtPointer *converter_data + ); - -/****************************************************************************** - * XmuCvtStringToGravity - */ typedef int XtGravity; #ifndef XtRGravity @@ -123,86 +112,102 @@ typedef int XtGravity; #define XtESouthEast "southeast" #define XtEStatic "static" #define XtEUnmap "unmap" +void XmuCvtStringToGravity +( + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal + ); + +Boolean XmuCvtGravityToString +( + Display *dpy, + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal, + XtPointer *converter_data + ); -extern void XmuCvtStringToGravity ( -#if NeedFunctionPrototypes - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */ -#endif -); - - -/****************************************************************************** - * XmuCvtStringToJustify - */ typedef enum { XtJustifyLeft, /* justify text to left side of button */ XtJustifyCenter, /* justify text in center of button */ XtJustifyRight /* justify text to right side of button */ } XtJustify; +#ifndef XtRJustify +#define XtRJustify "Justify" +#endif #define XtEleft "left" #define XtEcenter "center" #define XtEright "right" #define XtEtop "top" #define XtEbottom "bottom" +void XmuCvtStringToJustify +( + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal + ); + +Boolean XmuCvtJustifyToString +( + Display *dpy, + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal, + XtPointer *converter_data + ); -extern void XmuCvtStringToJustify( -#if NeedFunctionPrototypes - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */ -#endif -); - - -/****************************************************************************** - * XmuCvtStringToLong - */ #define XtRLong "Long" -extern void XmuCvtStringToLong( -#if NeedFunctionPrototypes - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */ -#endif -); - - -/****************************************************************************** - * XmuCvtStringToOrientation - */ -typedef enum {XtorientHorizontal, XtorientVertical} XtOrientation; -extern void XmuCvtStringToOrientation( -#if NeedFunctionPrototypes - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */ -#endif -); - - -/****************************************************************************** - * XmuCvtStringToBitmap - */ -extern void XmuCvtStringToBitmap( -#if NeedFunctionPrototypes - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */ -#endif -); +void XmuCvtStringToLong +( + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal + ); +Boolean XmuCvtLongToString +( + Display *dpy, + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal, + XtPointer *converter_data + ); - -/****************************************************************************** - * XmuCvtStringToShapeStyle; is XtTypeConverter (i.e. new style) - * no conversion arguments, not particularly useful to cache the results. - */ +typedef enum { + XtorientHorizontal, + XtorientVertical +} XtOrientation; +void XmuCvtStringToOrientation +( + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal + ); + +Boolean XmuCvtOrientationToString +( + Display *dpy, + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal, + XtPointer *converter_data + ); + +void XmuCvtStringToBitmap +( + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal + ); #define XtRShapeStyle "ShapeStyle" #define XtERectangle "Rectangle" @@ -215,51 +220,61 @@ extern void XmuCvtStringToBitmap( #define XmuShapeEllipse 3 #define XmuShapeRoundedRectangle 4 -extern Boolean XmuCvtStringToShapeStyle( -#if NeedFunctionPrototypes - Display* /* dpy */, - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */, - XtPointer* /* converter_data */ -#endif -); - -extern Boolean XmuReshapeWidget( -#if NeedFunctionPrototypes - Widget /* w */, - int /* shape_style */, - int /* corner_width */, - int /* corner_height */ -#endif -); - -/****************************************************************************** - * XmuCvtStringToWidget - */ -extern void XmuCvtStringToWidget( -#if NeedFunctionPrototypes - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValuePtr /* fromVal */, - XrmValuePtr /* toVal */ -#endif -); - -/****************************************************************************** - * XmuNewCvtStringToWidget - */ -extern Boolean XmuNewCvtStringToWidget( -#if NeedFunctionPrototypes - Display* /* display */, - XrmValue* /* args */, - Cardinal* /* num_args */, - XrmValue* /* fromVal */, - XrmValue* /* toVal */, - XtPointer* /* converter_data */ -#endif -); +Boolean XmuCvtStringToShapeStyle +( + Display *dpy, + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal, + XtPointer *converter_data + ); + +Boolean XmuCvtShapeStyleToString +( + Display *dpy, + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal, + XtPointer *converter_data + ); + +Boolean XmuReshapeWidget +( + Widget w, + int shape_style, + int corner_width, + int corner_height + ); + +void XmuCvtStringToWidget +( + XrmValue *args, + Cardinal *num_args, + XrmValuePtr fromVal, + XrmValuePtr toVal + ); + +Boolean XmuNewCvtStringToWidget +( + Display *display, + XrmValue *args, + Cardinal *num_args, + XrmValue *fromVal, + XrmValue *toVal, + XtPointer *converter_data + ); + +Boolean XmuCvtWidgetToString +( + Display *dpy, + XrmValue *args, + Cardinal *num_args, + XrmValue *fromVal, + XrmValue *toVal, + XtPointer *converter_data + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/CurUtil.h b/include/X11/Xmu/CurUtil.h index 5ac79fc..f819013 100644 --- a/include/X11/Xmu/CurUtil.h +++ b/include/X11/Xmu/CurUtil.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/CurUtil.h,v 1.6 2001/12/14 19:55:38 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -38,11 +39,10 @@ in this Software without prior written authorization from The Open Group. _XFUNCPROTOBEGIN -extern int XmuCursorNameToIndex( -#if NeedFunctionPrototypes - _Xconst char* /* name */ -#endif -); +int XmuCursorNameToIndex +( + _Xconst char *name + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/CvtCache.h b/include/X11/Xmu/CvtCache.h index db020e7..06cf162 100644 --- a/include/X11/Xmu/CvtCache.h +++ b/include/X11/Xmu/CvtCache.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/CvtCache.h,v 1.7 2001/12/14 19:55:39 dawes Exp $ */ /* * Public Interfaces @@ -48,11 +49,13 @@ typedef struct _XmuCvtCache { _XFUNCPROTOBEGIN -extern XmuCvtCache *_XmuCCLookupDisplay( -#if NeedFunctionPrototypes - Display* /* dpy */ -#endif -); +XmuCvtCache *_XmuCCLookupDisplay +( + Display *dpy + ); + +extern void _XmuStringToBitmapInitCache(XmuCvtCache *c); +extern void _XmuStringToBitmapFreeCache(XmuCvtCache *c); _XFUNCPROTOEND diff --git a/include/X11/Xmu/DisplayQue.h b/include/X11/Xmu/DisplayQue.h index 57bb7a5..65c566e 100644 --- a/include/X11/Xmu/DisplayQue.h +++ b/include/X11/Xmu/DisplayQue.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/DisplayQue.h,v 1.6 2001/12/14 19:55:40 dawes Exp $ */ #ifndef _XMU_DISPLAYQUE_H_ #define _XMU_DISPLAYQUE_H_ @@ -93,18 +94,10 @@ in this Software without prior written authorization from The Open Group. typedef struct _XmuDisplayQueue XmuDisplayQueue; typedef struct _XmuDisplayQueueEntry XmuDisplayQueueEntry; -typedef int (*XmuCloseDisplayQueueProc)( -#if NeedFunctionPrototypes - XmuDisplayQueue* /* queue */, - XmuDisplayQueueEntry* /* entry */ -#endif -); +typedef int (*XmuCloseDisplayQueueProc)(XmuDisplayQueue *queue, + XmuDisplayQueueEntry *entry); -typedef int (*XmuFreeDisplayQueueProc)( -#if NeedFunctionPrototypes - XmuDisplayQueue* /* queue */ -#endif -); +typedef int (*XmuFreeDisplayQueueProc)(XmuDisplayQueue *queue); struct _XmuDisplayQueueEntry { struct _XmuDisplayQueueEntry *prev, *next; @@ -123,42 +116,37 @@ struct _XmuDisplayQueue { _XFUNCPROTOBEGIN -extern XmuDisplayQueue *XmuDQCreate( -#if NeedFunctionPrototypes - XmuCloseDisplayQueueProc /* closefunc */, - XmuFreeDisplayQueueProc /* freefunc */, - XPointer /* data */ -#endif -); - -extern Bool XmuDQDestroy( -#if NeedFunctionPrototypes - XmuDisplayQueue* /* q */, - Bool /* docallbacks */ -#endif -); - -extern XmuDisplayQueueEntry *XmuDQLookupDisplay( -#if NeedFunctionPrototypes - XmuDisplayQueue* /* q */, - Display* /* dpy */ -#endif -); - -extern XmuDisplayQueueEntry *XmuDQAddDisplay( -#if NeedFunctionPrototypes - XmuDisplayQueue* /* q */, - Display* /* dpy */, - XPointer /* data */ -#endif -); - -extern Bool XmuDQRemoveDisplay( -#if NeedFunctionPrototypes - XmuDisplayQueue* /* q */, - Display* /* dpy */ -#endif -); +XmuDisplayQueue *XmuDQCreate +( + XmuCloseDisplayQueueProc closefunc, + XmuFreeDisplayQueueProc freefunc, + XPointer data + ); + +Bool XmuDQDestroy +( + XmuDisplayQueue *q, + Bool docallbacks + ); + +XmuDisplayQueueEntry *XmuDQLookupDisplay +( + XmuDisplayQueue *q, + Display *dpy + ); + +XmuDisplayQueueEntry *XmuDQAddDisplay +( + XmuDisplayQueue *q, + Display *dpy, + XPointer data + ); + +Bool XmuDQRemoveDisplay +( + XmuDisplayQueue *q, + Display *dpy + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/Drawing.h b/include/X11/Xmu/Drawing.h index 3aee8d7..587fb3e 100644 --- a/include/X11/Xmu/Drawing.h +++ b/include/X11/Xmu/Drawing.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/Drawing.h,v 1.6 2001/12/14 19:55:42 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -46,126 +47,116 @@ typedef unsigned long Pixel; _XFUNCPROTOBEGIN -extern void XmuDrawRoundedRectangle( -#if NeedFunctionPrototypes - Display* /* dpy */, - Drawable /* draw */, - GC /* gc */, - int /* x */, - int /* y */, - int /* w */, - int /* h */, - int /* ew */, - int /* eh */ -#endif -); - -extern void XmuFillRoundedRectangle( -#if NeedFunctionPrototypes - Display* /* dpy */, - Drawable /* draw */, - GC /* gc */, - int /* x */, - int /* y */, - int /* w */, - int /* h */, - int /* ew */, - int /* eh */ -#endif -); - -extern void XmuDrawLogo( -#if NeedFunctionPrototypes - Display* /* dpy */, - Drawable /* drawable */, - GC /* gcFore */, - GC /* gcBack */, - int /* x */, - int /* y */, - unsigned int /* width */, - unsigned int /* height */ -#endif +void XmuDrawRoundedRectangle +( + Display *dpy, + Drawable draw, + GC gc, + int x, + int y, + int w, + int h, + int ew, + int eh + ); + +void XmuFillRoundedRectangle +( + Display *dpy, + Drawable draw, + GC gc, + int x, + int y, + int w, + int h, + int ew, + int eh + ); + +void XmuDrawLogo +( + Display *dpy, + Drawable drawable, + GC gcFore, + GC gcBack, + int x, + int y, + unsigned int width, + unsigned int height + ); + +Pixmap XmuCreatePixmapFromBitmap +( + Display *dpy, + Drawable d, + Pixmap bitmap, + unsigned int width, + unsigned int height, + unsigned int depth, + unsigned long fore, + unsigned long back ); -extern Pixmap XmuCreatePixmapFromBitmap( -#if NeedFunctionPrototypes - Display* /* dpy */, - Drawable /* d */, - Pixmap /* bitmap */, - unsigned int /* width */, - unsigned int /* height */, - unsigned int /* depth */, - unsigned long /* fore */, - unsigned long /* back */ -#endif +Pixmap XmuCreateStippledPixmap +( + Screen *screen, + Pixel fore, + Pixel back, + unsigned int depth + ); + +void XmuReleaseStippledPixmap +( + Screen *screen, + Pixmap pixmap + ); + +Pixmap XmuLocateBitmapFile +( + Screen *screen, + _Xconst char *name, + char *srcname_return, + int srcnamelen, + int *width_return, + int *height_return, + int *xhot_return, + int *yhot_return + ); + +Pixmap XmuLocatePixmapFile +( + Screen *screen, + _Xconst char *name, + unsigned long fore, + unsigned long back, + unsigned int depth, + char *srcname_return, + int srcnamelen, + int *width_return, + int *height_return, + int *xhot_return, + int *yhot_return + ); + +int XmuReadBitmapData +( + FILE *fstream, + unsigned int *width_return, + unsigned int *height_return, + unsigned char **datap_return, + int *xhot_return, + int *yhot_return ); -extern Pixmap XmuCreateStippledPixmap( -#if NeedFunctionPrototypes - Screen* /* screen */, - Pixel /* fore */, - Pixel /* back */, - unsigned int /* depth */ -#endif -); - -extern void XmuReleaseStippledPixmap( -#if NeedFunctionPrototypes - Screen* /* screen */, - Pixmap /* pixmap */ -#endif -); - -extern Pixmap XmuLocateBitmapFile( -#if NeedFunctionPrototypes - Screen* /* screen */, - _Xconst char* /* name */, - char* /* srcname_return */, - int /* srcnamelen */, - int* /* width_return */, - int* /* height_return, */, - int* /* xhot_return */, - int* /* yhot_return */ -#endif -); - -extern Pixmap XmuLocatePixmapFile( -#if NeedFunctionPrototypes - Screen* /* screen */, - _Xconst char* /* name */, - unsigned long /* fore */, - unsigned long /* back */, - unsigned int /* depth */, - char* /* srcname_return */, - int /* srcnamelen */, - int* /* width_return */, - int* /* height_return, */, - int* /* xhot_return */, - int* /* yhot_return */ -#endif -); - -extern int XmuReadBitmapData( -#if NeedFunctionPrototypes - FILE* /* fstream */, - unsigned int* /* width_return */, - unsigned int* /* height_return */, - unsigned char** /* datap_return */, - int* /* xhot_return */, - int* /* yhot_return */ -#endif -); - -extern int XmuReadBitmapDataFromFile( -#if NeedFunctionPrototypes - _Xconst char* /* filename */, - unsigned int* /* width_return */, - unsigned int* /* height_return */, - unsigned char** /* datap_return */, - int* /* xhot_return */, - int* /* yhot_return */ -#endif -); +int XmuReadBitmapDataFromFile +( + _Xconst char *filename, + unsigned int *width_return, + unsigned int *height_return, + unsigned char **datap_return, + int *xhot_return, + int *yhot_return + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/Editres.h b/include/X11/Xmu/Editres.h index 94e0b3b..2b2eddb 100644 --- a/include/X11/Xmu/Editres.h +++ b/include/X11/Xmu/Editres.h @@ -25,11 +25,18 @@ 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/Editres.h,v 1.6 2001/12/14 19:55:43 dawes Exp $ */ #include <X11/Xfuncproto.h> _XFUNCPROTOBEGIN -void _XEditResCheckMessages(); +void _XEditResCheckMessages +( + Widget w, + XtPointer data, + XEvent *event, + Boolean *cont +); _XFUNCPROTOEND diff --git a/include/X11/Xmu/EditresP.h b/include/X11/Xmu/EditresP.h index 44dfd38..b65b1c1 100644 --- a/include/X11/Xmu/EditresP.h +++ b/include/X11/Xmu/EditresP.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/EditresP.h,v 1.6 2001/12/14 19:55:44 dawes Exp $ */ /* * Author: Chris D. Peterson, MIT X Consortium @@ -43,8 +44,8 @@ in this Software without prior written authorization from The Open Group. l[0] = timestamp l[1] = command atom name - l[2] = ident of command. - l[3] = protocol version number to use. + l[2] = ident of command + l[3] = protocol version number to use @@ -279,43 +280,48 @@ in this Software without prior written authorization from The Open Group. #define EDITRES_IS_UNREALIZED 0 /* - * Format for atoms. + * Format for atoms */ - #define EDITRES_FORMAT 8 #define EDITRES_SEND_EVENT_FORMAT 32 /* * Atoms */ - #define EDITRES_NAME "Editres" #define EDITRES_COMMAND_ATOM "EditresCommand" #define EDITRES_COMM_ATOM "EditresComm" #define EDITRES_CLIENT_VALUE "EditresClientVal" #define EDITRES_PROTOCOL_ATOM "EditresProtocol" -typedef enum { SendWidgetTree = 0, +typedef enum { + SendWidgetTree = 0, SetValues = 1, GetResources = 2, GetGeometry = 3, FindChild = 4, GetValues = 5 - } EditresCommand; +} EditresCommand; -typedef enum {NormalResource = 0, ConstraintResource = 1} ResourceType; +typedef enum { + NormalResource = 0, + ConstraintResource = 1 +} ResourceType; /* - * The type of a resource identifier. + * The type of a resource identifier */ - typedef unsigned char ResIdent; -typedef enum {PartialSuccess= 0, Failure= 1, ProtocolMismatch= 2} EditResError; +typedef enum { + PartialSuccess = 0, + Failure = 1, + ProtocolMismatch = 2 +} EditResError; typedef struct _WidgetInfo { unsigned short num_widgets; - unsigned long * ids; + unsigned long *ids; Widget real_widget; } WidgetInfo; @@ -325,18 +331,79 @@ typedef struct _ProtocolStream { } ProtocolStream; /************************************************************ - * - * Function definitions for reading and writing protocol requests. - * + * Function definitions for reading and writing protocol requests ************************************************************/ - _XFUNCPROTOBEGIN -void _XEditResPutString8(), _XEditResPut8(), _XEditResPut16(); -void _XEditResPut32(), _XEditResPutWidgetInfo(), _XEditResPutWidget(); -void _XEditResResetStream(); - -Boolean _XEditResGet8(), _XEditResGet16(), _XEditResGetSigned16(); -Boolean _XEditResGet32(), _XEditResGetString8(), _XEditResGetWidgetInfo(); +void _XEditResPutString8 +( + ProtocolStream *stream, + char *str + ); + +void _XEditResPut8 +( + ProtocolStream *stream, + unsigned int value + ); + +void _XEditResPut16 +( + ProtocolStream *stream, + unsigned int value + ); + +void _XEditResPut32 +( + ProtocolStream *stream, + unsigned long value + ); + +void _XEditResPutWidgetInfo +( + ProtocolStream *stream, + WidgetInfo *info + ); + +void _XEditResResetStream +( + ProtocolStream *stream + ); + +Bool _XEditResGet8 +( + ProtocolStream *stream, + unsigned char *value + ); + +Bool _XEditResGet16 +( + ProtocolStream *stream, + unsigned short *value + ); + +Bool _XEditResGetSigned16 +( + ProtocolStream *stream, + short *value + ); + +Bool _XEditResGet32 +( + ProtocolStream *stream, + unsigned long *value + ); + +Bool _XEditResGetString8 +( + ProtocolStream *stream, + char **str + ); + +Bool _XEditResGetWidgetInfo +( + ProtocolStream *stream, + WidgetInfo *info + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/Error.h b/include/X11/Xmu/Error.h index 0fd97c2..b8d6d58 100644 --- a/include/X11/Xmu/Error.h +++ b/include/X11/Xmu/Error.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/Error.h,v 1.6 2001/12/14 19:55:45 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -40,20 +41,18 @@ in this Software without prior written authorization from The Open Group. _XFUNCPROTOBEGIN -extern int XmuPrintDefaultErrorMessage( -#if NeedFunctionPrototypes - Display* /* dpy */, - XErrorEvent* /* event */, - FILE* /* fp */ -#endif -); - -extern int XmuSimpleErrorHandler( -#if NeedFunctionPrototypes - Display* /* dpy */, - XErrorEvent* /* errorp */ -#endif -); +int XmuPrintDefaultErrorMessage +( + Display *dpy, + XErrorEvent *event, + FILE *fp + ); + +int XmuSimpleErrorHandler +( + Display *dpy, + XErrorEvent *errorp + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/ExtAgent.h b/include/X11/Xmu/ExtAgent.h index 81e5c67..78e3495 100644 --- a/include/X11/Xmu/ExtAgent.h +++ b/include/X11/Xmu/ExtAgent.h @@ -25,21 +25,20 @@ 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/ExtAgent.h,v 1.6 2001/12/14 19:55:45 dawes Exp $ */ #include <X11/Intrinsic.h> #include <X11/Xfuncproto.h> _XFUNCPROTOBEGIN -extern void -XmuRegisterExternalAgent( -#if NeedFunctionPrototypes - Widget /* w */, - XtPointer /* data */, - XEvent* /* event */, - Boolean* /* cont */ -#endif -); +extern void XmuRegisterExternalAgent +( + Widget w, + XtPointer data, + XEvent *event, + Boolean *cont + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/Initer.h b/include/X11/Xmu/Initer.h index ad744cc..5153237 100644 --- a/include/X11/Xmu/Initer.h +++ b/include/X11/Xmu/Initer.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/Initer.h,v 1.6 2001/12/14 19:55:46 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -37,27 +38,20 @@ in this Software without prior written authorization from The Open Group. #include <X11/Intrinsic.h> #include <X11/Xfuncproto.h> -typedef void (*XmuInitializerProc)( -#if NeedFunctionPrototypes - XtAppContext /* app_context */, - XPointer /* data */ -#endif -); +typedef void (*XmuInitializerProc)(XtAppContext app_context, XPointer data); _XFUNCPROTOBEGIN -extern void XmuCallInitializers( -#if NeedFunctionPrototypes - XtAppContext /* app_context */ -#endif -); +void XmuCallInitializers +( + XtAppContext app_context + ); -extern void XmuAddInitializer( -#if NeedFunctionPrototypes - XmuInitializerProc /* func */, - XPointer /* data */ -#endif -); +void XmuAddInitializer +( + XmuInitializerProc func, + XPointer data + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/StdCmap.h b/include/X11/Xmu/StdCmap.h index 3ee8f0d..649907a 100644 --- a/include/X11/Xmu/StdCmap.h +++ b/include/X11/Xmu/StdCmap.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/StdCmap.h,v 1.9 2001/12/14 19:55:49 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -34,78 +35,84 @@ in this Software without prior written authorization from The Open Group. #ifndef _XMU_STDCMAP_H_ #define _XMU_STDCMAP_H_ -#include <X11/Intrinsic.h> #include <X11/Xfuncproto.h> _XFUNCPROTOBEGIN -Status XmuAllStandardColormaps( -#if NeedFunctionPrototypes - Display* /* dpy */ -#endif -); - -Status XmuCreateColormap( -#if NeedFunctionPrototypes - Display* /* dpy */, - XStandardColormap* /* colormap */ -#endif -); - -void XmuDeleteStandardColormap( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - Atom /* property */ -#endif -); - -Status XmuGetColormapAllocation( -#if NeedFunctionPrototypes - XVisualInfo* /* vinfo */, - Atom /* property */, - unsigned long* /* red_max_return */, - unsigned long* /* green_max_return */, - unsigned long* /* blue_max_return */ -#endif -); - -Status XmuLookupStandardColormap( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - VisualID /* visualid */, - unsigned int /* depth */, - Atom /* property */, - Bool /* replace */, - Bool /* retain */ -#endif -); - -XStandardColormap *XmuStandardColormap( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - VisualID /* visualid */, - unsigned int /* depth */, - Atom /* property */, - Colormap /* cmap */, - unsigned long /* red_max */, - unsigned long /* green_max */, - unsigned long /* blue_max */ -#endif -); - -Status XmuVisualStandardColormaps( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - VisualID /* visualid */, - unsigned int /* depth */, - Bool /* replace */, - Bool /* retain */ -#endif -); +Status XmuAllStandardColormaps +( + Display *dpy + ); + +Status XmuCreateColormap +( + Display *dpy, + XStandardColormap *colormap + ); + +void XmuDeleteStandardColormap +( + Display *dpy, + int screen, + Atom property + ); + +Status XmuGetColormapAllocation +( + XVisualInfo *vinfo, + Atom property, + unsigned long *red_max_return, + unsigned long *green_max_return, + unsigned long *blue_max_return + ); + +Status XmuLookupStandardColormap +( + Display *dpy, + int screen, + VisualID visualid, + unsigned int depth, + Atom property, + Bool replace, + Bool retain + ); + +XStandardColormap *XmuStandardColormap +( + Display *dpy, + int screen, + VisualID visualid, + unsigned int depth, + Atom property, + Colormap cmap, + unsigned long red_max, + unsigned long green_max, + unsigned long blue_max + ); + +Status XmuVisualStandardColormaps +( + Display *dpy, + int screen, + VisualID visualid, + unsigned int depth, + Bool replace, + Bool retain + ); + +Bool XmuDistinguishableColors +( + XColor *colors, + int count + ); + +Bool XmuDistinguishablePixels +( + Display *dpy, + Colormap cmap, + unsigned long *pixels, + int count + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/StdSel.h b/include/X11/Xmu/StdSel.h index a38f8d7..ba6513f 100644 --- a/include/X11/Xmu/StdSel.h +++ b/include/X11/Xmu/StdSel.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/StdSel.h,v 1.8 2001/12/14 19:55:50 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -39,21 +40,18 @@ in this Software without prior written authorization from The Open Group. _XFUNCPROTOBEGIN -extern Boolean XmuConvertStandardSelection( -#if NeedFunctionPrototypes - Widget /* w */, - Time /* time */, - Atom* /* selection */, - Atom* /* target */, - Atom* /* type_return */, - XPointer * /* value_return */, - unsigned long * /* length_return */, - int * /* format_return */ -#endif -); +Boolean XmuConvertStandardSelection +( + Widget w, + Time timev, + Atom *selection, + Atom *target, + Atom *type_return, + XPointer *value_return, + unsigned long *length_return, + int *format_return + ); _XFUNCPROTOEND #endif /* _XMU_SELECTION_H_ */ - - diff --git a/include/X11/Xmu/SysUtil.h b/include/X11/Xmu/SysUtil.h index 3306492..0f24a89 100644 --- a/include/X11/Xmu/SysUtil.h +++ b/include/X11/Xmu/SysUtil.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/SysUtil.h,v 1.9 2001/12/14 19:55:55 dawes Exp $ */ #ifndef _SYSUTIL_H_ #define _SYSUTIL_H_ @@ -33,13 +34,22 @@ in this Software without prior written authorization from The Open Group. _XFUNCPROTOBEGIN -extern int XmuGetHostname( -#if NeedFunctionPrototypes - char* /* buf_return */, - int /* maxlen */ -#endif +int XmuGetHostname +( + char *buf_return, + int maxlen ); +#ifndef _XMU_H_ +int XmuSnprintf +( + char *str, + int size, + _Xconst char *fmt, + ... + ); +#endif + _XFUNCPROTOEND #endif /* _SYSUTIL_H_ */ diff --git a/include/X11/Xmu/WidgetNode.h b/include/X11/Xmu/WidgetNode.h index f24a8fa..a717544 100644 --- a/include/X11/Xmu/WidgetNode.h +++ b/include/X11/Xmu/WidgetNode.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/WidgetNode.h,v 1.6 2001/12/14 19:55:58 dawes Exp $ */ /* * Author: Jim Fulton, MIT X Consortium @@ -64,36 +65,32 @@ typedef struct _XmuWidgetNode { /* external interfaces */ _XFUNCPROTOBEGIN -extern void XmuWnInitializeNodes ( -#if NeedFunctionPrototypes - XmuWidgetNode * /* nodearray */, - int /* nnodes */ -#endif -); - -extern void XmuWnFetchResources ( -#if NeedFunctionPrototypes - XmuWidgetNode * /* node */, - Widget /* toplevel */, - XmuWidgetNode * /* topnode */ -#endif -); - -extern int XmuWnCountOwnedResources ( -#if NeedFunctionPrototypes - XmuWidgetNode * /* node */, - XmuWidgetNode * /* ownernode */, - Bool /* constraints */ -#endif -); - -extern XmuWidgetNode *XmuWnNameToNode ( -#if NeedFunctionPrototypes - XmuWidgetNode * /* nodelist */, - int /* nnodes */, - _Xconst char * /* name */ -#endif -); +void XmuWnInitializeNodes +( + XmuWidgetNode *nodearray, + int nnodes + ); + +void XmuWnFetchResources +( + XmuWidgetNode *node, + Widget toplevel, + XmuWidgetNode *topnode + ); + +int XmuWnCountOwnedResources +( + XmuWidgetNode *node, + XmuWidgetNode *ownernode, + Bool constraints + ); + +XmuWidgetNode *XmuWnNameToNode +( + XmuWidgetNode *nodelist, + int nnodes, + _Xconst char *name + ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/WinUtil.h b/include/X11/Xmu/WinUtil.h index 3e1eb59..850cbfa 100644 --- a/include/X11/Xmu/WinUtil.h +++ b/include/X11/Xmu/WinUtil.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/WinUtil.h,v 1.7 2001/12/14 19:55:58 dawes Exp $ */ /* * The interfaces described by this header file are for miscellaneous utilities @@ -39,26 +40,23 @@ in this Software without prior written authorization from The Open Group. _XFUNCPROTOBEGIN -extern Window XmuClientWindow( -#if NeedFunctionPrototypes - Display* /* dpy */, - Window /* win */ -#endif -); +Window XmuClientWindow +( + Display *dpy, + Window win + ); -extern Bool XmuUpdateMapHints( -#if NeedFunctionPrototypes - Display* /* dpy */, - Window /* win */, - XSizeHints* /* hints */ -#endif -); +Bool XmuUpdateMapHints +( + Display *dpy, + Window win, + XSizeHints *hints + ); -extern Screen *XmuScreenOfWindow( -#if NeedFunctionPrototypes - Display* /* dpy */, - Window /* w */ -#endif +Screen *XmuScreenOfWindow +( + Display *dpy, + Window w ); _XFUNCPROTOEND diff --git a/include/X11/Xmu/Xct.h b/include/X11/Xmu/Xct.h index cb344b4..2a80e9d 100644 --- a/include/X11/Xmu/Xct.h +++ b/include/X11/Xmu/Xct.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/Xct.h,v 1.7 2001/12/14 19:55:59 dawes Exp $ */ #ifndef _Xct_h #define _Xct_h @@ -118,12 +119,12 @@ typedef struct _XctRec { int can_ignore_exts;/* non-zero if ignoring extensions is * acceptable, else zero */ XctString item; /* item returned from XctNextItem */ - int item_length; /* length of item in bytes */ + unsigned item_length; /* length of item in bytes */ int char_size; /* number of bytes per character in * item, with zero meaning variable */ char *encoding; /* Encoding name for item */ XctHDirection horizontal; /* direction of item */ - int horz_depth; /* current direction nesting depth */ + unsigned horz_depth; /* current direction nesting depth */ char *GL; /* "{I} F" string for current GL */ char *GL_encoding; /* Encoding name for current GL */ int GL_set_size; /* 94 or 96 */ @@ -140,31 +141,27 @@ typedef struct _XctRec { /* these are the external routines */ _XFUNCPROTOBEGIN -extern XctData XctCreate( -#if NeedFunctionPrototypes - _Xconst unsigned char * /* string */, - int /* length */, - XctFlags /* flags */ -#endif +XctData XctCreate +( + _Xconst unsigned char *string, + int length, + XctFlags flags ); -extern XctResult XctNextItem( -#if NeedFunctionPrototypes - XctData /* data */ -#endif +XctResult XctNextItem +( + XctData data ); -extern void XctFree( -#if NeedFunctionPrototypes - XctData /* data */ -#endif -); +void XctFree +( + XctData data + ); -extern void XctReset( -#if NeedFunctionPrototypes - XctData /* data */ -#endif -); +void XctReset +( + XctData data + ); _XFUNCPROTOEND 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_ */ |