diff options
| author | Paul Eggert | 2011-04-11 23:01:37 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-11 23:01:37 -0700 |
| commit | 8524aef308e0fe9955cfab9dc5c41ca62f7865cd (patch) | |
| tree | ff170436532b585f5f960c16bee7d619ef80ab9f | |
| parent | 16390cd253ff51ab31e3f5c607827486959e1c64 (diff) | |
| download | emacs-8524aef308e0fe9955cfab9dc5c41ca62f7865cd.tar.gz emacs-8524aef308e0fe9955cfab9dc5c41ca62f7865cd.zip | |
* xdisp.c: Make symbols static if they're not exported.
* dispextern.h (scratch_glyph_row, window_box_edges):
(glyph_to_pixel_coords, set_cursor_from_row):
(get_next_display_element, set_iterator_to_next):
(highlight_trailing_whitespace, frame_to_window_pixel_xy):
(show_mouse_face): Remove decls
* frame.h (message_buf_print): Likewise.
* lisp.h (pop_message, set_message, check_point_in_composition):
Likewise.
* xterm.h (set_vertical_scroll_bar): Likewise.
* xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
(message_buf_print, scratch_glyph_row, displayed_buffer):
(set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
(get_next_display_element, show_mouse_face, window_box_edges):
(frame_to_window_pixel_xy, check_point_in_composition):
(set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
(glyph_to_pixel_coords): Remove; unused.
| -rw-r--r-- | src/ChangeLog | 18 | ||||
| -rw-r--r-- | src/dispextern.h | 16 | ||||
| -rw-r--r-- | src/frame.h | 5 | ||||
| -rw-r--r-- | src/lisp.h | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 101 | ||||
| -rw-r--r-- | src/xterm.h | 1 |
6 files changed, 44 insertions, 101 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 22938117ff1..dad33d964d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,23 @@ | |||
| 1 | 2011-04-12 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-04-12 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * xdisp.c: Make symbols static if they're not exported. | ||
| 4 | * dispextern.h (scratch_glyph_row, window_box_edges): | ||
| 5 | (glyph_to_pixel_coords, set_cursor_from_row): | ||
| 6 | (get_next_display_element, set_iterator_to_next): | ||
| 7 | (highlight_trailing_whitespace, frame_to_window_pixel_xy): | ||
| 8 | (show_mouse_face): Remove decls | ||
| 9 | * frame.h (message_buf_print): Likewise. | ||
| 10 | * lisp.h (pop_message, set_message, check_point_in_composition): | ||
| 11 | Likewise. | ||
| 12 | * xterm.h (set_vertical_scroll_bar): Likewise. | ||
| 13 | * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed): | ||
| 14 | (message_buf_print, scratch_glyph_row, displayed_buffer): | ||
| 15 | (set_iterator_to_next, pop_message, set_message, set_cursor_from_row): | ||
| 16 | (get_next_display_element, show_mouse_face, window_box_edges): | ||
| 17 | (frame_to_window_pixel_xy, check_point_in_composition): | ||
| 18 | (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static. | ||
| 19 | (glyph_to_pixel_coords): Remove; unused. | ||
| 20 | |||
| 3 | * dired.c (file_name_completion): Now static. | 21 | * dired.c (file_name_completion): Now static. |
| 4 | 22 | ||
| 5 | * dbusbind.c (xd_in_read_queued_messages): Now static. | 23 | * dbusbind.c (xd_in_read_queued_messages): Now static. |
diff --git a/src/dispextern.h b/src/dispextern.h index d957955ee33..a7ed24dd320 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1149,12 +1149,6 @@ extern int updated_area; | |||
| 1149 | 1149 | ||
| 1150 | extern int display_completed; | 1150 | extern int display_completed; |
| 1151 | 1151 | ||
| 1152 | /* A temporary storage area, including a row of glyphs. Initialized | ||
| 1153 | in xdisp.c. Used for various purposes, as an example see | ||
| 1154 | get_overlay_arrow_glyph_row. */ | ||
| 1155 | |||
| 1156 | extern struct glyph_row scratch_glyph_row; | ||
| 1157 | |||
| 1158 | 1152 | ||
| 1159 | 1153 | ||
| 1160 | /************************************************************************ | 1154 | /************************************************************************ |
| @@ -2965,24 +2959,17 @@ int window_box_left (struct window *, int); | |||
| 2965 | int window_box_left_offset (struct window *, int); | 2959 | int window_box_left_offset (struct window *, int); |
| 2966 | int window_box_right (struct window *, int); | 2960 | int window_box_right (struct window *, int); |
| 2967 | int window_box_right_offset (struct window *, int); | 2961 | int window_box_right_offset (struct window *, int); |
| 2968 | void window_box_edges (struct window *, int, int *, int *, int *, int *); | ||
| 2969 | int estimate_mode_line_height (struct frame *, enum face_id); | 2962 | int estimate_mode_line_height (struct frame *, enum face_id); |
| 2970 | void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, | 2963 | void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, |
| 2971 | NativeRectangle *, int); | 2964 | NativeRectangle *, int); |
| 2972 | int glyph_to_pixel_coords (struct window *, int, int, int *, int *); | ||
| 2973 | void remember_mouse_glyph (struct frame *, int, int, NativeRectangle *); | 2965 | void remember_mouse_glyph (struct frame *, int, int, NativeRectangle *); |
| 2974 | 2966 | ||
| 2975 | void mark_window_display_accurate (Lisp_Object, int); | 2967 | void mark_window_display_accurate (Lisp_Object, int); |
| 2976 | void redisplay_preserve_echo_area (int); | 2968 | void redisplay_preserve_echo_area (int); |
| 2977 | int set_cursor_from_row (struct window *, struct glyph_row *, | ||
| 2978 | struct glyph_matrix *, EMACS_INT, EMACS_INT, | ||
| 2979 | int, int); | ||
| 2980 | void init_iterator (struct it *, struct window *, EMACS_INT, | 2969 | void init_iterator (struct it *, struct window *, EMACS_INT, |
| 2981 | EMACS_INT, struct glyph_row *, enum face_id); | 2970 | EMACS_INT, struct glyph_row *, enum face_id); |
| 2982 | void init_iterator_to_row_start (struct it *, struct window *, | 2971 | void init_iterator_to_row_start (struct it *, struct window *, |
| 2983 | struct glyph_row *); | 2972 | struct glyph_row *); |
| 2984 | int get_next_display_element (struct it *); | ||
| 2985 | void set_iterator_to_next (struct it *, int); | ||
| 2986 | void start_display (struct it *, struct window *, struct text_pos); | 2973 | void start_display (struct it *, struct window *, struct text_pos); |
| 2987 | void move_it_to (struct it *, EMACS_INT, int, int, int, int); | 2974 | void move_it_to (struct it *, EMACS_INT, int, int, int, int); |
| 2988 | void move_it_vertically (struct it *, int); | 2975 | void move_it_vertically (struct it *, int); |
| @@ -2994,7 +2981,6 @@ void move_it_in_display_line (struct it *it, | |||
| 2994 | enum move_operation_enum op); | 2981 | enum move_operation_enum op); |
| 2995 | int in_display_vector_p (struct it *); | 2982 | int in_display_vector_p (struct it *); |
| 2996 | int frame_mode_line_height (struct frame *); | 2983 | int frame_mode_line_height (struct frame *); |
| 2997 | void highlight_trailing_whitespace (struct frame *, struct glyph_row *); | ||
| 2998 | extern Lisp_Object Qtool_bar; | 2984 | extern Lisp_Object Qtool_bar; |
| 2999 | extern int redisplaying_p; | 2985 | extern int redisplaying_p; |
| 3000 | extern int help_echo_showing_p; | 2986 | extern int help_echo_showing_p; |
| @@ -3057,12 +3043,10 @@ extern int x_intersect_rectangles (XRectangle *, XRectangle *, | |||
| 3057 | XRectangle *); | 3043 | XRectangle *); |
| 3058 | #endif /* HAVE_WINDOW_SYSTEM */ | 3044 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 3059 | 3045 | ||
| 3060 | extern void frame_to_window_pixel_xy (struct window *, int *, int *); | ||
| 3061 | extern void note_mouse_highlight (struct frame *, int, int); | 3046 | extern void note_mouse_highlight (struct frame *, int, int); |
| 3062 | extern void x_clear_window_mouse_face (struct window *); | 3047 | extern void x_clear_window_mouse_face (struct window *); |
| 3063 | extern void cancel_mouse_face (struct frame *); | 3048 | extern void cancel_mouse_face (struct frame *); |
| 3064 | extern int clear_mouse_face (Mouse_HLInfo *); | 3049 | extern int clear_mouse_face (Mouse_HLInfo *); |
| 3065 | extern void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face); | ||
| 3066 | extern int cursor_in_mouse_face_p (struct window *w); | 3050 | extern int cursor_in_mouse_face_p (struct window *w); |
| 3067 | extern void draw_row_with_mouse_face (struct window *, int, struct glyph_row *, | 3051 | extern void draw_row_with_mouse_face (struct window *, int, struct glyph_row *, |
| 3068 | int, int, enum draw_glyphs_face); | 3052 | int, int, enum draw_glyphs_face); |
diff --git a/src/frame.h b/src/frame.h index a82de35efb1..0f189414e08 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -31,11 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 31 | /* Nonzero means there is at least one garbaged frame. */ | 31 | /* Nonzero means there is at least one garbaged frame. */ |
| 32 | extern int frame_garbaged; | 32 | extern int frame_garbaged; |
| 33 | 33 | ||
| 34 | /* Nonzero means FRAME_MESSAGE_BUF (selected_frame) is being used by | ||
| 35 | print. */ | ||
| 36 | |||
| 37 | extern int message_buf_print; | ||
| 38 | |||
| 39 | 34 | ||
| 40 | /* The structure representing a frame. */ | 35 | /* The structure representing a frame. */ |
| 41 | 36 | ||
diff --git a/src/lisp.h b/src/lisp.h index ce6a3c58858..7f4f06c5c5d 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2621,10 +2621,8 @@ extern void setup_echo_area_for_printing (int); | |||
| 2621 | extern int push_message (void); | 2621 | extern int push_message (void); |
| 2622 | extern Lisp_Object pop_message_unwind (Lisp_Object); | 2622 | extern Lisp_Object pop_message_unwind (Lisp_Object); |
| 2623 | extern Lisp_Object restore_message_unwind (Lisp_Object); | 2623 | extern Lisp_Object restore_message_unwind (Lisp_Object); |
| 2624 | extern void pop_message (void); | ||
| 2625 | extern void restore_message (void); | 2624 | extern void restore_message (void); |
| 2626 | extern Lisp_Object current_message (void); | 2625 | extern Lisp_Object current_message (void); |
| 2627 | extern void set_message (const char *s, Lisp_Object, EMACS_INT, int); | ||
| 2628 | extern void clear_message (int, int); | 2626 | extern void clear_message (int, int); |
| 2629 | extern void message (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); | 2627 | extern void message (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); |
| 2630 | extern void message1 (const char *); | 2628 | extern void message1 (const char *); |
| @@ -2639,8 +2637,6 @@ extern void message_log_maybe_newline (void); | |||
| 2639 | extern void update_echo_area (void); | 2637 | extern void update_echo_area (void); |
| 2640 | extern void truncate_echo_area (EMACS_INT); | 2638 | extern void truncate_echo_area (EMACS_INT); |
| 2641 | extern void redisplay (void); | 2639 | extern void redisplay (void); |
| 2642 | extern int check_point_in_composition | ||
| 2643 | (struct buffer *, EMACS_INT, struct buffer *, EMACS_INT); | ||
| 2644 | extern void redisplay_preserve_echo_area (int); | 2640 | extern void redisplay_preserve_echo_area (int); |
| 2645 | extern void prepare_menu_bars (void); | 2641 | extern void prepare_menu_bars (void); |
| 2646 | 2642 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index ec9a112996f..14a38d82873 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -337,7 +337,7 @@ static Lisp_Object Qarrow, Qhand; | |||
| 337 | Lisp_Object Qtext; | 337 | Lisp_Object Qtext; |
| 338 | 338 | ||
| 339 | /* Holds the list (error). */ | 339 | /* Holds the list (error). */ |
| 340 | Lisp_Object list_of_error; | 340 | static Lisp_Object list_of_error; |
| 341 | 341 | ||
| 342 | static Lisp_Object Qfontification_functions; | 342 | static Lisp_Object Qfontification_functions; |
| 343 | 343 | ||
| @@ -499,7 +499,7 @@ Lisp_Object echo_area_window; | |||
| 499 | message_enable_multibyte on the stack, the function restore_message | 499 | message_enable_multibyte on the stack, the function restore_message |
| 500 | pops the stack and displays MESSAGE again. */ | 500 | pops the stack and displays MESSAGE again. */ |
| 501 | 501 | ||
| 502 | Lisp_Object Vmessage_stack; | 502 | static Lisp_Object Vmessage_stack; |
| 503 | 503 | ||
| 504 | /* Nonzero means multibyte characters were enabled when the echo area | 504 | /* Nonzero means multibyte characters were enabled when the echo area |
| 505 | message was specified. */ | 505 | message was specified. */ |
| @@ -522,7 +522,7 @@ int cursor_type_changed; | |||
| 522 | /* Nonzero after display_mode_line if %l was used and it displayed a | 522 | /* Nonzero after display_mode_line if %l was used and it displayed a |
| 523 | line number. */ | 523 | line number. */ |
| 524 | 524 | ||
| 525 | int line_number_displayed; | 525 | static int line_number_displayed; |
| 526 | 526 | ||
| 527 | /* The name of the *Messages* buffer, a string. */ | 527 | /* The name of the *Messages* buffer, a string. */ |
| 528 | 528 | ||
| @@ -549,7 +549,7 @@ static int display_last_displayed_message_p; | |||
| 549 | /* Nonzero if echo area is being used by print; zero if being used by | 549 | /* Nonzero if echo area is being used by print; zero if being used by |
| 550 | message. */ | 550 | message. */ |
| 551 | 551 | ||
| 552 | int message_buf_print; | 552 | static int message_buf_print; |
| 553 | 553 | ||
| 554 | /* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable. */ | 554 | /* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable. */ |
| 555 | 555 | ||
| @@ -565,7 +565,7 @@ static int message_cleared_p; | |||
| 565 | glyphs. Also used in direct_output_for_insert. */ | 565 | glyphs. Also used in direct_output_for_insert. */ |
| 566 | 566 | ||
| 567 | #define MAX_SCRATCH_GLYPHS 100 | 567 | #define MAX_SCRATCH_GLYPHS 100 |
| 568 | struct glyph_row scratch_glyph_row; | 568 | static struct glyph_row scratch_glyph_row; |
| 569 | static struct glyph scratch_glyphs[MAX_SCRATCH_GLYPHS]; | 569 | static struct glyph scratch_glyphs[MAX_SCRATCH_GLYPHS]; |
| 570 | 570 | ||
| 571 | /* Ascent and height of the last line processed by move_it_to. */ | 571 | /* Ascent and height of the last line processed by move_it_to. */ |
| @@ -612,7 +612,7 @@ static Lisp_Object Qauto_hscroll_mode; | |||
| 612 | 612 | ||
| 613 | /* Buffer being redisplayed -- for redisplay_window_error. */ | 613 | /* Buffer being redisplayed -- for redisplay_window_error. */ |
| 614 | 614 | ||
| 615 | struct buffer *displayed_buffer; | 615 | static struct buffer *displayed_buffer; |
| 616 | 616 | ||
| 617 | /* Value returned from text property handlers (see below). */ | 617 | /* Value returned from text property handlers (see below). */ |
| 618 | 618 | ||
| @@ -756,6 +756,7 @@ static Lisp_Object Qhex_code, Qempty_box, Qthin_space, Qzero_width; | |||
| 756 | /* Function prototypes. */ | 756 | /* Function prototypes. */ |
| 757 | 757 | ||
| 758 | static void setup_for_ellipsis (struct it *, int); | 758 | static void setup_for_ellipsis (struct it *, int); |
| 759 | static void set_iterator_to_next (struct it *, int); | ||
| 759 | static void mark_window_display_accurate_1 (struct window *, int); | 760 | static void mark_window_display_accurate_1 (struct window *, int); |
| 760 | static int single_display_spec_string_p (Lisp_Object, Lisp_Object); | 761 | static int single_display_spec_string_p (Lisp_Object, Lisp_Object); |
| 761 | static int display_prop_string_p (Lisp_Object, Lisp_Object); | 762 | static int display_prop_string_p (Lisp_Object, Lisp_Object); |
| @@ -788,7 +789,9 @@ static int with_echo_area_buffer (struct window *, int, | |||
| 788 | EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); | 789 | EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); |
| 789 | static void clear_garbaged_frames (void); | 790 | static void clear_garbaged_frames (void); |
| 790 | static int current_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); | 791 | static int current_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); |
| 792 | static void pop_message (void); | ||
| 791 | static int truncate_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); | 793 | static int truncate_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); |
| 794 | static void set_message (const char *, Lisp_Object, EMACS_INT, int); | ||
| 792 | static int set_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); | 795 | static int set_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); |
| 793 | static int display_echo_area (struct window *); | 796 | static int display_echo_area (struct window *); |
| 794 | static int display_echo_area_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); | 797 | static int display_echo_area_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT); |
| @@ -820,6 +823,9 @@ static void redisplay_window (Lisp_Object, int); | |||
| 820 | static Lisp_Object redisplay_window_error (Lisp_Object); | 823 | static Lisp_Object redisplay_window_error (Lisp_Object); |
| 821 | static Lisp_Object redisplay_window_0 (Lisp_Object); | 824 | static Lisp_Object redisplay_window_0 (Lisp_Object); |
| 822 | static Lisp_Object redisplay_window_1 (Lisp_Object); | 825 | static Lisp_Object redisplay_window_1 (Lisp_Object); |
| 826 | static int set_cursor_from_row (struct window *, struct glyph_row *, | ||
| 827 | struct glyph_matrix *, EMACS_INT, EMACS_INT, | ||
| 828 | int, int); | ||
| 823 | static int update_menu_bar (struct frame *, int, int); | 829 | static int update_menu_bar (struct frame *, int, int); |
| 824 | static int try_window_reusing_current_matrix (struct window *); | 830 | static int try_window_reusing_current_matrix (struct window *); |
| 825 | static int try_window_id (struct window *); | 831 | static int try_window_id (struct window *); |
| @@ -857,6 +863,7 @@ static int init_from_display_pos (struct it *, struct window *, | |||
| 857 | struct display_pos *); | 863 | struct display_pos *); |
| 858 | static void reseat_to_string (struct it *, const char *, | 864 | static void reseat_to_string (struct it *, const char *, |
| 859 | Lisp_Object, EMACS_INT, EMACS_INT, int, int); | 865 | Lisp_Object, EMACS_INT, EMACS_INT, int, int); |
| 866 | static int get_next_display_element (struct it *); | ||
| 860 | static enum move_it_result | 867 | static enum move_it_result |
| 861 | move_it_in_display_line_to (struct it *, EMACS_INT, int, | 868 | move_it_in_display_line_to (struct it *, EMACS_INT, int, |
| 862 | enum move_operation_enum); | 869 | enum move_operation_enum); |
| @@ -904,6 +911,7 @@ static void append_stretch_glyph (struct it *, Lisp_Object, | |||
| 904 | 911 | ||
| 905 | #endif /* HAVE_WINDOW_SYSTEM */ | 912 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 906 | 913 | ||
| 914 | static void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face); | ||
| 907 | static int coords_in_mouse_face_p (struct window *, int, int); | 915 | static int coords_in_mouse_face_p (struct window *, int, int); |
| 908 | 916 | ||
| 909 | 917 | ||
| @@ -1120,7 +1128,7 @@ window_box (struct window *w, int area, int *box_x, int *box_y, | |||
| 1120 | *BOTTOM_RIGHT_Y the coordinates of the bottom-right corner of the | 1128 | *BOTTOM_RIGHT_Y the coordinates of the bottom-right corner of the |
| 1121 | box. */ | 1129 | box. */ |
| 1122 | 1130 | ||
| 1123 | INLINE void | 1131 | static INLINE void |
| 1124 | window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y, | 1132 | window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y, |
| 1125 | int *bottom_right_x, int *bottom_right_y) | 1133 | int *bottom_right_x, int *bottom_right_y) |
| 1126 | { | 1134 | { |
| @@ -1538,61 +1546,6 @@ pixel_to_glyph_coords (FRAME_PTR f, register int pix_x, register int pix_y, | |||
| 1538 | } | 1546 | } |
| 1539 | 1547 | ||
| 1540 | 1548 | ||
| 1541 | /* Given HPOS/VPOS in the current matrix of W, return corresponding | ||
| 1542 | frame-relative pixel positions in *FRAME_X and *FRAME_Y. If we | ||
| 1543 | can't tell the positions because W's display is not up to date, | ||
| 1544 | return 0. */ | ||
| 1545 | |||
| 1546 | int | ||
| 1547 | glyph_to_pixel_coords (struct window *w, int hpos, int vpos, | ||
| 1548 | int *frame_x, int *frame_y) | ||
| 1549 | { | ||
| 1550 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 1551 | if (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w)))) | ||
| 1552 | { | ||
| 1553 | int success_p; | ||
| 1554 | |||
| 1555 | xassert (hpos >= 0 && hpos < w->current_matrix->matrix_w); | ||
| 1556 | xassert (vpos >= 0 && vpos < w->current_matrix->matrix_h); | ||
| 1557 | |||
| 1558 | if (display_completed) | ||
| 1559 | { | ||
| 1560 | struct glyph_row *row = MATRIX_ROW (w->current_matrix, vpos); | ||
| 1561 | struct glyph *glyph = row->glyphs[TEXT_AREA]; | ||
| 1562 | struct glyph *end = glyph + min (hpos, row->used[TEXT_AREA]); | ||
| 1563 | |||
| 1564 | hpos = row->x; | ||
| 1565 | vpos = row->y; | ||
| 1566 | while (glyph < end) | ||
| 1567 | { | ||
| 1568 | hpos += glyph->pixel_width; | ||
| 1569 | ++glyph; | ||
| 1570 | } | ||
| 1571 | |||
| 1572 | /* If first glyph is partially visible, its first visible position is still 0. */ | ||
| 1573 | if (hpos < 0) | ||
| 1574 | hpos = 0; | ||
| 1575 | |||
| 1576 | success_p = 1; | ||
| 1577 | } | ||
| 1578 | else | ||
| 1579 | { | ||
| 1580 | hpos = vpos = 0; | ||
| 1581 | success_p = 0; | ||
| 1582 | } | ||
| 1583 | |||
| 1584 | *frame_x = WINDOW_TO_FRAME_PIXEL_X (w, hpos); | ||
| 1585 | *frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, vpos); | ||
| 1586 | return success_p; | ||
| 1587 | } | ||
| 1588 | #endif | ||
| 1589 | |||
| 1590 | *frame_x = hpos; | ||
| 1591 | *frame_y = vpos; | ||
| 1592 | return 1; | ||
| 1593 | } | ||
| 1594 | |||
| 1595 | |||
| 1596 | /* Find the glyph under window-relative coordinates X/Y in window W. | 1549 | /* Find the glyph under window-relative coordinates X/Y in window W. |
| 1597 | Consider only glyphs from buffer text, i.e. no glyphs from overlay | 1550 | Consider only glyphs from buffer text, i.e. no glyphs from overlay |
| 1598 | strings. Return in *HPOS and *VPOS the row and column number of | 1551 | strings. Return in *HPOS and *VPOS the row and column number of |
| @@ -1675,11 +1628,10 @@ x_y_to_hpos_vpos (struct window *w, int x, int y, int *hpos, int *vpos, | |||
| 1675 | return glyph; | 1628 | return glyph; |
| 1676 | } | 1629 | } |
| 1677 | 1630 | ||
| 1678 | /* EXPORT: | 1631 | /* Convert frame-relative x/y to coordinates relative to window W. |
| 1679 | Convert frame-relative x/y to coordinates relative to window W. | ||
| 1680 | Takes pseudo-windows into account. */ | 1632 | Takes pseudo-windows into account. */ |
| 1681 | 1633 | ||
| 1682 | void | 1634 | static void |
| 1683 | frame_to_window_pixel_xy (struct window *w, int *x, int *y) | 1635 | frame_to_window_pixel_xy (struct window *w, int *x, int *y) |
| 1684 | { | 1636 | { |
| 1685 | if (w->pseudo_window_p) | 1637 | if (w->pseudo_window_p) |
| @@ -5637,7 +5589,7 @@ struct frame *last_glyphless_glyph_frame = NULL; | |||
| 5637 | unsigned last_glyphless_glyph_face_id = (1 << FACE_ID_BITS); | 5589 | unsigned last_glyphless_glyph_face_id = (1 << FACE_ID_BITS); |
| 5638 | int last_glyphless_glyph_merged_face_id = 0; | 5590 | int last_glyphless_glyph_merged_face_id = 0; |
| 5639 | 5591 | ||
| 5640 | int | 5592 | static int |
| 5641 | get_next_display_element (struct it *it) | 5593 | get_next_display_element (struct it *it) |
| 5642 | { | 5594 | { |
| 5643 | /* Non-zero means that we found a display element. Zero means that | 5595 | /* Non-zero means that we found a display element. Zero means that |
| @@ -9097,7 +9049,7 @@ pop_message_unwind (Lisp_Object dummy) | |||
| 9097 | 9049 | ||
| 9098 | /* Pop the top-most entry off Vmessage_stack. */ | 9050 | /* Pop the top-most entry off Vmessage_stack. */ |
| 9099 | 9051 | ||
| 9100 | void | 9052 | static void |
| 9101 | pop_message (void) | 9053 | pop_message (void) |
| 9102 | { | 9054 | { |
| 9103 | xassert (CONSP (Vmessage_stack)); | 9055 | xassert (CONSP (Vmessage_stack)); |
| @@ -9167,7 +9119,7 @@ truncate_message_1 (EMACS_INT nchars, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4 | |||
| 9167 | to t before calling set_message_1 (which calls insert). | 9119 | to t before calling set_message_1 (which calls insert). |
| 9168 | */ | 9120 | */ |
| 9169 | 9121 | ||
| 9170 | void | 9122 | static void |
| 9171 | set_message (const char *s, Lisp_Object string, | 9123 | set_message (const char *s, Lisp_Object string, |
| 9172 | EMACS_INT nbytes, int multibyte_p) | 9124 | EMACS_INT nbytes, int multibyte_p) |
| 9173 | { | 9125 | { |
| @@ -11317,7 +11269,7 @@ overlay_arrow_at_row (struct it *it, struct glyph_row *row) | |||
| 11317 | return 0. PREV_BUF and PREV_PT are the last point buffer and | 11269 | return 0. PREV_BUF and PREV_PT are the last point buffer and |
| 11318 | position. BUF and PT are the current point buffer and position. */ | 11270 | position. BUF and PT are the current point buffer and position. */ |
| 11319 | 11271 | ||
| 11320 | int | 11272 | static int |
| 11321 | check_point_in_composition (struct buffer *prev_buf, EMACS_INT prev_pt, | 11273 | check_point_in_composition (struct buffer *prev_buf, EMACS_INT prev_pt, |
| 11322 | struct buffer *buf, EMACS_INT pt) | 11274 | struct buffer *buf, EMACS_INT pt) |
| 11323 | { | 11275 | { |
| @@ -12404,7 +12356,7 @@ redisplay_window_1 (Lisp_Object window) | |||
| 12404 | 12356 | ||
| 12405 | Return 0 if cursor is not on this row, 1 otherwise. */ | 12357 | Return 0 if cursor is not on this row, 1 otherwise. */ |
| 12406 | 12358 | ||
| 12407 | int | 12359 | static int |
| 12408 | set_cursor_from_row (struct window *w, struct glyph_row *row, | 12360 | set_cursor_from_row (struct window *w, struct glyph_row *row, |
| 12409 | struct glyph_matrix *matrix, | 12361 | struct glyph_matrix *matrix, |
| 12410 | EMACS_INT delta, EMACS_INT delta_bytes, | 12362 | EMACS_INT delta, EMACS_INT delta_bytes, |
| @@ -13675,7 +13627,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 13675 | return rc; | 13627 | return rc; |
| 13676 | } | 13628 | } |
| 13677 | 13629 | ||
| 13678 | void | 13630 | static void |
| 13679 | set_vertical_scroll_bar (struct window *w) | 13631 | set_vertical_scroll_bar (struct window *w) |
| 13680 | { | 13632 | { |
| 13681 | EMACS_INT start, end, whole; | 13633 | EMACS_INT start, end, whole; |
| @@ -16984,7 +16936,7 @@ trailing_whitespace_p (EMACS_INT charpos) | |||
| 16984 | 16936 | ||
| 16985 | /* Highlight trailing whitespace, if any, in ROW. */ | 16937 | /* Highlight trailing whitespace, if any, in ROW. */ |
| 16986 | 16938 | ||
| 16987 | void | 16939 | static void |
| 16988 | highlight_trailing_whitespace (struct frame *f, struct glyph_row *row) | 16940 | highlight_trailing_whitespace (struct frame *f, struct glyph_row *row) |
| 16989 | { | 16941 | { |
| 16990 | int used = row->used[TEXT_AREA]; | 16942 | int used = row->used[TEXT_AREA]; |
| @@ -23943,10 +23895,9 @@ draw_row_with_mouse_face (struct window *w, int start_x, struct glyph_row *row, | |||
| 23943 | #endif | 23895 | #endif |
| 23944 | } | 23896 | } |
| 23945 | 23897 | ||
| 23946 | /* EXPORT: | 23898 | /* Display the active region described by mouse_face_* according to DRAW. */ |
| 23947 | Display the active region described by mouse_face_* according to DRAW. */ | ||
| 23948 | 23899 | ||
| 23949 | void | 23900 | static void |
| 23950 | show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw) | 23901 | show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw) |
| 23951 | { | 23902 | { |
| 23952 | struct window *w = XWINDOW (hlinfo->mouse_face_window); | 23903 | struct window *w = XWINDOW (hlinfo->mouse_face_window); |
diff --git a/src/xterm.h b/src/xterm.h index 15630e902e5..e0e8240e9e8 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -991,7 +991,6 @@ extern void x_query_colors (struct frame *f, XColor *, int); | |||
| 991 | extern void x_query_color (struct frame *f, XColor *); | 991 | extern void x_query_color (struct frame *f, XColor *); |
| 992 | extern void x_clear_area (Display *, Window, int, int, int, int, int); | 992 | extern void x_clear_area (Display *, Window, int, int, int, int, int); |
| 993 | extern void x_mouse_leave (struct x_display_info *); | 993 | extern void x_mouse_leave (struct x_display_info *); |
| 994 | extern void set_vertical_scroll_bar (struct window *); | ||
| 995 | 994 | ||
| 996 | extern int x_dispatch_event (XEvent *, Display *); | 995 | extern int x_dispatch_event (XEvent *, Display *); |
| 997 | extern unsigned int x_x_to_emacs_modifiers (struct x_display_info *, | 996 | extern unsigned int x_x_to_emacs_modifiers (struct x_display_info *, |