#include #include #include #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) extern char* s48_extract_symbol(s48_value); /* 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) 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) #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); typedef struct { Window root; int x, y, width, height, border_width, depth; } GEOMETRY; typedef struct { char *name; unsigned long val; } SYMDESCR; extern SYMDESCR Func_Syms[], Bit_Grav_Syms[], Event_Syms[], Error_Syms[], 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[], Event_Mask_Syms[], Visual_Class_Syms[], Color_Flags_Syms[];