2001-05-08 10:21:00 -04:00
|
|
|
#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
|
|
|
|
|
2001-06-11 11:25:39 -04:00
|
|
|
#include "scheme48.h"
|
2001-05-08 10:21:00 -04:00
|
|
|
|
2001-06-11 11:25:39 -04:00
|
|
|
|
|
|
|
#define S48_NULL_P(x) S48_EQ(x, S48_NULL)
|
|
|
|
#define S48_FALSE_P(x) S48_EQ(x, S48_FALSE)
|
2001-07-19 11:29:18 -04:00
|
|
|
#define S48_TRUE_P(x) S48_EQ(x, S48_TRUE)
|
2001-06-11 11:25:39 -04:00
|
|
|
|
2002-02-08 12:09:43 -05:00
|
|
|
extern s48_value symbol_now(); // defined in init.c
|
2001-06-11 11:25:39 -04:00
|
|
|
|
|
|
|
/* Extraction-Macros for the new types, from their s48_value wrapping.
|
|
|
|
*/
|
|
|
|
|
2001-07-31 10:51:21 -04:00
|
|
|
#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)
|
2002-02-08 12:09:43 -05:00
|
|
|
#define SCX_ENTER_TIME(x) x == CurrentTime ? symbol_now() : s48_enter_integer(x)
|
2001-07-31 10:51:21 -04:00
|
|
|
#define SCX_EXTRACT_TIME(x) S48_SYMBOL_P(x) ? CurrentTime : (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)
|
2001-09-20 10:41:01 -04:00
|
|
|
#define SCX_ENTER_VISUAL(x) s48_enter_integer((long)x)
|
|
|
|
#define SCX_EXTRACT_VISUAL(x) (Visual*)s48_extract_integer(x)
|
2001-09-25 08:56:15 -04:00
|
|
|
#define SCX_ENTER_REGION(x) s48_enter_integer((long)x)
|
|
|
|
#define SCX_EXTRACT_REGION(x) (Region)s48_extract_integer(x)
|
2001-05-08 10:21:00 -04:00
|
|
|
|
2001-09-20 10:41:01 -04:00
|
|
|
extern unsigned long AList_To_XWindowChanges(s48_value alist,
|
|
|
|
XWindowChanges* WC);
|
2001-05-08 10:21:00 -04:00
|
|
|
|