summaryrefslogtreecommitdiff
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-10-18 16:57:44 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-10-18 16:57:44 +0400
commitd141d7011296265b0c2a6432bed9317614abf019 (patch)
treeeffac9c22d9391c5527e5d9990b1fdbe4647e556 /src/termhooks.h
parentf0ff1cd5762b2485add7b2e5a1da52eab733a873 (diff)
Remove port-specific display name lists to avoid extra
complexity and data duplication with display info lists. * xterm.h (x_display_name_list): Remove declaration. * xterm.c (x_display_name_list): Remove. (x_term_init, x_delete_display, syms_of_xterm): Adjust users. * xfns.c (x_display_info_for_name, Fx_display_list): Likewise. Use x_display_list where appropriate. * w32term.h (w32_display_name_list): Remove declaration. * w32term.c (w32_display_name_list): Remove. (w32_initialize_display_info, x_delete_display, syms_of_w32term): Adjust users. * w32fns.c (x_display_info_for_name, Fx_display_list): Likewise. Use x_display_list where appropriate. * nsterm.h (ns_display_name_list): Remove declaration. * nsterm.m (ns_display_name_list): Remove. (ns_term_init, syms_of_nsterm): Adjust users. * nsfns.m (ns_display_info_for_name, Fx_display_list): Likewise. Use x_display_list where appropriate. * termhooks.h (TERMINAL_FONT_CACHE): New macro. * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER. (mark_terminals): Mark per-terminal font cache.
Diffstat (limited to 'src/termhooks.h')
-rw-r--r--src/termhooks.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/termhooks.h b/src/termhooks.h
index 31825a4c95..042a493882 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -623,6 +623,19 @@ extern struct terminal *terminal_list;
(((d)->type != output_termcap && (d)->type != output_msdos_raw) \
|| (d)->display_info.tty->input)
+/* Return font cache data for the specified terminal. The historical
+ name is grossly misleading, actually it is (NAME . FONT-LIST-CACHE). */
+#if defined (HAVE_X_WINDOWS)
+#define TERMINAL_FONT_CACHE(t) \
+ (t->type == output_x_window ? t->display_info.x->name_list_element : Qnil)
+#elif defined (HAVE_NTGUI)
+#define TERMINAL_FONT_CACHE(t) \
+ (t->type == output_w32 ? t->display_info.w32->name_list_element : Qnil)
+#elif defined (HAVE_NS)
+#define TERMINAL_FONT_CACHE(t) \
+ (t->type == output_ns ? t->display_info.ns->name_list_element : Qnil)
+#endif
+
extern struct terminal *get_terminal (Lisp_Object terminal, bool);
extern struct terminal *create_terminal (void);
extern void delete_terminal (struct terminal *);