annotate src/w32console.c @ 24851:06b633c9f37b

(ps-control-character): Fix previous change.
author Kenichi Handa <handa@m17n.org>
date Tue, 15 Jun 1999 08:11:35 +0000
parents 3bb855a40bf6
children a4c871b96d4b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16883
d1d4d81f9ece Change all uses of win95, winnt, and win32
Geoff Voelker <voelker@cs.washington.edu>
parents: 16593
diff changeset
1 /* Terminal hooks for GNU Emacs on the Microsoft W32 API.
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2 Copyright (C) 1992 Free Software Foundation, Inc.
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3
14186
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
4 This file is part of GNU Emacs.
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5
14186
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
7 it under the terms of the GNU General Public License as published by
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
9 any later version.
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10
14186
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
14 GNU General Public License for more details.
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15
14186
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
16 You should have received a copy of the GNU General Public License
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
17 along with GNU Emacs; see the file COPYING. If not, write to
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13424
diff changeset
19 Boston, MA 02111-1307, USA.
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 Tim Fleehart (apollo@online.com) 1-17-92
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 Geoff Voelker (voelker@cs.washington.edu) 9-12-93
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23 */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25
12183
47685fb0fbd1 Include config.h before stdio.h.
Geoff Voelker <voelker@cs.washington.edu>
parents: 11942
diff changeset
26 #include <config.h>
47685fb0fbd1 Include config.h before stdio.h.
Geoff Voelker <voelker@cs.washington.edu>
parents: 11942
diff changeset
27
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 #include <stdlib.h>
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 #include <stdio.h>
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 #include <windows.h>
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 #include "lisp.h"
18507
be4c110cda51 Include charset.h.
Geoff Voelker <voelker@cs.washington.edu>
parents: 16883
diff changeset
33 #include "charset.h"
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 #include "frame.h"
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 #include "disptab.h"
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 #include "termhooks.h"
16593
4ed80eda6fac Use new names for w32 files
Geoff Voelker <voelker@cs.washington.edu>
parents: 16588
diff changeset
37 #include "w32inevt.h"
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
39 /* from window.c */
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 extern Lisp_Object Frecenter ();
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42 /* from keyboard.c */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 extern int detect_input_pending ();
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45 /* from sysdep.c */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
46 extern int read_input_pending ();
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48 extern FRAME_PTR updating_frame;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 extern int meta_key;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 static void move_cursor (int row, int col);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 static void clear_to_end (void);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 static void clear_frame (void);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54 static void clear_end_of_line (int);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 static void ins_del_lines (int vpos, int n);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 static void change_line_highlight (int, int, int);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 static void reassert_line_highlight (int, int);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 static void insert_glyphs (GLYPH *start, int len);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59 static void write_glyphs (GLYPH *string, int len);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 static void delete_glyphs (int n);
16588
481b7874a1e9 Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents: 16262
diff changeset
61 void w32_sys_ring_bell (void);
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 static void reset_terminal_modes (void);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 static void set_terminal_modes (void);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 static void set_terminal_window (int size);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65 static void update_begin (FRAME_PTR f);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 static void update_end (FRAME_PTR f);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 static int hl_mode (int new_highlight);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69 COORD cursor_coords;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 HANDLE prev_screen, cur_screen;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 UCHAR char_attr, char_attr_normal, char_attr_reverse;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 HANDLE keyboard_handle;
15203
5bda3e000c2c (prev_console_mode): New variable.
Richard M. Stallman <rms@gnu.org>
parents: 14244
diff changeset
73 DWORD prev_console_mode;
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74
19706
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
75 #ifndef USE_SEPARATE_SCREEN
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
76 CONSOLE_CURSOR_INFO prev_console_cursor;
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
77 #endif
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
78
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80 /* Setting this as the ctrl handler prevents emacs from being killed when
12336
617f39b43557 (ctrl_c_handler): Ignore CTRL_BREAK_EVENT signals.
Richard M. Stallman <rms@gnu.org>
parents: 12183
diff changeset
81 someone hits ^C in a 'suspended' session (child shell).
617f39b43557 (ctrl_c_handler): Ignore CTRL_BREAK_EVENT signals.
Richard M. Stallman <rms@gnu.org>
parents: 12183
diff changeset
82 Also ignore Ctrl-Break signals. */
617f39b43557 (ctrl_c_handler): Ignore CTRL_BREAK_EVENT signals.
Richard M. Stallman <rms@gnu.org>
parents: 12183
diff changeset
83
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 BOOL
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85 ctrl_c_handler (unsigned long type)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 {
19706
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
87 /* Only ignore "interrupt" events when running interactively. */
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
88 return (!noninteractive
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
89 && (type == CTRL_C_EVENT || type == CTRL_BREAK_EVENT));
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
91
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92 /* If we're updating a frame, use it as the current frame
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 Otherwise, use the selected frame. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94 #define PICK_FRAME() (updating_frame ? updating_frame : selected_frame)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96 /* Move the cursor to (row, col). */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 move_cursor (int row, int col)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 cursor_coords.X = col;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101 cursor_coords.Y = row;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
103 if (updating_frame == (FRAME_PTR) NULL)
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
104 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105 SetConsoleCursorPosition (cur_screen, cursor_coords);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109 /* Clear from cursor to end of screen. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 clear_to_end (void)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113 FRAME_PTR f = PICK_FRAME ();
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 clear_end_of_line (FRAME_WIDTH (f) - 1);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116 ins_del_lines (cursor_coords.Y, FRAME_HEIGHT (f) - cursor_coords.Y - 1);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119 /* Clear the frame. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 clear_frame (void)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 {
14244
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
123 FRAME_PTR f = PICK_FRAME ();
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124 COORD dest;
14244
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
125 int n, r;
24755
3bb855a40bf6 (clear_frame): Remember that the window width might
Andrew Innes <andrewi@gnu.org>
parents: 23572
diff changeset
126 CONSOLE_SCREEN_BUFFER_INFO info;
3bb855a40bf6 (clear_frame): Remember that the window width might
Andrew Innes <andrewi@gnu.org>
parents: 23572
diff changeset
127
3bb855a40bf6 (clear_frame): Remember that the window width might
Andrew Innes <andrewi@gnu.org>
parents: 23572
diff changeset
128 GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info);
14244
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
129
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 hl_mode (0);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131
24755
3bb855a40bf6 (clear_frame): Remember that the window width might
Andrew Innes <andrewi@gnu.org>
parents: 23572
diff changeset
132 /* Remember that the screen buffer might be wider than the window. */
3bb855a40bf6 (clear_frame): Remember that the window width might
Andrew Innes <andrewi@gnu.org>
parents: 23572
diff changeset
133 n = FRAME_HEIGHT (f) * info.dwSize.X;
14244
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
134 dest.X = dest.Y = 0;
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
135
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
136 FillConsoleOutputAttribute (cur_screen, char_attr, n, dest, &r);
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
137 FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r);
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
138
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139 move_cursor (0, 0);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143 static GLYPH glyph_base[256];
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144 static BOOL ceol_initialized = FALSE;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146 /* Clear from Cursor to end (what's "standout marker"?). */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 clear_end_of_line (int end)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 if (!ceol_initialized)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 int i;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 for (i = 0; i < 256; i++)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 glyph_base[i] = SPACEGLYPH; /* empty space */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 ceol_initialized = TRUE;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159 write_glyphs (glyph_base, end - cursor_coords.X); /* fencepost ? */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162 /* Insert n lines at vpos. if n is negative delete -n lines. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 ins_del_lines (int vpos, int n)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166 int i, nb, save_highlight;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 SMALL_RECT scroll;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168 COORD dest;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 CHAR_INFO fill;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170 FRAME_PTR f = PICK_FRAME ();
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172 if (n < 0)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 scroll.Top = vpos - n;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175 scroll.Bottom = FRAME_HEIGHT (f);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
176 dest.Y = vpos;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
177 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
178 else
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
180 scroll.Top = vpos;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 scroll.Bottom = FRAME_HEIGHT (f) - n;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
182 dest.Y = vpos + n;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
183 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
184 scroll.Left = 0;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
185 scroll.Right = FRAME_WIDTH (f);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
186
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
187 dest.X = 0;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
188
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
189 save_highlight = hl_mode (0);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
190
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
191 fill.Char.AsciiChar = 0x20;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
192 fill.Attributes = char_attr;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194 ScrollConsoleScreenBuffer (cur_screen, &scroll, NULL, dest, &fill);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195
16588
481b7874a1e9 Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents: 16262
diff changeset
196 /* Here we have to deal with a w32 console flake: If the scroll
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
197 region looks like abc and we scroll c to a and fill with d we get
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
198 cbd... if we scroll block c one line at a time to a, we get cdd...
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
199 Emacs expects cdd consistently... So we have to deal with that
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200 here... (this also occurs scrolling the same way in the other
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
201 direction. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
202
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
203 if (n > 0)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
204 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
205 if (scroll.Bottom < dest.Y)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
206 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
207 for (i = scroll.Bottom; i < dest.Y; i++)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
208 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
209 move_cursor (i, 0);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
210 clear_end_of_line (FRAME_WIDTH (f));
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
211 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
212 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
213 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214 else
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
215 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
216 nb = dest.Y + (scroll.Bottom - scroll.Top) + 1;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
217
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
218 if (nb < scroll.Top)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
219 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
220 for (i = nb; i < scroll.Top; i++)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
221 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
222 move_cursor (i, 0);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
223 clear_end_of_line (FRAME_WIDTH (f));
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
224 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
225 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
226 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
227
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
228 cursor_coords.X = 0;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
229 cursor_coords.Y = vpos;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
230
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
231 hl_mode (save_highlight);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
232 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
233
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
234 /* Changes attribute to use when drawing characters to control. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
235 static int
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
236 hl_mode (int new_highlight)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
237 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
238 static int highlight = 0;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
239 int old_highlight;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
240
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
241 old_highlight = highlight;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
242 highlight = (new_highlight != 0);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
243 if (highlight)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
244 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
245 char_attr = char_attr_reverse;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
246 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
247 else
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
248 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
249 char_attr = char_attr_normal;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
250 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
251 return old_highlight;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
252 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
253
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
254 /* Call this when about to modify line at position VPOS and change whether it
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
255 is highlighted. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
256 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
257 change_line_highlight (int new_highlight, int vpos, int first_unused_hpos)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
258 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
259 hl_mode (new_highlight);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
260 move_cursor (vpos, 0);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
261 clear_end_of_line (first_unused_hpos);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
262 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
263
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
264 /* External interface to control of standout mode. Call this when about to
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
265 * modify line at position VPOS and not change whether it is highlighted. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
266 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
267 reassert_line_highlight (int highlight, int vpos)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
268 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
269 hl_mode (highlight);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
270 vpos; /* pedantic compiler silencer */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
271 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
273 #undef LEFT
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274 #undef RIGHT
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
275 #define LEFT 1
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
276 #define RIGHT 0
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
278 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
279 scroll_line (int dist, int direction)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
281 /* The idea here is to implement a horizontal scroll in one line to
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
282 implement delete and half of insert. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
283 SMALL_RECT scroll;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
284 COORD dest;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
285 CHAR_INFO fill;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
286 FRAME_PTR f = PICK_FRAME ();
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
287
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
288 scroll.Top = cursor_coords.Y;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
289 scroll.Bottom = cursor_coords.Y;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
290
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
291 if (direction == LEFT)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293 scroll.Left = cursor_coords.X + dist;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
294 scroll.Right = FRAME_WIDTH (f) - 1;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
295 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
296 else
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
297 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
298 scroll.Left = cursor_coords.X;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
299 scroll.Right = FRAME_WIDTH (f) - dist - 1;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
300 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
301
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
302 dest.X = cursor_coords.X;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
303 dest.Y = cursor_coords.Y;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
304
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
305 fill.Char.AsciiChar = 0x20;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
306 fill.Attributes = char_attr;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
307
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
308 ScrollConsoleScreenBuffer (cur_screen, &scroll, NULL, dest, &fill);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
309 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
310
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
311
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
312 /* If start is zero insert blanks instead of a string at start ?. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
313 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
314 insert_glyphs (register GLYPH *start, register int len)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
315 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
316 scroll_line (len, RIGHT);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
317
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
318 /* Move len chars to the right starting at cursor_coords, fill with blanks */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
319 if (start)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
320 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
321 /* Print the first len characters of start, cursor_coords.X adjusted
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
322 by write_glyphs. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
323
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
324 write_glyphs (start, len);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
325 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
326 else
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
327 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
328 clear_end_of_line (cursor_coords.X + len);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
329 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
330 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
331
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
332 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
333 write_glyphs (register GLYPH *string, register int len)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
334 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
335 register unsigned int glyph_len = GLYPH_TABLE_LENGTH;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
336 Lisp_Object *glyph_table = GLYPH_TABLE_BASE;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
337 FRAME_PTR f = PICK_FRAME ();
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
338 register char *ptr;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
339 GLYPH glyph;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
340 char *chars;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
341 int i;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
342
14244
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
343 if (len <= 0)
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
344 return;
493cff4d5960 (clear_frame): Use FillConsoleOutput* calls instead of
Geoff Voelker <voelker@cs.washington.edu>
parents: 14186
diff changeset
345
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
346 chars = alloca (len * sizeof (*chars));
24755
3bb855a40bf6 (clear_frame): Remember that the window width might
Andrew Innes <andrewi@gnu.org>
parents: 23572
diff changeset
347 if (chars == NULL)
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
348 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
349 printf ("alloca failed in write_glyphs\n");
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
350 return;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
351 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
352
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
353 /* We have to deal with the glyph indirection...go over the glyph
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
354 buffer and extract the characters. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
355 ptr = chars;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
356 while (--len >= 0)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
357 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
358 glyph = *string++;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
359
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
360 if (glyph > glyph_len)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
361 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
362 *ptr++ = glyph & 0xFF;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
363 continue;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
364 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
365 GLYPH_FOLLOW_ALIASES (glyph_table, glyph_len, glyph);
13424
efbbbfd268dd (nt_ring_bell): Renamed from ring_bell, now global.
Geoff Voelker <voelker@cs.washington.edu>
parents: 12336
diff changeset
366 #ifndef HAVE_NTGUI
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
367 if (GLYPH_FACE (fixfix, glyph) != 0)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
368 printf ("Glyph face is %d\n", GLYPH_FACE (fixfix, glyph));
13424
efbbbfd268dd (nt_ring_bell): Renamed from ring_bell, now global.
Geoff Voelker <voelker@cs.washington.edu>
parents: 12336
diff changeset
369 #endif /* !HAVE_NTGUI */
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
370 if (GLYPH_SIMPLE_P (glyph_table, glyph_len, glyph))
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
371 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
372 *ptr++ = glyph & 0xFF;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
373 continue;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
374 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
375 for (i = 0; i < GLYPH_LENGTH (glyph_table, glyph); i++)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
376 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
377 *ptr++ = (GLYPH_STRING (glyph_table, glyph))[i];
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
378 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
379 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
380
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
381 /* Number of characters we have in the buffer. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
382 len = ptr-chars;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
383
24755
3bb855a40bf6 (clear_frame): Remember that the window width might
Andrew Innes <andrewi@gnu.org>
parents: 23572
diff changeset
384 /* Set the attribute for these characters. */
3bb855a40bf6 (clear_frame): Remember that the window width might
Andrew Innes <andrewi@gnu.org>
parents: 23572
diff changeset
385 if (!FillConsoleOutputAttribute (cur_screen, char_attr, len, cursor_coords, &i))
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
386 {
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
387 printf ("Failed writing console attributes: %d\n", GetLastError ());
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
388 fflush (stdout);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
389 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
390
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
391 /* Write the characters. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
392 if (!WriteConsoleOutputCharacter (cur_screen, chars, len, cursor_coords, &i))
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
393 {
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
394 printf ("Failed writing console characters: %d\n", GetLastError ());
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
395 fflush (stdout);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
396 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
397
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
398 cursor_coords.X += len;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
399 move_cursor (cursor_coords.Y, cursor_coords.X);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
400 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
401
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
402 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
403 delete_glyphs (int n)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
404 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
405 /* delete chars means scroll chars from cursor_coords.X + n to
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
406 cursor_coords.X, anything beyond the edge of the screen should
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
407 come out empty... */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
408
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
409 scroll_line (n, LEFT);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
410 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
411
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
412 static unsigned int sound_type = 0xFFFFFFFF;
23563
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
413 #define MB_EMACS_SILENT (0xFFFFFFFF - 1)
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
414
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
415 void
16588
481b7874a1e9 Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents: 16262
diff changeset
416 w32_sys_ring_bell (void)
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
417 {
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
418 if (sound_type == 0xFFFFFFFF)
23563
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
419 {
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
420 Beep (666, 100);
23563
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
421 }
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
422 else if (sound_type == MB_EMACS_SILENT)
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
423 {
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
424 /* Do nothing. */
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
425 }
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
426 else
23563
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
427 MessageBeep (sound_type);
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
428 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
429
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
430 DEFUN ("set-message-beep", Fset_message_beep, Sset_message_beep, 1, 1, 0,
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
431 "Set the sound generated when the bell is rung.\n\
23563
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
432 SOUND is 'asterisk, 'exclamation, 'hand, 'question, 'ok, or 'silent\n\
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
433 to use the corresponding system sound for the bell. The 'silent sound\n\
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
434 prevents Emacs from making any sound at all.\n\
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
435 SOUND is nil to use the normal beep.")
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
436 (sound)
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
437 Lisp_Object sound;
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
438 {
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
439 CHECK_SYMBOL (sound, 0);
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
440
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
441 if (NILP (sound))
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
442 sound_type = 0xFFFFFFFF;
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
443 else if (EQ (sound, intern ("asterisk")))
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
444 sound_type = MB_ICONASTERISK;
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
445 else if (EQ (sound, intern ("exclamation")))
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
446 sound_type = MB_ICONEXCLAMATION;
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
447 else if (EQ (sound, intern ("hand")))
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
448 sound_type = MB_ICONHAND;
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
449 else if (EQ (sound, intern ("question")))
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
450 sound_type = MB_ICONQUESTION;
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
451 else if (EQ (sound, intern ("ok")))
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
452 sound_type = MB_OK;
23563
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
453 else if (EQ (sound, intern ("silent")))
18c5f58b70b5 (Fset_message_beep): Recognize 'silent.
Geoff Voelker <voelker@cs.washington.edu>
parents: 22540
diff changeset
454 sound_type = MB_EMACS_SILENT;
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
455 else
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
456 sound_type = 0xFFFFFFFF;
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
457
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
458 return sound;
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
459 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
460
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
461 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
462 reset_terminal_modes (void)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
463 {
19706
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
464 #ifdef USE_SEPARATE_SCREEN
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
465 SetConsoleActiveScreenBuffer (prev_screen);
19706
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
466 #else
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
467 SetConsoleCursorInfo (prev_screen, &prev_console_cursor);
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
468 #endif
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
469 SetConsoleMode (keyboard_handle, prev_console_mode);
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
470 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
471
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
472 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
473 set_terminal_modes (void)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
474 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
475 CONSOLE_CURSOR_INFO cci;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
476
19706
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
477 /* make cursor big and visible (100 on Win95 makes it disappear) */
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
478 cci.dwSize = 99;
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
479 cci.bVisible = TRUE;
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
480 (void) SetConsoleCursorInfo (cur_screen, &cci);
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
481
19706
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
482 SetConsoleActiveScreenBuffer (cur_screen);
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
483
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
484 SetConsoleMode (keyboard_handle, ENABLE_MOUSE_INPUT | ENABLE_WINDOW_INPUT);
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
485
19706
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
486 /* Initialize input mode: interrupt_input off, no flow control, allow
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
487 8 bit character input, standard quit char. */
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
488 Fset_input_mode (Qnil, Qnil, make_number (2), Qnil);
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
489 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
490
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
491 /* hmmm... perhaps these let us bracket screen changes so that we can flush
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
492 clumps rather than one-character-at-a-time...
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
493
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
494 we'll start with not moving the cursor while an update is in progress. */
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
495 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
496 update_begin (FRAME_PTR f)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
497 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
498 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
499
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
500 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
501 update_end (FRAME_PTR f)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
502 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
503 SetConsoleCursorPosition (cur_screen, cursor_coords);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
504 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
505
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
506 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
507 set_terminal_window (int size)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
508 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
509 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
510
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
511 typedef int (*term_hook) ();
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
512
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
513 void
16883
d1d4d81f9ece Change all uses of win95, winnt, and win32
Geoff Voelker <voelker@cs.washington.edu>
parents: 16593
diff changeset
514 initialize_w32_display (void)
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
515 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
516 CONSOLE_SCREEN_BUFFER_INFO info;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
517
21828
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
518 cursor_to_hook = move_cursor;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
519 raw_cursor_to_hook = move_cursor;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
520 clear_to_end_hook = clear_to_end;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
521 clear_frame_hook = clear_frame;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
522 clear_end_of_line_hook = clear_end_of_line;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
523 ins_del_lines_hook = ins_del_lines;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
524 change_line_highlight_hook = change_line_highlight;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
525 reassert_line_highlight_hook = reassert_line_highlight;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
526 insert_glyphs_hook = insert_glyphs;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
527 write_glyphs_hook = write_glyphs;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
528 delete_glyphs_hook = delete_glyphs;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
529 ring_bell_hook = w32_sys_ring_bell;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
530 reset_terminal_modes_hook = reset_terminal_modes;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
531 set_terminal_modes_hook = set_terminal_modes;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
532 set_terminal_window_hook = set_terminal_window;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
533 update_begin_hook = update_begin;
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
534 update_end_hook = update_end;
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
535
16588
481b7874a1e9 Change identifiers of the form win32* to w32*.
Geoff Voelker <voelker@cs.washington.edu>
parents: 16262
diff changeset
536 read_socket_hook = w32_console_read_socket;
21828
7e3f21132df4 (initialize_w32_displayed): Use new function prototypes.
Geoff Voelker <voelker@cs.washington.edu>
parents: 19706
diff changeset
537 mouse_position_hook = w32_console_mouse_position;
19706
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
538
22540
0e7c65caf1cb (initialize_w32_display): Call init_crit to initialize
Andrew Innes <andrewi@gnu.org>
parents: 21828
diff changeset
539 /* Initialize interrupt_handle. */
0e7c65caf1cb (initialize_w32_display): Call init_crit to initialize
Andrew Innes <andrewi@gnu.org>
parents: 21828
diff changeset
540 init_crit ();
0e7c65caf1cb (initialize_w32_display): Call init_crit to initialize
Andrew Innes <andrewi@gnu.org>
parents: 21828
diff changeset
541
19706
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
542 /* Remember original console settings. */
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
543 keyboard_handle = GetStdHandle (STD_INPUT_HANDLE);
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
544 GetConsoleMode (keyboard_handle, &prev_console_mode);
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
545
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
546 prev_screen = GetStdHandle (STD_OUTPUT_HANDLE);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
547
19706
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
548 #ifdef USE_SEPARATE_SCREEN
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
549 cur_screen = CreateConsoleScreenBuffer (GENERIC_READ | GENERIC_WRITE,
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
550 0, NULL,
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
551 CONSOLE_TEXTMODE_BUFFER,
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
552 NULL);
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
553
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
554 if (cur_screen == INVALID_HANDLE_VALUE)
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
555 {
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
556 printf ("CreateConsoleScreenBuffer failed in ResetTerm\n");
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
557 printf ("LastError = 0x%lx\n", GetLastError ());
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
558 fflush (stdout);
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
559 exit (0);
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
560 }
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
561 #else
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
562 cur_screen = prev_screen;
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
563 GetConsoleCursorInfo (prev_screen, &prev_console_cursor);
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
564 #endif
e21b63afe61f (DebPrint, reset_kbd, unset_kbd, take_console): Delete functions.
Geoff Voelker <voelker@cs.washington.edu>
parents: 18507
diff changeset
565
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
566 GetConsoleScreenBufferInfo (cur_screen, &info);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
567
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
568 meta_key = 1;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
569 char_attr = info.wAttributes & 0xFF;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
570 char_attr_normal = char_attr;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
571 char_attr_reverse = ((char_attr & 0xf) << 4) + ((char_attr & 0xf0) >> 4);
23572
1fa5f9f5c92e (initialize_w32_display): Use buffer coords
Geoff Voelker <voelker@cs.washington.edu>
parents: 23563
diff changeset
572
1fa5f9f5c92e (initialize_w32_display): Use buffer coords
Geoff Voelker <voelker@cs.washington.edu>
parents: 23563
diff changeset
573 /* Lines per page. Use buffer coords instead of buffer size. */
1fa5f9f5c92e (initialize_w32_display): Use buffer coords
Geoff Voelker <voelker@cs.washington.edu>
parents: 23563
diff changeset
574 FRAME_HEIGHT (selected_frame) = 1 + info.srWindow.Bottom -
1fa5f9f5c92e (initialize_w32_display): Use buffer coords
Geoff Voelker <voelker@cs.washington.edu>
parents: 23563
diff changeset
575 info.srWindow.Top;
1fa5f9f5c92e (initialize_w32_display): Use buffer coords
Geoff Voelker <voelker@cs.washington.edu>
parents: 23563
diff changeset
576 /* Characters per line. Use buffer coords instead of buffer size. */
1fa5f9f5c92e (initialize_w32_display): Use buffer coords
Geoff Voelker <voelker@cs.washington.edu>
parents: 23563
diff changeset
577 SET_FRAME_WIDTH (selected_frame, 1 + info.srWindow.Right -
1fa5f9f5c92e (initialize_w32_display): Use buffer coords
Geoff Voelker <voelker@cs.washington.edu>
parents: 23563
diff changeset
578 info.srWindow.Left);
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
579 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
580
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
581 DEFUN ("set-screen-color", Fset_screen_color, Sset_screen_color, 2, 2, 0,
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
582 "Set screen colors.")
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
583 (foreground, background)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
584 Lisp_Object foreground;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
585 Lisp_Object background;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
586 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
587 char_attr_normal = XFASTINT (foreground) + (XFASTINT (background) << 4);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
588 char_attr_reverse = XFASTINT (background) + (XFASTINT (foreground) << 4);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
589
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
590 Frecenter (Qnil);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
591 return Qt;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
592 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
593
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
594 DEFUN ("set-cursor-size", Fset_cursor_size, Sset_cursor_size, 1, 1, 0,
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
595 "Set cursor size.")
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
596 (size)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
597 Lisp_Object size;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
598 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
599 CONSOLE_CURSOR_INFO cci;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
600 cci.dwSize = XFASTINT (size);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
601 cci.bVisible = TRUE;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
602 (void) SetConsoleCursorInfo (cur_screen, &cci);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
603
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
604 return Qt;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
605 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
606
13424
efbbbfd268dd (nt_ring_bell): Renamed from ring_bell, now global.
Geoff Voelker <voelker@cs.washington.edu>
parents: 12336
diff changeset
607 #ifndef HAVE_NTGUI
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
608 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
609 pixel_to_glyph_coords (FRAME_PTR f, int pix_x, int pix_y, int *x, int *y,
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
610 void *bounds, int noclip)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
611 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
612 *x = pix_x;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
613 *y = pix_y;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
614 }
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
615
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
616 void
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
617 glyph_to_pixel_coords (FRAME_PTR f, int x, int y, int *pix_x, int *pix_y)
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
618 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
619 *pix_x = x;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
620 *pix_y = y;
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
621 }
13424
efbbbfd268dd (nt_ring_bell): Renamed from ring_bell, now global.
Geoff Voelker <voelker@cs.washington.edu>
parents: 12336
diff changeset
622 #endif /* !HAVE_NTGUI */
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
623
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
624 void
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
625 syms_of_ntterm ()
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
626 {
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
627 defsubr (&Sset_screen_color);
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
628 defsubr (&Sset_cursor_size);
11389
4a8836398f3e (Fset_message_beep): Defined.
Karl Heuer <kwzh@gnu.org>
parents: 9907
diff changeset
629 defsubr (&Sset_message_beep);
9907
2e5a14f7c44e Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
630 }