1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 15:52:00 -08:00
Commit graph

122 commits

Author SHA1 Message Date
Andrew Innes
1a89b7c6f7 (FRAME_TERMCAP_P) [WINDOWSNT]: Reinstate original
redefinition.
2001-01-20 13:57:24 +00:00
Andrew Innes
8182406ad1 (update_end): Don't check updating_frame; for some reason
this can be 0 sometimes, such as after dismissing a popup menu,
and isn't necessary given the explicit frame argument.
2001-01-05 21:28:52 +00:00
Andrew Innes
ad54b02528 (FRAME_TERMCAP_P) [WINDOWSNT]: Remove redefinition. 2001-01-02 22:48:57 +00:00
Eli Zaretskii
deefb1ef4e (encode_terminal_code): Remove unused variable `c'. 2001-01-02 13:57:02 +00:00
Gerd Moellmann
ff23e1dd17 Don't try to include termcap.h; see comment there. 2000-11-21 12:05:08 +00:00
Eli Zaretskii
25ffac29dc (reassert_line_highlight): Reverse the inverse-video effect
if inverse_video is non-zero.
2000-10-28 17:10:10 +00:00
Andrew Choi
1a578e9be2 Initial check-in: changes for building Emacs under Mac OS.
2000-10-23  Andrew Choi  <akochoi@i-cable.com>

	* dispextern.h [macintosh]: Include macgui.h instead of macterm.h.

	* dispnew.c [macintosh]: Include macterm.h.
	(init_display) [macintosh]: initialization for window system.

	* emacs.c (main) [macintosh]: Call syms_of_textprop,
	syms_of_macfns, syms_of_ccl, syms_of_fontset, syms_of_xterm,
	syms_of_search, x_term_init, and init_keyboard before calling
	init_window_once.  Also, call syms_of_xmenu.

	* fontset.c (syms_of_fontset) [macintosh]: Set ASCII font of
	default fontset to Monaco.

	* frame.c [macintosh]: Include macterm.h.  Remove declarations of
	NewMacWindow and DisposeMacWindow.
	(make_terminal_frame) [macintosh]: Call make_mac_terminal_frame
	instead of calling NewMacWindow and setting fields of
	f->output_data.mac directly.  Call init_frame_faces.
	(Fdelete_frame) [macintosh]: Remove unused code.
	(Fmodify_frame_parameters) [macintosh]: Call
	x_set_frame_parameters instead of mac_set_frame_parameters.

	* frame.h [macintosh]: Define menu_bar_lines field in struct
	frame.  Define FRAME_EXTERNAL_MENU_BAR macro.

	* keyboard.c [macintosh]: Include macterm.h.
	(kbd_buffer_get_event) [macintosh]: Generate delete_window_event
	and menu_bar_activate_event type events as for X and NT.
	(make_lispy_event) [macintosh]: Construct lisp events of type
	MENU_BAR_EVENT as for X and NT.

	* sysdep.c [macintosh]: Remove declaration for sys_signal.
	Include stdlib.h.  Remove definition of Vx_bitmap_file_path.
	(sys_subshell) [macintosh]: Remove definition entirely.
	(init_sys_modes) [macintosh]: Do not initialize Vwindow_system and
	Vwindow_system_version here.  Remove initialization of
	Vx_bitmap_file_path.
	(read_input_waiting): Correct the number of parameters passed to
	read_socket_hook.
	Move all Macintosh functions to mac/mac.c.

	* term.c [macintosh]: Include macterm.h.

	* window.c [macintosh]: Include macterm.h.

	* xdisp.c [macintosh]: Include macterm.h.  Declare
	set_frame_menubar and pending_menu_activation.
	(echo_area_display) [macintosh]: Do not return if terminal frame
	is the selected frame.
	(update_menu_bar) [macintosh]: Check FRAME_EXTERNAL_MENU_BAR (f).
	Allow only the selected frame to set menu bar.
	(redisplay_window) [macintosh]: Obtain menu bar to redisplay by
	calling FRAME_EXTERNAL_MENU_BAR (f).
	(display_menu_bar) [macintosh]: Check FRAME_MAC_P (f).

	* xfaces.c [macintosh]: Include macterm.h.  Define x_display_info
	and check_x.  Declare XCreateGC.  Define x_create_gc and
	x_free_gc.  Initialize font_sort_order.
	(x_face_list_fonts) [macintosh]: Use the same code as WINDOWSNT,
	but call x_list_fonts instead of w32_list_fonts.
	(Finternal_face_x_get_resource) [macintosh]: Do not call
	display_x_get_resource.
	(prepare_face_for_display) [macintosh]: Set xgcv.font.
	(realize_x_face) [macintosh]: Load the font if it is specified in
	ATTRS.
	(syms_of_xfaces) [macintosh]: Initialize Vscalable_fonts_allowed
	to Qt.

	* cus-edit.el (custom-button-face): Use 3D look for mac.
	(custom-button-pressed-face): Likewise.

	* faces.el (set-face-attributes-from-resources): Handle mac frames
	in the same way as x and w32 frames.
	(face-valid-attribute-values): Likewise.
	(read-face-attribute): Likewise.
	(defined-colors): Likewise.
	(color-defined-p): Likewise.
	(color-values): Likewise.
	(display-grayscale-p): Likewise.
	(face-set-after-frame-default): Likewise.
	(mode-line): Same default face as for x and w32.
	(tool-bar): Likewise.

	* frame.el: Remove call to frame-notice-user-settings at end of
	the file.

	* info.el (Info-fontify-node): make underlines invisible for mac
	as for x, pc, and w32 frame types.

	* term/mac-win.el: New file.
2000-10-22 16:50:16 +00:00
Gerd Moellmann
6bbd7a2959 Avoid some more compiler warnings. 2000-09-21 20:54:57 +00:00
Andrew Innes
2538fae4f8 Include keyboard.h before frame.h. 2000-08-22 22:41:00 +00:00
Gerd Moellmann
65aa5e85fa (write_glyphs): Also turn off inverse video after turning
off other appearances in case TS_exit_attribute_mode is not equal
to TS_end_standout_mode.
(insert_glyphs): Turn inverse video on/off for each run of glyphs
with the same face.
(turn_off_face): Reset standout_mode only if
TS_exit_attribute_mode has been output and TS_exit_attribute_mode
is equal to TS_end_standout_mode.
2000-08-16 12:14:15 +00:00
Kenichi Handa
d2fdb076c0 (write_glyphs): Use a locally declared conversion_buffer.
(insert_glyphs): Likewise.
2000-08-16 01:38:32 +00:00
Gerd Moellmann
2535aa8c71 (turn_off_face): Reset standout_mode when resetting
apparances with capability `me'.
(write_glyphs): Switch on inverse video before each face change.
2000-08-15 15:02:15 +00:00
Dave Love
46d1b2bcc1 [!HAVE_TERMCAP_H]: Declare tputs, tgetent, tgetflag, tgetnum. 2000-06-25 17:22:33 +00:00
Gerd Moellmann
d13f3e2e24 (append_glyph): Revert change of 2000-06-06. 2000-06-06 12:27:18 +00:00
Kenichi Handa
1ac0700a34 (encode_terminal_code): Change the way to check if
terminal coding does any conversion.
(append_glyph): Set glyph->pixel_width correctly.
2000-06-06 01:08:19 +00:00
Eli Zaretskii
cf872af50e Correct a typo in a comment. 2000-05-28 13:27:33 +00:00
Eli Zaretskii
add4489008 (produce_glyphs): Don't treat eight-bit-* charsets as multibyte.
From Kenichi Handa.
2000-05-28 13:23:02 +00:00
Kenichi Handa
f2ba40be95 (encode_terminal_code): Set coding->src_multibyte properly. 2000-05-23 01:33:40 +00:00
Kenichi Handa
68526af594 (produce_special_glyphs): Use CHAR_BYTES instead of
CHAR_LEN.
2000-05-20 00:05:26 +00:00
Gerd Moellmann
2efdbcddfa (produce_glyphs): Remove reference to struct it's prompt_width. 2000-04-24 13:53:16 +00:00
Ken Raeburn
7c752c8099 make_number/XINT/XUINT conversions; EQ/== fixes; ==Qnil -> NILP 2000-04-05 17:29:31 +00:00
Gerd Moellmann
4e6ba4a490 (TN_no_color_video): New variable.
(term_init): Intitialize TN_no_color_video.
(enum no_color_bit): New enumeration.
(MAY_USE_WITH_COLORS_P): New macro.
(turn_on_face): Use it to determine if attributes may be used
combined with colors.
2000-04-01 13:33:12 +00:00
Gerd Moellmann
2136fdd4f5 (calculate_costs): Remove code dealing with X frames. 2000-03-19 17:04:41 +00:00
Jason Rumney
acfcd5cdf1 (term_init) [WINDOWSNT]: Initialize TN_max_colors. 2000-01-30 18:55:00 +00:00
Kenichi Handa
c989b7be8f (encode_terminal_code): Fix the previous change. 2000-01-04 01:58:49 +00:00
Eli Zaretskii
981e4297b4 (Ftty_display_color_p): Accept an optional argument FRAME. 2000-01-02 14:06:15 +00:00
Eli Zaretskii
816be8b8eb (insert_glyphs): Pass glyph, not &glyph, to
encode_terminal_code.
2000-01-02 14:00:03 +00:00
Kenichi Handa
32de38e46d (encode_terminal_code): Adjusted for the change of struct
glyph and GLYPH_FROM_CHAR_GLYPH.
(write_glyphs) (insert_glyphs) (append_glyph): Adjusted for the
change of struct glyph.
1999-12-27 05:07:56 +00:00
Eli Zaretskii
f9d2fdc464 Changes for separate unspecified foreground and background colors
on character terminals:

