diff options
| author | Karoly Lorentey | 2004-01-01 17:55:53 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-01-01 17:55:53 +0000 |
| commit | 28d7d09f841801cd052bb4ba0df92016b9245870 (patch) | |
| tree | eed006b0a32c39edb7a37d893bb2b192c63b69a5 /src/termchar.h | |
| parent | 819b8f00ed7b8a9a2190efaa02376ed332ecf763 (diff) | |
| download | emacs-28d7d09f841801cd052bb4ba0df92016b9245870.tar.gz emacs-28d7d09f841801cd052bb4ba0df92016b9245870.zip | |
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
Diffstat (limited to 'src/termchar.h')
| -rw-r--r-- | src/termchar.h | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/src/termchar.h b/src/termchar.h index a9a74dd5b05..49b1be87bea 100644 --- a/src/termchar.h +++ b/src/termchar.h | |||
| @@ -18,11 +18,22 @@ along with GNU Emacs; see the file COPYING. If not, write to | |||
| 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 19 | Boston, MA 02111-1307, USA. */ | 19 | Boston, MA 02111-1307, USA. */ |
| 20 | 20 | ||
| 21 | /* Each termcap frame points to its own struct tty_output object in the | 21 | /* Each termcap frame points to its own struct tty_output object in |
| 22 | output_data.tty field. The tty_output structure contains the information | 22 | the output_data.tty field. The tty_output structure contains the |
| 23 | that is specific to terminals. */ | 23 | information that is specific to termcap frames. */ |
| 24 | struct tty_output | 24 | struct tty_output |
| 25 | { | 25 | { |
| 26 | /* The Emacs structure for the tty device this frame is on. */ | ||
| 27 | struct tty_display_info *display_info; | ||
| 28 | |||
| 29 | /* There is nothing else here at the moment... */ | ||
| 30 | }; | ||
| 31 | |||
| 32 | /* Parameters that are shared between frames on the same tty device. */ | ||
| 33 | struct tty_display_info | ||
| 34 | { | ||
| 35 | struct tty_display_info *next; /* Chain of all tty devices. */ | ||
| 36 | |||
| 26 | char *name; /* The name of the device file or 0 if | 37 | char *name; /* The name of the device file or 0 if |
| 27 | stdin/stdout. */ | 38 | stdin/stdout. */ |
| 28 | char *type; /* The type of the tty. */ | 39 | char *type; /* The type of the tty. */ |
| @@ -40,8 +51,9 @@ struct tty_output | |||
| 40 | int term_initted; /* 1 if we have been through init_sys_modes. */ | 51 | int term_initted; /* 1 if we have been through init_sys_modes. */ |
| 41 | 52 | ||
| 42 | 53 | ||
| 43 | /* Structure for info on cursor positioning. */ | 54 | int reference_count; /* Number of frames that are on this display. */ |
| 44 | 55 | ||
| 56 | /* Info on cursor positioning. */ | ||
| 45 | struct cm *Wcm; | 57 | struct cm *Wcm; |
| 46 | 58 | ||
| 47 | /* Redisplay. */ | 59 | /* Redisplay. */ |
| @@ -52,12 +64,6 @@ struct tty_output | |||
| 52 | /* The previous terminal frame we displayed on this tty. */ | 64 | /* The previous terminal frame we displayed on this tty. */ |
| 53 | struct frame *previous_terminal_frame; | 65 | struct frame *previous_terminal_frame; |
| 54 | 66 | ||
| 55 | /* Pixel values. | ||
| 56 | XXX What are these used for? */ | ||
| 57 | |||
| 58 | unsigned long background_pixel; | ||
| 59 | unsigned long foreground_pixel; | ||
| 60 | |||
| 61 | /* Terminal characteristics. */ | 67 | /* Terminal characteristics. */ |
| 62 | 68 | ||
| 63 | int must_write_spaces; /* Nonzero means spaces in the text must | 69 | int must_write_spaces; /* Nonzero means spaces in the text must |
| @@ -192,22 +198,18 @@ struct tty_output | |||
| 192 | /* Flag used in tty_show/hide_cursor. */ | 198 | /* Flag used in tty_show/hide_cursor. */ |
| 193 | 199 | ||
| 194 | int cursor_hidden; | 200 | int cursor_hidden; |
| 195 | |||
| 196 | |||
| 197 | struct tty_output *next; | ||
| 198 | }; | 201 | }; |
| 199 | 202 | ||
| 200 | extern struct tty_output *tty_list; | 203 | /* A chain of structures for all tty devices currently in use. */ |
| 204 | extern struct tty_display_info *tty_list; | ||
| 201 | 205 | ||
| 202 | 206 | ||
| 203 | #define FRAME_TTY(f) \ | 207 | #define FRAME_TTY(f) \ |
| 204 | ((f)->output_method == output_termcap \ | 208 | ((f)->output_method == output_termcap \ |
| 205 | ? (f)->output_data.tty : (abort(), (struct tty_output *) 0)) | 209 | ? (f)->output_data.tty->display_info \ |
| 206 | 210 | : (abort(), (struct tty_display_info *) 0)) | |
| 207 | #define CURTTY() FRAME_TTY (SELECTED_FRAME()) | ||
| 208 | 211 | ||
| 209 | #define TTY_NAME(t) ((t)->name) | 212 | #define CURTTY() FRAME_TTY (SELECTED_FRAME()) |
| 210 | #define TTY_TYPE(t) ((t)->type) | ||
| 211 | 213 | ||
| 212 | #define TTY_INPUT(t) ((t)->input) | 214 | #define TTY_INPUT(t) ((t)->input) |
| 213 | #define TTY_OUTPUT(t) ((t)->output) | 215 | #define TTY_OUTPUT(t) ((t)->output) |
| @@ -221,11 +223,5 @@ extern struct tty_output *tty_list; | |||
| 221 | #define TTY_SCROLL_REGION_COST(t) ((t)->scroll_region_cost) | 223 | #define TTY_SCROLL_REGION_COST(t) ((t)->scroll_region_cost) |
| 222 | #define TTY_MEMORY_BELOW_FRAME(t) ((t)->memory_below_frame) | 224 | #define TTY_MEMORY_BELOW_FRAME(t) ((t)->memory_below_frame) |
| 223 | 225 | ||
| 224 | #if 0 | ||
| 225 | /* These are not used anywhere. */ | ||
| 226 | #define TTY_MIN_PADDING_SPEED(t) ((t)->min_padding_speed) | ||
| 227 | #define TTY_DONT_CALCULATE_COSTS(t) ((t)->dont_calculate_costs) | ||
| 228 | #endif | ||
| 229 | |||
| 230 | /* arch-tag: bf9f0d49-842b-42fb-9348-ec8759b27193 | 226 | /* arch-tag: bf9f0d49-842b-42fb-9348-ec8759b27193 |
| 231 | (do not change this comment) */ | 227 | (do not change this comment) */ |