diff --git a/c/xlib/Makefile b/c/xlib/Makefile index 0fa8e7d..2aadf41 100644 --- a/c/xlib/Makefile +++ b/c/xlib/Makefile @@ -1,8 +1,9 @@ +OBJECTS = main.o display.o window.o type.o color.o colormap.o pixel.o gcontext.o event.o pixmap.o graphics.o font.o + +$(OBJECTS): xlib.h .c.o: gcc -g -c -I /usr/X11R6/include/ -I /afs/wsi/home/dfreese/scsh-0.6/c/ -o $@ $< -OBJECTS = main.o display.o window.o type.o color.o colormap.o pixel.o gcontext.o event.o pixmap.o graphics.o - test: $(OBJECTS) gcc -g -o test -L /afs/wsi/home/dfreese/i386_fbsd43/scsh-0.6/lib/scsh/ \ -L /usr/X11R6/lib \ diff --git a/c/xlib/main.c b/c/xlib/main.c index ca19e8c..2d30b93 100644 --- a/c/xlib/main.c +++ b/c/xlib/main.c @@ -10,6 +10,7 @@ extern void s48_init_gcontext(); extern void s48_init_event(); extern void s48_init_pixmap(); extern void s48_init_graphics(); +extern void s48_init_font(); int main(){ s48_add_external_init(s48_init_window); @@ -23,6 +24,7 @@ int main(){ s48_add_external_init(s48_init_event); s48_add_external_init(s48_init_pixmap); s48_add_external_init(s48_init_graphics); + s48_add_external_init(s48_init_font); s48_main(8000000, 64000, "/afs/wsi/home/dfreese/i386_fbsd43/scsh-0.6/lib/scheme48/scsh.image", diff --git a/c/xlib/xlib.h b/c/xlib/xlib.h index 1b73279..0b044f8 100644 --- a/c/xlib/xlib.h +++ b/c/xlib/xlib.h @@ -21,9 +21,10 @@ #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. */ @@ -48,8 +49,10 @@ #define EXTRACT_TIME(x) S48_SYMBOL_P(x) ? CurrentTime : (int)s48_extract_integer(x) // TODO: #define ENTER_VISUAL(x) S48_FALSE -#define ENTER_FONT(x) S48_FALSE -#define EXTRACT_FONT(x) (Font)0 +#define ENTER_FONT(x) s48_enter_integer((long)x) +#define EXTRACT_FONT(x) (Font)s48_extract_integer(x) +#define ENTER_FONTSTRUCT(x) s48_enter_integer((long)x) +#define EXTRACT_FONTSTRUCT(x) (XFontStruct*)s48_extract_integer(x) /*