* dispextern.h (FACE_TTY_DEFAULT_FG_COLOR)
(FACE_TTY_DEFAULT_BG_COLOR):  New macros.

* xfaces.c (Qunspecified_fg, Qunspecified_bg): New variables.
(syms_of_xfaces): Initialize and staticpro them.
(tty_defined_color): If the color name is unspecified-fg or
unspecified-bg, return FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR, respectively, as the pixel value.
(tty_color_name): If the color pixel value is either
FACE_TTY_DEFAULT_FG_COLOR or FACE_TTY_DEFAULT_BG_COLOR, return
Qunspecified_fg or Qunspecified_bg, respectively.
(Finternal_set_lisp_face_attribute): Allow values Qunspecified_fg
and Qunspecified_bg for foreground and background colors.
(realize_default_face): If the foreground and background colors
are not specified, default to Qunspecified_fg and Qunspecified_bg.
(realize_tty_face): By default, set the face colors to
FACE_TTY_DEFAULT_FG_COLOR and FACE_TTY_DEFAULT_BG_COLOR.
[MSDOS]: Handle FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR when face colors are not defined.
Reverse the colors if the default colors were reversed.

* dispnew.c (init_display): Initialize the frame pixels of the
initial frame to FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR.

* term.c (turn_on_face): If the default fore- and background
colors are reversed, enter inverse video mode.  Don't send color
escape sequences for unspecified foreground and background colors.
(turn_off_face): Handle unspecified-fg and unspecified-bg colors.

