/* -*-C-*-
-$Id: os2pm.c,v 1.15 1995/05/16 09:20:06 cph Exp $
+$Id: os2pm.c,v 1.16 1995/05/19 21:04:16 cph Exp $
Copyright (c) 1994-95 Massachusetts Institute of Technology
#define INCL_WIN
#define INCL_GPI
#include "os2.h"
+
+extern psid_t OS2_console_psid (void);
+extern void OS2_console_font_change_hook (font_metrics_t *);
\f
typedef enum { pst_window, pst_memory } pst_t;
= (OS2_message_transaction ((PS_QID (ps)), message, mt_ps_set_font_reply));
metrics = (SM_PS_SET_FONT_REPLY_METRICS (message));
OS2_destroy_message (message);
+ if ((metrics != 0) && (psid == (OS2_console_psid ())))
+ OS2_console_font_change_hook (metrics);
return (metrics);
}
/* -*-C-*-
-$Id: os2pmcon.c,v 1.7 1995/05/07 05:53:20 cph Exp $
+$Id: os2pmcon.c,v 1.8 1995/05/19 21:04:27 cph Exp $
Copyright (c) 1994-95 Massachusetts Institute of Technology
static unsigned short console_width;
static unsigned short console_height;
static char * console_chars;
-static font_metrics_t * metrics;
+static font_metrics_t * console_metrics;
static unsigned short point_x;
static unsigned short point_y;
static int console_visiblep;
static wid_t console_wid;
static psid_t console_psid;
-#define CHAR_WIDTH (FONT_METRICS_WIDTH (metrics))
-#define CHAR_HEIGHT (FONT_METRICS_HEIGHT (metrics))
-#define CHAR_DESCENDER (FONT_METRICS_DESCENDER (metrics))
+#define CHAR_WIDTH (FONT_METRICS_WIDTH (console_metrics))
+#define CHAR_HEIGHT (FONT_METRICS_HEIGHT (console_metrics))
+#define CHAR_DESCENDER (FONT_METRICS_DESCENDER (console_metrics))
#define CHAR_LOC(x, y) (& (console_chars [((y) * console_width) + (x)]))
#define FASTFILL(p, n, c) \
}
OS2_window_permanent (console_wid);
console_psid = (OS2_window_client_ps (console_wid));
- metrics = (OS2_ps_set_font (console_psid, 1, "4.System VIO"));
- if (metrics == 0)
+ console_metrics = (OS2_ps_set_font (console_psid, 1, "4.System VIO"));
+ if (console_metrics == 0)
OS2_logic_error ("Unable to find 4 point System VIO font.");
OS2_window_set_grid (console_wid, CHAR_WIDTH, CHAR_HEIGHT);
OS2_window_shape_cursor
{
return (console_wid);
}
+
+psid_t
+OS2_console_psid (void)
+{
+ return (console_psid);
+}
+
+void
+OS2_console_font_change_hook (font_metrics_t * metrics)
+{
+ font_metrics = metrics;
+}
\f
static void
grab_console_lock (void)