+ return FALSE;
+}
+
+/*
+ * set or clear the "raw mouse message" mode
+ */
+void set_raw_mouse_mode(int activate)
+{
+ /* FIXME: currently ignored */
+}
+
+void request_resize(int w, int h)
+{
+ /* FIXME: currently ignored */
+}
+
+void palette_set(int n, int r, int g, int b)
+{
+ /* FIXME: currently ignored */
+}
+void palette_reset(void)
+{
+ /* FIXME: currently ignored */
+}
+
+void write_clip(wchar_t * data, int len, int must_deselect)
+{
+ /* FIXME: currently ignored */
+}
+
+void get_clip(wchar_t ** p, int *len)
+{
+ if (p) {
+ /* FIXME: currently nonfunctional */
+ *p = NULL;
+ *len = 0;
+ }
+}
+
+void set_title(char *title)
+{
+ /* FIXME: currently ignored */
+}
+
+void set_icon(char *title)
+{
+ /* FIXME: currently ignored */
+}
+
+void set_sbar(int total, int start, int page)
+{
+ /* FIXME: currently ignored */
+}
+
+void sys_cursor(int x, int y)
+{
+ /*
+ * This is meaningless under X.
+ */
+}
+
+void beep(int mode)
+{
+ gdk_beep();
+}
+
+int CharWidth(Context ctx, int uc)
+{
+ /*
+ * Under X, any fixed-width font really _is_ fixed-width.
+ * Double-width characters will be dealt with using a separate
+ * font. For the moment we can simply return 1.
+ */
+ return 1;
+}
+
+Context get_ctx(void)
+{
+ GdkGC *gc = gdk_gc_new(inst->area->window);
+ return gc;
+}
+
+void free_ctx(Context ctx)
+{
+ GdkGC *gc = (GdkGC *)ctx;
+ gdk_gc_unref(gc);
+}
+
+/*
+ * Draw a line of text in the window, at given character
+ * coordinates, in given attributes.
+ *
+ * We are allowed to fiddle with the contents of `text'.
+ */
+void do_text(Context ctx, int x, int y, char *text, int len,
+ unsigned long attr, int lattr)
+{
+ GdkColor fg, bg;
+
+ GdkGC *gc = (GdkGC *)ctx;
+ fg.red = fg.green = fg.blue = 65535;
+ bg.red = bg.green = bg.blue = 65535;
+ gdk_gc_set_foreground(gc, &fg);
+ gdk_gc_set_background(gc, &bg);
+
+ gdk_draw_text(inst->area->window, inst->fonts[0], inst->white_gc,
+ x*9, y*15 + inst->fonts[0]->ascent, text, len);
+}
+
+void do_cursor(Context ctx, int x, int y, char *text, int len,
+ unsigned long attr, int lattr)
+{
+ /* FIXME: passive cursor NYI */
+ if (attr & TATTR_PASCURS) {
+ attr &= ~TATTR_PASCURS;
+ attr |= TATTR_ACTCURS;
+ }
+ do_text(ctx, x, y, text, len, attr, lattr);
+}
+
+void modalfatalbox(char *p, ...)
+{
+ va_list ap;
+ fprintf(stderr, "FATAL ERROR: ");
+ va_start(ap, p);
+ vfprintf(stderr, p, ap);
+ va_end(ap);
+ fputc('\n', stderr);
+ exit(1);