* dosfns.c (unspecified_colors): New variable.
(msdos_stdcolor_idx): Handle unspecified-fg and unspecified-bg
color names, return FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR, respectively.
(msdos_stdcolor_name): Handle FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR, return Qunspecified_fg and
Qunspecified_bg, respectively.

* msdos.c (IT_set_face): Support FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR as pixel values.

* faces.el (face-read-integer, read-face-attribute)
(color-defined-p, color-values): Allow color values unspecified-fg
and unspecified-bg, handle them as unspecified.
1999-12-15 13:14:38 +00:00
Kenichi Handa
c7cba11dec (encode_terminal_code): Delete codes for a composite
character.  Adjusted for the change of CHAR_STRING.
(produce_glyphs): When called, it->what can be IT_COMPOSITION.
Delete codes for a composite character.
1999-12-15 00:21:15 +00:00
Gerd Moellmann
e7f90eab7e (term_init): If "op" isn't available, don't support color
because we can't switch back to the default foreground and
background.
1999-11-12 14:35:43 +00:00
Gerd Moellmann
b0f61f1525 (OUTPUT_IF, OUTPUT1_IF): Use do-while.
(encode_terminal_code): Remove unused variables.
(turn_off_face): Ditto.
(toplevel): Include termcap.h if HAVE_TERMCAP_H.
1999-09-15 12:58:40 +00:00
Gerd Moellmann
e52f4e084a (OUTPUT): Change for Lisp_Object selected_frame.
(OUTPUT_IF, ring_bell, set_terminal_modes, reset_terminal_modes,
set_terminal_window, set_scroll_region, reassert_line_highlight,
change_line_highlight, cursor_to, raw_cursor_to, clear_to_end,
clear_end_of_line, clear_end_of_line_raw, clear_end_of_line_raw,
encode_terminal_code, write_glyphs, term_init): Ditto.
1999-09-13 11:13:53 +00:00
Gerd Moellmann
cfe8a05e43 (produce_glyphs): Set iterator's physical height
information.
1999-08-06 13:59:39 +00:00
Gerd Moellmann
a168702af0 Rewritten.
(append_glyph): New.
(update_end): Turn cursor on only if selected window's
cursor_off_p flag is not set.
(TS_cursor_visible): Renamed from TS_visual_mode.
(TS_cursor_normal): Renamed from TS_end_visual_mode.
(TS_cursor_invisible):  New.
(term_init): Initialize TS_cursor_invisible.
(tty_hide_cursor): New.
(tty_show_cursor): New.
(update_end): Show tty cursor.
(update_begin): Hide tty cursor to prevent cursor flickering
during redisplays triggered by timers (stealth fontification).
(estimate_mode_line_height): New.
(estimate_mode_line_height_hook): New.
(OUTPUT_IF): Make replacement text have statement form.
(OUTPUT1_IF): Ditto.
(TS_italic_mode, TS_end_italic_mode): Removed.
(TS_bold_mode): Removed.
(TS_underscore_mode, TS_end_underscore_mode): Removed.
(TS_enter_bold_mode, TS_enter_dim_mode, TS_enter_blink_mode): New.
(TS_enter_reverse_mode): New.
(TS_enter_underline_mode, TS_exit_underline_mode): New.
(TN_magic_cookie_glitch_ul): New.
(TS_enter_alt_charset_mode, TS_exit_alt_charset_mode): New.
(TS_exit_attribute_mode): New.
(TN_max_colors, TN_max_pairs, TS_orig_pairs): New.
(TS_set_foreground, TS_set_background): New.
(reset_terminal_modes): Switch colors back to default.
(write_glyphs): Turn face on before writing text, turn it off
afterwards.
(insert_glyphs): Ditto.
(term_init): Initialize new terminal capability variables.
(turn_on_face): Turn a face on.
(turn_off_face): Turn a face off.
(global): Rewrite for new glyphs.
1999-07-21 21:43:52 +00:00
Karl Heuer
a678d9fff1 (term_init): Use xmalloc, not malloc. 1999-03-04 09:02:51 +00:00
Kenichi Handa
f3ac545f7d (encode_terminal_code): Fix previous change. 1999-02-05 05:40:27 +00:00
Kenichi Handa
c42869c47d (encode_terminal_code): Handle raw 8-bit codes correctly. 1998-09-28 11:52:53 +00:00
Kenichi Handa
1814bd62c5 (write_glyphs): When terminal_coding require flushing,
call encode_coding with "" as the SOURCE arg so that ccl_driver
correctly processes eof block of a CCL program.
1998-08-18 13:15:18 +00:00
Geoff Voelker
eccec691ae Include cm.h after dispextern.h to avoid name conflicts
in Windows system headers.
(term_init) [WINDOWSNT]: Do not include remainder of function.
1998-04-29 04:34:52 +00:00
Geoff Voelker
b3e1cb05b4 (reset_terminal_modes): Only invoke hook if defined. 1998-04-17 05:25:48 +00:00
Andreas Schwab
dfcf069d56 Fix -Wimplicit warnings. 1998-04-14 12:25:56 +00:00
Kenichi Handa
6589fd67a7 (encode_terminal_code): Adjusted for the change of
encode_coding.
(write_glyphs): Likewise.  Adjusted for the change of struct
coding_system.
(insert_glyphs): Likewise.
1998-01-22 01:26:45 +00:00
Kenichi Handa
ca1e6a1391 (encode_terminal_code): Use new macros defined in
coding.h.
(write_glyphs): Likewise.
1997-11-08 03:05:44 +00:00
Richard M. Stallman
403c995bb8 (term_get_fkeys_1): Use kH as alternate for move-to-last-line. 1997-08-16 16:39:20 +00:00
Kenichi Handa
df8bf43147 (encode_terminal_code): Use safe_terminal_coding if
terminal_coding seems to encode Emacs' internal code as is.
(write_glyphs): Likewise.
1997-08-10 04:13:19 +00:00
Richard M. Stallman
171d7f241b Minor cleanup. 1997-07-30 03:57:26 +00:00
Richard M. Stallman
f3c6bfa210 (insert_glyphs): Use &, not &&. 1997-05-31 02:45:18 +00:00
Karl Heuer
5c34fe36c4 Fix comment typo. 1997-04-03 21:36:09 +00:00
Kenichi Handa
07109bf9ed (insert_glyphs): Fix a bug which turns up when
TS_ins_multi_chars is 0.
1997-03-19 16:32:46 +00:00