diff options
| author | Joakim Verona | 2014-06-04 23:50:06 +0200 |
|---|---|---|
| committer | Joakim Verona | 2014-06-04 23:50:06 +0200 |
| commit | ce8171797dafbde765170b79e5f154afc4872e86 (patch) | |
| tree | 264b357b484de24929a3f2d20a34e0e43c006a15 /src/termhooks.h | |
| parent | c1c9aa247cab9148916b367e719219ea0f055adb (diff) | |
| parent | b5d6fe3bf6e728c82a3ff63723d75519f7853716 (diff) | |
| download | emacs-ce8171797dafbde765170b79e5f154afc4872e86.tar.gz emacs-ce8171797dafbde765170b79e5f154afc4872e86.zip | |
upstream
Diffstat (limited to 'src/termhooks.h')
| -rw-r--r-- | src/termhooks.h | 66 |
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 | ||
| 3 | Copyright (C) 1985-1986, 1993-1994, 2001-2013 Free Software Foundation, | 3 | Copyright (C) 1985-1986, 1993-1994, 2001-2014 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This 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 | ||
| 28 | INLINE_HEADER_BEGIN | 28 | INLINE_HEADER_BEGIN |
| 29 | #ifndef TERMHOOKS_INLINE | ||
| 30 | # define TERMHOOKS_INLINE INLINE | ||
| 31 | #endif | ||
| 32 | 29 | ||
| 33 | enum scroll_bar_part { | 30 | enum 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. */ |
| 614 | TERMHOOKS_INLINE void | 593 | INLINE void |
| 615 | tset_charset_list (struct terminal *t, Lisp_Object val) | 594 | tset_charset_list (struct terminal *t, Lisp_Object val) |
| 616 | { | 595 | { |
| 617 | t->charset_list = val; | 596 | t->charset_list = val; |
| 618 | } | 597 | } |
| 619 | TERMHOOKS_INLINE void | 598 | INLINE void |
| 620 | tset_selection_alist (struct terminal *t, Lisp_Object val) | 599 | tset_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. */ |
| 626 | extern struct terminal *terminal_list; | 605 | extern 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 | |||
| 651 | extern struct terminal *get_terminal (Lisp_Object terminal, bool); | 642 | extern struct terminal *get_terminal (Lisp_Object terminal, bool); |
| 652 | extern struct terminal *create_terminal (void); | 643 | extern struct terminal *create_terminal (enum output_method, |
| 644 | struct redisplay_interface *); | ||
| 653 | extern void delete_terminal (struct terminal *); | 645 | extern 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. */ |
| 656 | extern struct terminal *initial_terminal; | 648 | extern struct terminal *initial_terminal; |
| 657 | 649 | ||
| 650 | #ifdef DOS_NT | ||
| 658 | extern unsigned char *encode_terminal_code (struct glyph *, int, | 651 | extern 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 |
| 662 | extern void close_gpm (int gpm_fd); | 656 | extern void close_gpm (int gpm_fd); |
| 663 | #endif | 657 | #endif |
| 664 | 658 | ||
| 659 | #ifdef WINDOWSNT | ||
| 660 | extern int cursorX (struct tty_display_info *); | ||
| 661 | extern int cursorY (struct tty_display_info *); | ||
| 662 | #else | ||
| 663 | #define cursorX(t) curX(t) | ||
| 664 | #define cursorY(t) curY(t) | ||
| 665 | #endif | ||
| 666 | |||
| 665 | INLINE_HEADER_END | 667 | INLINE_HEADER_END |
| 666 | 668 | ||
| 667 | #endif /* EMACS_TERMHOOKS_H */ | 669 | #endif /* EMACS_TERMHOOKS_H */ |