59 lines
2.3 KiB
C
59 lines
2.3 KiB
C
#include <X11/X.h>
|
|
#include <X11/Xlib.h>
|
|
#include <X11/Xutil.h>
|
|
|
|
#ifndef NeedFunctionPrototypes /* Kludge */
|
|
#error "X11 Release 3 (or earlier) no longer supported"
|
|
#endif
|
|
|
|
#if XlibSpecificationRelease >= 5
|
|
# define XLIB_RELEASE_5_OR_LATER
|
|
#endif
|
|
|
|
#if XlibSpecificationRelease >= 6
|
|
# define XLIB_RELEASE_6_OR_LATER
|
|
#endif
|
|
|
|
#include "scheme48.h"
|
|
|
|
|
|
#define S48_NULL_P(x) S48_EQ(x, S48_NULL)
|
|
#define S48_FALSE_P(x) S48_EQ(x, S48_FALSE)
|
|
#define S48_TRUE_P(x) S48_EQ(x, S48_TRUE)
|
|
|
|
/* Extraction-Macros for the new types, from their s48_value wrapping.
|
|
*/
|
|
|
|
#define SCX_EXTRACT_DISPLAY(x) (Display*)s48_extract_integer(x)
|
|
#define SCX_ENTER_DISPLAY(x) s48_enter_integer((long)x)
|
|
#define SCX_EXTRACT_WINDOW(x) (Window)s48_extract_integer(x)
|
|
#define SCX_ENTER_WINDOW(x) s48_enter_integer((long)x)
|
|
#define SCX_EXTRACT_COLOR(x) (XColor*)S48_EXTRACT_VALUE_POINTER(x, XColor)
|
|
#define SCX_EXTRACT_COLORMAP(x) (Colormap)s48_extract_integer(x)
|
|
#define SCX_ENTER_COLORMAP(x) s48_enter_integer((long)x)
|
|
#define SCX_EXTRACT_PIXEL(x) (unsigned long)s48_extract_integer(x)
|
|
#define SCX_ENTER_PIXEL(x) s48_enter_integer((long)x)
|
|
#define SCX_EXTRACT_GCONTEXT(x) (GC)s48_extract_integer(x)
|
|
#define SCX_ENTER_GCONTEXT(x) s48_enter_integer((long)x)
|
|
#define SCX_ENTER_PIXMAP(x) s48_enter_integer((long)x)
|
|
#define SCX_EXTRACT_PIXMAP(x) (Pixmap)s48_extract_integer(x)
|
|
#define SCX_EXTRACT_DRAWABLE(x) (Drawable)s48_extract_integer(x)
|
|
#define SCX_ENTER_ATOM(x) s48_enter_integer((long)x)
|
|
#define SCX_EXTRACT_ATOM(x) (Atom)s48_extract_integer(x)
|
|
#define SCX_ENTER_TIME(x) s48_enter_integer(x)
|
|
#define SCX_EXTRACT_TIME(x) (int)s48_extract_integer(x)
|
|
#define SCX_EXTRACT_CURSOR(x) (Cursor)s48_extract_integer(x)
|
|
#define SCX_ENTER_CURSOR(x) s48_enter_integer((long)x)
|
|
#define SCX_ENTER_FONT(x) s48_enter_integer((long)x)
|
|
#define SCX_EXTRACT_FONT(x) (Font)s48_extract_integer(x)
|
|
#define SCX_ENTER_FONTSTRUCT(x) s48_enter_integer((long)x)
|
|
#define SCX_EXTRACT_FONTSTRUCT(x) (XFontStruct*)s48_extract_integer(x)
|
|
#define SCX_ENTER_VISUAL(x) s48_enter_integer((long)x)
|
|
#define SCX_EXTRACT_VISUAL(x) (Visual*)s48_extract_integer(x)
|
|
#define SCX_ENTER_REGION(x) s48_enter_integer((long)x)
|
|
#define SCX_EXTRACT_REGION(x) (Region)s48_extract_integer(x)
|
|
|
|
extern unsigned long AList_To_XWindowChanges(s48_value alist,
|
|
XWindowChanges* WC);
|
|
|