aboutsummaryrefslogtreecommitdiffstats
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorJoakim Verona2014-06-04 23:50:06 +0200
committerJoakim Verona2014-06-04 23:50:06 +0200
commitce8171797dafbde765170b79e5f154afc4872e86 (patch)
tree264b357b484de24929a3f2d20a34e0e43c006a15 /src/termhooks.h
parentc1c9aa247cab9148916b367e719219ea0f055adb (diff)
parentb5d6fe3bf6e728c82a3ff63723d75519f7853716 (diff)
downloademacs-ce8171797dafbde765170b79e5f154afc4872e86.tar.gz
emacs-ce8171797dafbde765170b79e5f154afc4872e86.zip
upstream
Diffstat (limited to 'src/termhooks.h')
-rw-r--r--src/termhooks.h66
1 files changed, 34 insertions, 32 deletions
diff --git a/src/termhooks.h b/src/termhooks.h
index 1efdc7222cb..2b90dbc7aba 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -1,6 +1,6 @@
1/* Parameters and display hooks for terminal devices. 1/* Parameters and display hooks for terminal devices.
2 2
3Copyright (C) 1985-1986, 1993-1994, 2001-2013 Free Software Foundation, 3Copyright (C) 1985-1986, 1993-1994, 2001-2014 Free Software Foundation,
4Inc. 4Inc.
5 5
6This file is part of GNU Emacs. 6This file is part of GNU Emacs.
@@ -26,9 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#include "systime.h" /* for Time */ 26#include "systime.h" /* for Time */
27 27
28INLINE_HEADER_BEGIN 28INLINE_HEADER_BEGIN
29#ifndef TERMHOOKS_INLINE
30# define TERMHOOKS_INLINE INLINE
31#endif
32 29
33enum scroll_bar_part { 30enum scroll_bar_part {
34 scroll_bar_nowhere = -1, 31 scroll_bar_nowhere = -1,
@@ -249,7 +246,6 @@ struct input_event
249 For a mouse event, this is the button number. 246 For a mouse event, this is the button number.
250 For a HELP_EVENT, this is the position within the object 247 For a HELP_EVENT, this is the position within the object
251 (stored in ARG below) where the help was found. */ 248 (stored in ARG below) where the help was found. */
252 /* In WindowsNT, for a mouse wheel event, this is the delta. */
253 ptrdiff_t code; 249 ptrdiff_t code;
254 enum scroll_bar_part part; 250 enum scroll_bar_part part;
255 251
@@ -408,23 +404,6 @@ struct terminal
408 the function `set-keyboard-coding-system'. */ 404 the function `set-keyboard-coding-system'. */
409 struct coding_system *keyboard_coding; 405 struct coding_system *keyboard_coding;
410 406
411 /* Terminal characteristics. */
412 /* XXX Are these really used on non-termcap displays? */
413
414 int must_write_spaces; /* Nonzero means spaces in the text must
415 actually be output; can't just skip over
416 some columns to leave them blank. */
417 int fast_clear_end_of_line; /* Nonzero means terminal has a `ce' string. */
418
419 int line_ins_del_ok; /* Terminal can insert and delete lines. */
420 int char_ins_del_ok; /* Terminal can insert and delete chars. */
421 int scroll_region_ok; /* Terminal supports setting the scroll
422 window. */
423 int scroll_region_cost; /* Cost of setting the scroll window,
424 measured in characters. */
425 int memory_below_frame; /* Terminal remembers lines scrolled
426 off bottom. */
427
428 /* Window-based redisplay interface for this device (0 for tty 407 /* Window-based redisplay interface for this device (0 for tty
429 devices). */ 408 devices). */
430 struct redisplay_interface *rif; 409 struct redisplay_interface *rif;
@@ -611,12 +590,12 @@ struct terminal
611 590
612/* Most code should use these functions to set Lisp fields in struct 591/* Most code should use these functions to set Lisp fields in struct
613 terminal. */ 592 terminal. */
614TERMHOOKS_INLINE void 593INLINE void
615tset_charset_list (struct terminal *t, Lisp_Object val) 594tset_charset_list (struct terminal *t, Lisp_Object val)
616{ 595{
617 t->charset_list = val; 596 t->charset_list = val;
618} 597}
619TERMHOOKS_INLINE void 598INLINE void
620tset_selection_alist (struct terminal *t, Lisp_Object val) 599tset_selection_alist (struct terminal *t, Lisp_Object val)
621{ 600{
622 t->Vselection_alist = val; 601 t->Vselection_alist = val;
@@ -625,13 +604,12 @@ tset_selection_alist (struct terminal *t, Lisp_Object val)
625/* Chain of all terminal devices currently in use. */ 604/* Chain of all terminal devices currently in use. */
626extern struct terminal *terminal_list; 605extern struct terminal *terminal_list;
627 606
628#define FRAME_MUST_WRITE_SPACES(f) ((f)->terminal->must_write_spaces) 607#define FRAME_MUST_WRITE_SPACES(f) (FRAME_TTY (f)->must_write_spaces)
629#define FRAME_FAST_CLEAR_END_OF_LINE(f) ((f)->terminal->fast_clear_end_of_line) 608#define FRAME_LINE_INS_DEL_OK(f) (FRAME_TTY (f)->line_ins_del_ok)
630#define FRAME_LINE_INS_DEL_OK(f) ((f)->terminal->line_ins_del_ok) 609#define FRAME_CHAR_INS_DEL_OK(f) (FRAME_TTY (f)->char_ins_del_ok)
631#define FRAME_CHAR_INS_DEL_OK(f) ((f)->terminal->char_ins_del_ok) 610#define FRAME_SCROLL_REGION_OK(f) (FRAME_TTY (f)->scroll_region_ok)
632#define FRAME_SCROLL_REGION_OK(f) ((f)->terminal->scroll_region_ok) 611#define FRAME_SCROLL_REGION_COST(f) (FRAME_TTY (f)->scroll_region_cost)
633#define FRAME_SCROLL_REGION_COST(f) ((f)->terminal->scroll_region_cost) 612#define FRAME_MEMORY_BELOW_FRAME(f) (FRAME_TTY (f)->memory_below_frame)
634#define FRAME_MEMORY_BELOW_FRAME(f) ((f)->terminal->memory_below_frame)
635 613
636#define FRAME_TERMINAL_CODING(f) ((f)->terminal->terminal_coding) 614#define FRAME_TERMINAL_CODING(f) ((f)->terminal->terminal_coding)
637#define FRAME_KEYBOARD_CODING(f) ((f)->terminal->keyboard_coding) 615#define FRAME_KEYBOARD_CODING(f) ((f)->terminal->keyboard_coding)
@@ -648,20 +626,44 @@ extern struct terminal *terminal_list;
648 (((d)->type != output_termcap && (d)->type != output_msdos_raw) \ 626 (((d)->type != output_termcap && (d)->type != output_msdos_raw) \
649 || (d)->display_info.tty->input) 627 || (d)->display_info.tty->input)
650 628
629/* Return font cache data for the specified terminal. The historical
630 name is grossly misleading, actually it is (NAME . FONT-LIST-CACHE). */
631#if defined (HAVE_X_WINDOWS)
632#define TERMINAL_FONT_CACHE(t) \
633 (t->type == output_x_window ? t->display_info.x->name_list_element : Qnil)
634#elif defined (HAVE_NTGUI)
635#define TERMINAL_FONT_CACHE(t) \
636 (t->type == output_w32 ? t->display_info.w32->name_list_element : Qnil)
637#elif defined (HAVE_NS)
638#define TERMINAL_FONT_CACHE(t) \
639 (t->type == output_ns ? t->display_info.ns->name_list_element : Qnil)
640#endif
641
651extern struct terminal *get_terminal (Lisp_Object terminal, bool); 642extern struct terminal *get_terminal (Lisp_Object terminal, bool);
652extern struct terminal *create_terminal (void); 643extern struct terminal *create_terminal (enum output_method,
644 struct redisplay_interface *);
653extern void delete_terminal (struct terminal *); 645extern void delete_terminal (struct terminal *);
654 646
655/* The initial terminal device, created by initial_term_init. */ 647/* The initial terminal device, created by initial_term_init. */
656extern struct terminal *initial_terminal; 648extern struct terminal *initial_terminal;
657 649
650#ifdef DOS_NT
658extern unsigned char *encode_terminal_code (struct glyph *, int, 651extern unsigned char *encode_terminal_code (struct glyph *, int,
659 struct coding_system *); 652 struct coding_system *);
653#endif
660 654
661#ifdef HAVE_GPM 655#ifdef HAVE_GPM
662extern void close_gpm (int gpm_fd); 656extern void close_gpm (int gpm_fd);
663#endif 657#endif
664 658
659#ifdef WINDOWSNT
660extern int cursorX (struct tty_display_info *);
661extern int cursorY (struct tty_display_info *);
662#else
663#define cursorX(t) curX(t)
664#define cursorY(t) curY(t)
665#endif
666
665INLINE_HEADER_END 667INLINE_HEADER_END
666 668
667#endif /* EMACS_TERMHOOKS_H */ 669#endif /* EMACS_TERMHOOKS_H */