Mercurial > emacs
comparison src/msdos.c @ 21785:c7ef8b48a039
(IT_ring_bell, IT_write_glyphs, IT_clear_end_of_line,
IT_clear_screen, IT_clear_to_end, IT_clear_to_end, IT_cursor_to,
IT_cmgoto, IT_reassert_line_highlight, IT_change_line_highlight,
IT_update_begin, IT_update_end, IT_set_terminal_modes,
IT_reset_terminal_modes, IT_set_terminal_window,
pixel_to_glyph_coords, IT_menu_display): Bring definitions in
accordance with prototype declarations.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Mon, 27 Apr 1998 14:18:00 +0000 |
parents | fc0153e88b71 |
children | d313bff62b93 |
comparison
equal
deleted
inserted
replaced
21784:8de4e2a8cc62 | 21785:c7ef8b48a039 |
---|---|
598 return; | 598 return; |
599 | 599 |
600 mouse_off (); | 600 mouse_off (); |
601 } | 601 } |
602 | 602 |
603 static | 603 static void |
604 IT_ring_bell () | 604 IT_ring_bell (void) |
605 { | 605 { |
606 if (visible_bell) | 606 if (visible_bell) |
607 { | 607 { |
608 mouse_off (); | 608 mouse_off (); |
609 ScreenVisualBell (); | 609 ScreenVisualBell (); |
634 face, FACE_FOREGROUND (fp), FACE_BACKGROUND (fp)); | 634 face, FACE_FOREGROUND (fp), FACE_BACKGROUND (fp)); |
635 screen_face = face; | 635 screen_face = face; |
636 ScreenAttrib = (FACE_BACKGROUND (fp) << 4) | FACE_FOREGROUND (fp); | 636 ScreenAttrib = (FACE_BACKGROUND (fp) << 4) | FACE_FOREGROUND (fp); |
637 } | 637 } |
638 | 638 |
639 static | 639 static void |
640 IT_write_glyphs (GLYPH *str, int len) | 640 IT_write_glyphs (GLYPH *str, int len) |
641 { | 641 { |
642 int newface; | 642 int newface; |
643 int ch, l = len; | 643 int ch, l = len; |
644 unsigned char *buf, *bp; | 644 unsigned char *buf, *bp; |
667 if (screen_virtual_segment) | 667 if (screen_virtual_segment) |
668 dosv_refresh_virtual_screen (offset, len); | 668 dosv_refresh_virtual_screen (offset, len); |
669 new_pos_X += len; | 669 new_pos_X += len; |
670 } | 670 } |
671 | 671 |
672 static | 672 static void |
673 IT_clear_end_of_line (first_unused) | 673 IT_clear_end_of_line (int first_unused) |
674 { | 674 { |
675 char *spaces, *sp; | 675 char *spaces, *sp; |
676 int i, j; | 676 int i, j; |
677 int offset = 2 * (new_pos_X + screen_size_X * new_pos_Y); | 677 int offset = 2 * (new_pos_X + screen_size_X * new_pos_Y); |
678 | 678 |
692 dosmemput (spaces, i, (int)ScreenPrimary + offset); | 692 dosmemput (spaces, i, (int)ScreenPrimary + offset); |
693 if (screen_virtual_segment) | 693 if (screen_virtual_segment) |
694 dosv_refresh_virtual_screen (offset, i / 2); | 694 dosv_refresh_virtual_screen (offset, i / 2); |
695 } | 695 } |
696 | 696 |
697 static | 697 static void |
698 IT_clear_screen (void) | 698 IT_clear_screen (void) |
699 { | 699 { |
700 if (termscript) | 700 if (termscript) |
701 fprintf (termscript, "<CLR:SCR>"); | 701 fprintf (termscript, "<CLR:SCR>"); |
702 IT_set_face (0); | 702 IT_set_face (0); |
705 if (screen_virtual_segment) | 705 if (screen_virtual_segment) |
706 dosv_refresh_virtual_screen (0, screen_size); | 706 dosv_refresh_virtual_screen (0, screen_size); |
707 new_pos_X = new_pos_Y = 0; | 707 new_pos_X = new_pos_Y = 0; |
708 } | 708 } |
709 | 709 |
710 static | 710 static void |
711 IT_clear_to_end (void) | 711 IT_clear_to_end (void) |
712 { | 712 { |
713 if (termscript) | 713 if (termscript) |
714 fprintf (termscript, "<CLR:EOS>"); | 714 fprintf (termscript, "<CLR:EOS>"); |
715 | 715 |
718 IT_clear_end_of_line (0); | 718 IT_clear_end_of_line (0); |
719 new_pos_Y++; | 719 new_pos_Y++; |
720 } | 720 } |
721 } | 721 } |
722 | 722 |
723 static | 723 static void |
724 IT_cursor_to (int y, int x) | 724 IT_cursor_to (int y, int x) |
725 { | 725 { |
726 if (termscript) | 726 if (termscript) |
727 fprintf (termscript, "\n<XY=%dx%d>", x, y); | 727 fprintf (termscript, "\n<XY=%dx%d>", x, y); |
728 new_pos_X = x; | 728 new_pos_X = x; |
763 and also make the mouse pointer visible. | 763 and also make the mouse pointer visible. |
764 | 764 |
765 Special treatment is required when the cursor is in the echo area, | 765 Special treatment is required when the cursor is in the echo area, |
766 to put the cursor at the end of the text displayed there. */ | 766 to put the cursor at the end of the text displayed there. */ |
767 | 767 |
768 static | 768 static void |
769 IT_cmgoto (f) | 769 IT_cmgoto (FRAME_PTR f) |
770 FRAME_PTR f; | |
771 { | 770 { |
772 /* Only set the cursor to where it should be if the display is | 771 /* Only set the cursor to where it should be if the display is |
773 already in sync with the window contents. */ | 772 already in sync with the window contents. */ |
774 int update_cursor_pos = MODIFF == unchanged_modified; | 773 int update_cursor_pos = MODIFF == unchanged_modified; |
775 | 774 |
796 keyboard input. */ | 795 keyboard input. */ |
797 if (!mouse_visible) | 796 if (!mouse_visible) |
798 mouse_on (); | 797 mouse_on (); |
799 } | 798 } |
800 | 799 |
801 static | 800 static void |
802 IT_reassert_line_highlight (new, vpos) | 801 IT_reassert_line_highlight (int new, int vpos) |
803 int new, vpos; | |
804 { | 802 { |
805 highlight = new; | 803 highlight = new; |
806 IT_set_face (0); /* To possibly clear the highlighting. */ | 804 IT_set_face (0); /* To possibly clear the highlighting. */ |
807 } | 805 } |
808 | 806 |
809 static | 807 static void |
810 IT_change_line_highlight (new_highlight, vpos, first_unused_hpos) | 808 IT_change_line_highlight (int new_highlight, int vpos, int first_unused_hpos) |
811 { | 809 { |
812 highlight = new_highlight; | 810 highlight = new_highlight; |
813 IT_set_face (0); /* To possibly clear the highlighting. */ | 811 IT_set_face (0); /* To possibly clear the highlighting. */ |
814 IT_cursor_to (vpos, 0); | 812 IT_cursor_to (vpos, 0); |
815 IT_clear_end_of_line (first_unused_hpos); | 813 IT_clear_end_of_line (first_unused_hpos); |
816 } | 814 } |
817 | 815 |
818 static | 816 static void |
819 IT_update_begin () | 817 IT_update_begin (struct frame *foo) |
820 { | 818 { |
821 highlight = 0; | 819 highlight = 0; |
822 IT_set_face (0); /* To possibly clear the highlighting. */ | 820 IT_set_face (0); /* To possibly clear the highlighting. */ |
823 screen_face = -1; | 821 screen_face = -1; |
824 } | 822 } |
825 | 823 |
826 static | 824 static void |
827 IT_update_end () | 825 IT_update_end (struct frame *foo) |
828 { | 826 { |
829 } | 827 } |
830 | 828 |
831 /* set-window-configuration on window.c needs this. */ | 829 /* set-window-configuration on window.c needs this. */ |
832 void | 830 void |
844 extern Lisp_Object Qtitle; | 842 extern Lisp_Object Qtitle; |
845 | 843 |
846 /* IT_set_terminal_modes is called when emacs is started, | 844 /* IT_set_terminal_modes is called when emacs is started, |
847 resumed, and whenever the screen is redrawn! */ | 845 resumed, and whenever the screen is redrawn! */ |
848 | 846 |
849 static | 847 static void |
850 IT_set_terminal_modes (void) | 848 IT_set_terminal_modes (void) |
851 { | 849 { |
852 if (termscript) | 850 if (termscript) |
853 fprintf (termscript, "\n<SET_TERM>"); | 851 fprintf (termscript, "\n<SET_TERM>"); |
854 highlight = 0; | 852 highlight = 0; |
907 } | 905 } |
908 | 906 |
909 /* IT_reset_terminal_modes is called when emacs is | 907 /* IT_reset_terminal_modes is called when emacs is |
910 suspended or killed. */ | 908 suspended or killed. */ |
911 | 909 |
912 static | 910 static void |
913 IT_reset_terminal_modes (void) | 911 IT_reset_terminal_modes (void) |
914 { | 912 { |
915 int display_row_start = (int) ScreenPrimary; | 913 int display_row_start = (int) ScreenPrimary; |
916 int saved_row_len = startup_screen_size_X * 2; | 914 int saved_row_len = startup_screen_size_X * 2; |
917 int update_row_len = ScreenCols () * 2; | 915 int update_row_len = ScreenCols () * 2; |
979 xfree (startup_screen_buffer); | 977 xfree (startup_screen_buffer); |
980 | 978 |
981 term_setup_done = 0; | 979 term_setup_done = 0; |
982 } | 980 } |
983 | 981 |
984 static | 982 static void |
985 IT_set_terminal_window (void) | 983 IT_set_terminal_window (int foo) |
986 { | 984 { |
987 } | 985 } |
988 | 986 |
989 void | 987 void |
990 IT_set_frame_parameters (f, alist) | 988 IT_set_frame_parameters (f, alist) |
1954 void | 1952 void |
1955 pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip) | 1953 pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip) |
1956 FRAME_PTR f; | 1954 FRAME_PTR f; |
1957 register int pix_x, pix_y; | 1955 register int pix_x, pix_y; |
1958 register int *x, *y; | 1956 register int *x, *y; |
1959 void /* XRectangle */ *bounds; | 1957 XRectangle *bounds; |
1960 int noclip; | 1958 int noclip; |
1961 { | 1959 { |
1962 if (bounds) abort (); | 1960 if (bounds) abort (); |
1963 | 1961 |
1964 /* Ignore clipping. */ | 1962 /* Ignore clipping. */ |
2075 | 2073 |
2076 width = menu->width; | 2074 width = menu->width; |
2077 text = (GLYPH *) xmalloc ((width + 2) * sizeof (GLYPH)); | 2075 text = (GLYPH *) xmalloc ((width + 2) * sizeof (GLYPH)); |
2078 ScreenGetCursor (&row, &col); | 2076 ScreenGetCursor (&row, &col); |
2079 mouse_get_xy (&mx, &my); | 2077 mouse_get_xy (&mx, &my); |
2080 IT_update_begin (); | 2078 IT_update_begin (selected_frame); |
2081 for (i = 0; i < menu->count; i++) | 2079 for (i = 0; i < menu->count; i++) |
2082 { | 2080 { |
2083 IT_cursor_to (y + i, x); | 2081 IT_cursor_to (y + i, x); |
2084 enabled | 2082 enabled |
2085 = (!menu->submenu[i] && menu->panenumber[i]) || (menu->submenu[i]); | 2083 = (!menu->submenu[i] && menu->panenumber[i]) || (menu->submenu[i]); |
2102 for (; j < width; j++) | 2100 for (; j < width; j++) |
2103 *p++ = FAST_MAKE_GLYPH (' ', face); | 2101 *p++ = FAST_MAKE_GLYPH (' ', face); |
2104 *p++ = FAST_MAKE_GLYPH (menu->submenu[i] ? 16 : ' ', face); | 2102 *p++ = FAST_MAKE_GLYPH (menu->submenu[i] ? 16 : ' ', face); |
2105 IT_write_glyphs (text, width + 2); | 2103 IT_write_glyphs (text, width + 2); |
2106 } | 2104 } |
2107 IT_update_end (); | 2105 IT_update_end (selected_frame); |
2108 IT_cursor_to (row, col); | 2106 IT_cursor_to (row, col); |
2109 xfree (text); | 2107 xfree (text); |
2110 } | 2108 } |
2111 | 2109 |
2112 /* --------------------------- X Menu emulation ---------------------- */ | 2110 /* --------------------------- X Menu emulation ---------------------- */ |