Mercurial > emacs
comparison src/msdos.c @ 40082:0eaf29d6544e
(IT_reassert_line_highlight, IT_change_line_highlight): Functions removed.
(internal_terminal_init): Don't set reassert_line_highlight_hook
or change_line_highlight_hook.
(highlight): Variable removed.
(IT_set_face, IT_update_begin, IT_update_end, IT_set_terminal_modes):
Don't set or use it.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 20 Oct 2001 05:54:22 +0000 |
parents | 5fa40c87fc5b |
children | cdfd4d09b79a |
comparison
equal
deleted
inserted
replaced
40081:07d7dbf18784 | 40082:0eaf29d6544e |
---|---|
372 static int internal_terminal = 0; | 372 static int internal_terminal = 0; |
373 | 373 |
374 #ifndef HAVE_X_WINDOWS | 374 #ifndef HAVE_X_WINDOWS |
375 extern unsigned char ScreenAttrib; | 375 extern unsigned char ScreenAttrib; |
376 static int screen_face; | 376 static int screen_face; |
377 static int highlight; | |
378 | 377 |
379 static int screen_size_X; | 378 static int screen_size_X; |
380 static int screen_size_Y; | 379 static int screen_size_Y; |
381 static int screen_size; | 380 static int screen_size; |
382 | 381 |
893 fg = fp->foreground; | 892 fg = fp->foreground; |
894 bg = fp->background; | 893 bg = fp->background; |
895 dflt_fg = dfp->foreground; | 894 dflt_fg = dfp->foreground; |
896 dflt_bg = dfp->background; | 895 dflt_bg = dfp->background; |
897 | 896 |
898 /* Don't use invalid colors. In particular, FACE_TTY_DEFAULT_* | 897 /* Don't use invalid colors. In particular, FACE_TTY_DEFAULT_* colors |
899 colors mean use the colors of the default face, except that if | 898 mean use the colors of the default face. Note that we assume all |
900 highlight is on, invert the foreground and the background. Note | 899 16 colors to be available for the background, since Emacs switches |
901 that we assume all 16 colors to be available for the background, | 900 on this mode (and loses the blinking attribute) at startup. */ |
902 since Emacs switches on this mode (and loses the blinking | |
903 attribute) at startup. */ | |
904 if (fg == FACE_TTY_DEFAULT_COLOR || fg == FACE_TTY_DEFAULT_FG_COLOR) | 901 if (fg == FACE_TTY_DEFAULT_COLOR || fg == FACE_TTY_DEFAULT_FG_COLOR) |
905 fg = FRAME_FOREGROUND_PIXEL (sf); | 902 fg = FRAME_FOREGROUND_PIXEL (sf); |
906 else if (fg == FACE_TTY_DEFAULT_BG_COLOR) | 903 else if (fg == FACE_TTY_DEFAULT_BG_COLOR) |
907 fg = FRAME_BACKGROUND_PIXEL (sf); | 904 fg = FRAME_BACKGROUND_PIXEL (sf); |
908 if (bg == FACE_TTY_DEFAULT_COLOR || bg == FACE_TTY_DEFAULT_BG_COLOR) | 905 if (bg == FACE_TTY_DEFAULT_COLOR || bg == FACE_TTY_DEFAULT_BG_COLOR) |
909 bg = FRAME_BACKGROUND_PIXEL (sf); | 906 bg = FRAME_BACKGROUND_PIXEL (sf); |
910 else if (bg == FACE_TTY_DEFAULT_FG_COLOR) | 907 else if (bg == FACE_TTY_DEFAULT_FG_COLOR) |
911 bg = FRAME_FOREGROUND_PIXEL (sf); | 908 bg = FRAME_FOREGROUND_PIXEL (sf); |
912 | 909 |
913 /* Make sure highlighted lines really stand out, come what may. */ | 910 /* Make sure highlighted lines really stand out, come what may. */ |
914 if ((highlight || fp->tty_reverse_p) | 911 if (fp->tty_reverse_p && (fg == dflt_fg && bg == dflt_bg)) |
915 && (fg == dflt_fg && bg == dflt_bg)) | |
916 { | 912 { |
917 unsigned long tem = fg; | 913 unsigned long tem = fg; |
918 | 914 |
919 fg = bg; | 915 fg = bg; |
920 bg = tem; | 916 bg = tem; |
926 | 922 |
927 fg = bg; | 923 fg = bg; |
928 bg = tem2; | 924 bg = tem2; |
929 } | 925 } |
930 if (termscript) | 926 if (termscript) |
931 fprintf (termscript, "<FACE %d%s: %d/%d[FG:%d/BG:%d]>", face, | 927 fprintf (termscript, "<FACE %d: %d/%d[FG:%d/BG:%d]>", face, |
932 highlight ? "H" : "", fp->foreground, fp->background, fg, bg); | 928 fp->foreground, fp->background, fg, bg); |
933 if (fg >= 0 && fg < 16) | 929 if (fg >= 0 && fg < 16) |
934 { | 930 { |
935 ScreenAttrib &= 0xf0; | 931 ScreenAttrib &= 0xf0; |
936 ScreenAttrib |= fg; | 932 ScreenAttrib |= fg; |
937 } | 933 } |
1934 if (!mouse_visible) | 1930 if (!mouse_visible) |
1935 mouse_on (); | 1931 mouse_on (); |
1936 } | 1932 } |
1937 | 1933 |
1938 static void | 1934 static void |
1939 IT_reassert_line_highlight (int new, int vpos) | |
1940 { | |
1941 highlight = new; | |
1942 } | |
1943 | |
1944 static void | |
1945 IT_change_line_highlight (int new_highlight, int y, int vpos, int first_unused_hpos) | |
1946 { | |
1947 highlight = new_highlight; | |
1948 IT_cursor_to (vpos, 0); | |
1949 IT_clear_end_of_line (first_unused_hpos); | |
1950 } | |
1951 | |
1952 static void | |
1953 IT_update_begin (struct frame *f) | 1935 IT_update_begin (struct frame *f) |
1954 { | 1936 { |
1955 struct display_info *display_info = FRAME_X_DISPLAY_INFO (f); | 1937 struct display_info *display_info = FRAME_X_DISPLAY_INFO (f); |
1956 struct frame *mouse_face_frame = display_info->mouse_face_mouse_frame; | 1938 struct frame *mouse_face_frame = display_info->mouse_face_mouse_frame; |
1957 | |
1958 highlight = 0; | |
1959 | 1939 |
1960 BLOCK_INPUT; | 1940 BLOCK_INPUT; |
1961 | 1941 |
1962 if (f && f == mouse_face_frame) | 1942 if (f && f == mouse_face_frame) |
1963 { | 1943 { |
2011 } | 1991 } |
2012 | 1992 |
2013 static void | 1993 static void |
2014 IT_update_end (struct frame *f) | 1994 IT_update_end (struct frame *f) |
2015 { | 1995 { |
2016 highlight = 0; | |
2017 FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0; | 1996 FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0; |
2018 } | 1997 } |
2019 | 1998 |
2020 Lisp_Object Qcursor_type; | 1999 Lisp_Object Qcursor_type; |
2021 | 2000 |
2148 static void | 2127 static void |
2149 IT_set_terminal_modes (void) | 2128 IT_set_terminal_modes (void) |
2150 { | 2129 { |
2151 if (termscript) | 2130 if (termscript) |
2152 fprintf (termscript, "\n<SET_TERM>"); | 2131 fprintf (termscript, "\n<SET_TERM>"); |
2153 highlight = 0; | |
2154 | 2132 |
2155 screen_size_X = ScreenCols (); | 2133 screen_size_X = ScreenCols (); |
2156 screen_size_Y = ScreenRows (); | 2134 screen_size_Y = ScreenRows (); |
2157 screen_size = screen_size_X * screen_size_Y; | 2135 screen_size = screen_size_X * screen_size_Y; |
2158 | 2136 |
2225 int cursor_pos_X = ScreenCols () - 1; | 2203 int cursor_pos_X = ScreenCols () - 1; |
2226 int cursor_pos_Y = ScreenRows () - 1; | 2204 int cursor_pos_Y = ScreenRows () - 1; |
2227 | 2205 |
2228 if (termscript) | 2206 if (termscript) |
2229 fprintf (termscript, "\n<RESET_TERM>"); | 2207 fprintf (termscript, "\n<RESET_TERM>"); |
2230 | |
2231 highlight = 0; | |
2232 | 2208 |
2233 if (!term_setup_done) | 2209 if (!term_setup_done) |
2234 return; | 2210 return; |
2235 | 2211 |
2236 mouse_off (); | 2212 mouse_off (); |
2606 write_glyphs_hook = IT_write_glyphs; | 2582 write_glyphs_hook = IT_write_glyphs; |
2607 cursor_to_hook = raw_cursor_to_hook = IT_cursor_to; | 2583 cursor_to_hook = raw_cursor_to_hook = IT_cursor_to; |
2608 clear_to_end_hook = IT_clear_to_end; | 2584 clear_to_end_hook = IT_clear_to_end; |
2609 clear_end_of_line_hook = IT_clear_end_of_line; | 2585 clear_end_of_line_hook = IT_clear_end_of_line; |
2610 clear_frame_hook = IT_clear_screen; | 2586 clear_frame_hook = IT_clear_screen; |
2611 change_line_highlight_hook = IT_change_line_highlight; | |
2612 update_begin_hook = IT_update_begin; | 2587 update_begin_hook = IT_update_begin; |
2613 update_end_hook = IT_update_end; | 2588 update_end_hook = IT_update_end; |
2614 reassert_line_highlight_hook = IT_reassert_line_highlight; | |
2615 frame_up_to_date_hook = IT_frame_up_to_date; | 2589 frame_up_to_date_hook = IT_frame_up_to_date; |
2616 | 2590 |
2617 /* These hooks are called by term.c without being checked. */ | 2591 /* These hooks are called by term.c without being checked. */ |
2618 set_terminal_modes_hook = IT_set_terminal_modes; | 2592 set_terminal_modes_hook = IT_set_terminal_modes; |
2619 reset_terminal_modes_hook = IT_reset_terminal_modes; | 2593 reset_terminal_modes_hook = IT_reset_terminal_modes; |