Commit Graph

115 Commits

Author SHA1 Message Date
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
Kenichi Handa
085d590815 (encode_terminal_code): Check validity of character code. 1997-03-18 23:31:34 +00:00
Karl Heuer
a4decb7fcd Include charset.h and coding.h.
(TS_end_italic_mode, TS_italic_mode, TS_bold_mode): New variables.
(TS_end_bold_mode, TS_end_underscore_mode): New variables.
(TS_underscore_mode): New variable.
(encode_terminal_code): New function.
(write_glyphs, insert_glyphs): Perform character code conversion
on output to a terminal.
(term_init): Initialize TS_bold_mode, TS_end_bold_mode,
TS_end_underscore_mode, and TS_underscore_mode.
1997-02-20 06:57:21 +00:00
Richard M. Stallman
e12c105445 (fatal): Print a newline at the end.
(term_init): Calls to fatal changed.
1997-01-20 02:21:19 +00:00
Geoff Voelker
29f27c39d1 (term_init): Use new name initialize_w32_display. 1997-01-20 00:39:13 +00:00
Richard M. Stallman
1efd8636b2 (term_init): Use new vertical scroll bar enumerated type.
Use new macro SET_FRAME_WIDTH.
1996-09-21 02:25:37 +00:00
Richard M. Stallman
1d718789f5 (OUTPUT_IF, OUTPUT): Cast frame height to int. 1996-09-03 22:22:10 +00:00
Richard M. Stallman
3b12ce121e (term_init): Avoid type-mismatch calling get_frame_size. 1996-09-03 22:00:27 +00:00