defaults as well as for setting the class hint.
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11.h,v 1.11 1992/02/08 14:54:21 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11.h,v 1.12 1992/02/10 21:09:03 cph Exp $
Copyright (c) 1989-92 Massachusetts Institute of Technology
extern char * EXFUN
(x_get_default,
(Display * display,
- char * resource_name,
- char * resource_class,
- char * property_name,
- char * property_class,
+ CONST char * resource_name,
+ CONST char * resource_class,
+ CONST char * property_name,
+ CONST char * property_class,
char * sdefault));
extern void EXFUN
(x_default_attributes,
(Display * display,
- char * resource_name,
- char * resource_class,
+ CONST char * resource_name,
+ CONST char * resource_class,
struct drawing_attributes * attributes));
extern struct xwindow * EXFUN
extern void EXFUN
(xw_set_wm_icon_name, (struct xwindow * xw, CONST char * name));
+extern void EXFUN
+ (x_decode_window_map_arg,
+ (SCHEME_OBJECT map_arg,
+ CONST char ** resource_class,
+ CONST char ** resource_name,
+ int * map_p));
+
extern void EXFUN
(xw_make_window_map,
(struct xwindow * xw,
CONST char * resource_name,
CONST char * resource_class,
- SCHEME_OBJECT map_arg));
+ int map_p));
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11base.c,v 1.33 1992/02/09 03:48:11 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11base.c,v 1.34 1992/02/10 21:09:31 cph Exp $
Copyright (c) 1989-92 Massachusetts Institute of Technology
(display, resource_name, resource_class,
property_name, property_class, sdefault),
Display * display AND
- char * resource_name AND
- char * resource_class AND
- char * property_name AND
- char * property_class AND
+ CONST char * resource_name AND
+ CONST char * resource_class AND
+ CONST char * property_name AND
+ CONST char * property_class AND
char * sdefault)
{
char * result = (XGetDefault (display, resource_name, property_name));
(display, resource_class, resource_name,
property_name, property_class, default_color),
Display * display AND
- char * resource_name AND
- char * resource_class AND
- char * property_name AND
- char * property_class AND
+ CONST char * resource_name AND
+ CONST char * resource_class AND
+ CONST char * property_name AND
+ CONST char * property_class AND
unsigned long default_color)
{
char * color_name =
DEFUN (x_default_attributes,
(display, resource_name, resource_class, attributes),
Display * display AND
- char * resource_name AND
- char * resource_class AND
+ CONST char * resource_name AND
+ CONST char * resource_class AND
struct drawing_attributes * attributes)
{
int screen_number = (DefaultScreen (display));
}
void
-DEFUN (xw_make_window_map, (xw, resource_name, resource_class, map_arg),
- struct xwindow * xw AND
- CONST char * resource_name AND
- CONST char * resource_class AND
- SCHEME_OBJECT map_arg)
+DEFUN (x_decode_window_map_arg, (map_arg, resource_name, resource_class),
+ SCHEME_OBJECT map_arg AND
+ CONST char ** resource_name AND
+ CONST char ** resource_class AND
+ int * map_p)
{
- int map_p = 0;
+ (*map_p) = 0;
if (map_arg == SHARP_F)
- map_p = 1;
+ (*map_p) = 1;
else if ((PAIR_P (map_arg))
&& (STRING_P (PAIR_CAR (map_arg)))
&& (STRING_P (PAIR_CDR (map_arg))))
{
- resource_class = ((CONST char *) (STRING_LOC ((PAIR_CDR (map_arg)), 0)));
- resource_name = ((CONST char *) (STRING_LOC ((PAIR_CAR (map_arg)), 0)));
- map_p = 1;
+ (*resource_name) = ((CONST char *) (STRING_LOC ((PAIR_CAR (map_arg)), 0)));
+ (*resource_class) = ((CONST char *) (STRING_LOC ((PAIR_CDR (map_arg)), 0)));
+ (*map_p) = 1;
}
+}
+
+void
+DEFUN (xw_make_window_map, (xw, resource_name, resource_class, map_p),
+ struct xwindow * xw AND
+ CONST char * resource_name AND
+ CONST char * resource_class AND
+ int map_p)
+{
xw_set_class_hint (xw, resource_name, resource_class);
if (map_p)
{
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11graph.c,v 1.19 1992/02/08 14:54:24 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11graph.c,v 1.20 1992/02/10 21:10:14 cph Exp $
Copyright (c) 1989-92 Massachusetts Institute of Technology
struct drawing_attributes attributes;
struct xwindow_methods methods;
XSetWindowAttributes wattributes;
+ CONST char * resource_name;
+ CONST char * resource_class;
+ int map_p;
+
+ x_decode_window_map_arg
+ ((ARG_REF (3)), (&resource_name), (&resource_class), (&map_p));
x_default_attributes
- (display, RESOURCE_NAME, RESOURCE_CLASS, (&attributes));
+ (display, resource_name, resource_class, (&attributes));
(wattributes . background_pixel) = (attributes . background_pixel);
(wattributes . border_pixel) = (attributes . border_pixel);
(wattributes . backing_store) = Always;
(XGeometry (display, (DefaultScreen (display)),
(((ARG_REF (2)) == SHARP_F)
? (x_get_default
- (display, RESOURCE_NAME, RESOURCE_CLASS,
+ (display, resource_name, resource_class,
"geometry", "Geometry", 0))
: (STRING_ARG (2))),
DEFAULT_GEOMETRY, (attributes . border_width),
xw_set_wm_name (xw, "scheme-graphics");
xw_set_wm_icon_name (xw, "scheme-graphics");
XSelectInput (display, window, StructureNotifyMask);
- xw_make_window_map (xw, RESOURCE_NAME, RESOURCE_CLASS, (ARG_REF (3)));
+ xw_make_window_map (xw, resource_name, resource_class, map_p);
PRIMITIVE_RETURN (XW_TO_OBJECT (xw));
}
}
/* -*-C-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11term.c,v 1.16 1992/02/08 14:54:26 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11term.c,v 1.17 1992/02/10 21:09:52 cph Exp $
Copyright (c) 1989-92 Massachusetts Institute of Technology
Display * display = (XD_DISPLAY (xd));
struct drawing_attributes attributes;
struct xwindow_methods methods;
+ CONST char * resource_name;
+ CONST char * resource_class;
+ int map_p;
+
+ x_decode_window_map_arg
+ ((ARG_REF (3)), (&resource_name), (&resource_class), (&map_p));
x_default_attributes
- (display, RESOURCE_NAME, RESOURCE_CLASS, (&attributes));
+ (display, resource_name, resource_class, (&attributes));
(methods . deallocator) = xterm_deallocate;
(methods . event_processor) = xterm_process_event;
(methods . x_coordinate_map) = xterm_x_coordinate_map;
(display, (DefaultScreen (display)),
(((ARG_REF (2)) == SHARP_F)
? (x_get_default
- (display, RESOURCE_NAME, RESOURCE_CLASS,
+ (display, resource_name, resource_class,
"geometry", "Geometry", 0))
: (STRING_ARG (2))),
DEFAULT_GEOMETRY, (attributes . border_width),
xw_set_wm_input_hint (xw, 1);
xw_set_wm_name (xw, "scheme-terminal");
xw_set_wm_icon_name (xw, "scheme-terminal");
- xw_make_window_map (xw, RESOURCE_NAME, RESOURCE_CLASS, (ARG_REF (3)));
+ xw_make_window_map (xw, resource_name, resource_class, map_p);
PRIMITIVE_RETURN (XW_TO_OBJECT (xw));
}
}