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
|
|
|
|
2001-07-19 11:29:18 -04:00
|
|
|
extern char* s48_extract_symbol(s48_value);
|
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)
|
|
|
|
#define SCX_ENTER_TIME(x) x == CurrentTime ? s48_enter_symbol("now") : s48_enter_integer(x)
|
|
|
|
#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
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
Window root;
|
|
|
|
int x, y, width, height, border_width, depth;
|
|
|
|
} GEOMETRY;
|
|
|
|
|
2001-06-11 11:25:39 -04:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char *name;
|
|
|
|
unsigned long val;
|
|
|
|
} SYMDESCR;
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-05-08 10:21:00 -04:00
|
|
|
extern SYMDESCR Func_Syms[], Bit_Grav_Syms[], Event_Syms[], Error_Syms[],
|
2001-07-16 07:57:12 -04:00
|
|
|
Grav_Syms[], Backing_Store_Syms[], Class_Syms[], Stack_Mode_Syms[],
|
|
|
|
Line_Style_Syms[], State_Syms[], Cap_Style_Syms[], Join_Style_Syms[],
|
|
|
|
Map_State_Syms[], Fill_Style_Syms[], Fill_Rule_Syms[], Arc_Mode_Syms[],
|
|
|
|
Subwin_Mode_Syms[], Button_Syms[], Cross_Mode_Syms[], Cross_Detail_Syms[],
|
|
|
|
Focus_Detail_Syms[], Place_Syms[], Visibility_Syms[], Prop_Syms[],
|
|
|
|
Mapping_Syms[], Direction_Syms[], Shape_Syms[], Propmode_Syms[],
|
|
|
|
Grabstatus_Syms[], Allow_Events_Syms[], Revert_Syms[], Polyshape_Syms[],
|
|
|
|
Initial_State_Syms[], Bitmapstatus_Syms[], Circulate_Syms[],
|
|
|
|
Ordering_Syms[], Byte_Order_Syms[], Saveset_Syms[], Closemode_Syms[],
|
2001-09-20 10:41:01 -04:00
|
|
|
Event_Mask_Syms[], Visual_Class_Syms[], Color_Flags_Syms[];
|