extern int display_completed;
-/* A temporary storage area, including a row of glyphs. Initialized
- in xdisp.c. Used for various purposes, as an example see
- get_overlay_arrow_glyph_row. */
-
-extern struct glyph_row scratch_glyph_row;
-
\f
/************************************************************************
int window_box_left_offset (struct window *, int);
int window_box_right (struct window *, int);
int window_box_right_offset (struct window *, int);
-void window_box_edges (struct window *, int, int *, int *, int *, int *);
int estimate_mode_line_height (struct frame *, enum face_id);
void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
NativeRectangle *, int);
-int glyph_to_pixel_coords (struct window *, int, int, int *, int *);
void remember_mouse_glyph (struct frame *, int, int, NativeRectangle *);
void mark_window_display_accurate (Lisp_Object, int);
void redisplay_preserve_echo_area (int);
-int set_cursor_from_row (struct window *, struct glyph_row *,
- struct glyph_matrix *, EMACS_INT, EMACS_INT,
- int, int);
void init_iterator (struct it *, struct window *, EMACS_INT,
EMACS_INT, struct glyph_row *, enum face_id);
void init_iterator_to_row_start (struct it *, struct window *,
struct glyph_row *);
-int get_next_display_element (struct it *);
-void set_iterator_to_next (struct it *, int);
void start_display (struct it *, struct window *, struct text_pos);
void move_it_to (struct it *, EMACS_INT, int, int, int, int);
void move_it_vertically (struct it *, int);
enum move_operation_enum op);
int in_display_vector_p (struct it *);
int frame_mode_line_height (struct frame *);
-void highlight_trailing_whitespace (struct frame *, struct glyph_row *);
extern Lisp_Object Qtool_bar;
extern int redisplaying_p;
extern int help_echo_showing_p;
XRectangle *);
#endif /* HAVE_WINDOW_SYSTEM */
-extern void frame_to_window_pixel_xy (struct window *, int *, int *);
extern void note_mouse_highlight (struct frame *, int, int);
extern void x_clear_window_mouse_face (struct window *);
extern void cancel_mouse_face (struct frame *);
extern int clear_mouse_face (Mouse_HLInfo *);
-extern void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face);
extern int cursor_in_mouse_face_p (struct window *w);
extern void draw_row_with_mouse_face (struct window *, int, struct glyph_row *,
int, int, enum draw_glyphs_face);
Lisp_Object Qtext;
/* Holds the list (error). */
-Lisp_Object list_of_error;
+static Lisp_Object list_of_error;
static Lisp_Object Qfontification_functions;
message_enable_multibyte on the stack, the function restore_message
pops the stack and displays MESSAGE again. */
-Lisp_Object Vmessage_stack;
+static Lisp_Object Vmessage_stack;
/* Nonzero means multibyte characters were enabled when the echo area
message was specified. */
/* Nonzero after display_mode_line if %l was used and it displayed a
line number. */
-int line_number_displayed;
+static int line_number_displayed;
/* The name of the *Messages* buffer, a string. */
/* Nonzero if echo area is being used by print; zero if being used by
message. */
-int message_buf_print;
+static int message_buf_print;
/* The symbol `inhibit-menubar-update' and its DEFVAR_BOOL variable. */
glyphs. Also used in direct_output_for_insert. */
#define MAX_SCRATCH_GLYPHS 100
-struct glyph_row scratch_glyph_row;
+static struct glyph_row scratch_glyph_row;
static struct glyph scratch_glyphs[MAX_SCRATCH_GLYPHS];
/* Ascent and height of the last line processed by move_it_to. */
/* Buffer being redisplayed -- for redisplay_window_error. */
-struct buffer *displayed_buffer;
+static struct buffer *displayed_buffer;
/* Value returned from text property handlers (see below). */
/* Function prototypes. */
static void setup_for_ellipsis (struct it *, int);
+static void set_iterator_to_next (struct it *, int);
static void mark_window_display_accurate_1 (struct window *, int);
static int single_display_spec_string_p (Lisp_Object, Lisp_Object);
static int display_prop_string_p (Lisp_Object, Lisp_Object);
EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
static void clear_garbaged_frames (void);
static int current_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
+static void pop_message (void);
static int truncate_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
+static void set_message (const char *, Lisp_Object, EMACS_INT, int);
static int set_message_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
static int display_echo_area (struct window *);
static int display_echo_area_1 (EMACS_INT, Lisp_Object, EMACS_INT, EMACS_INT);
static Lisp_Object redisplay_window_error (Lisp_Object);
static Lisp_Object redisplay_window_0 (Lisp_Object);
static Lisp_Object redisplay_window_1 (Lisp_Object);
+static int set_cursor_from_row (struct window *, struct glyph_row *,
+ struct glyph_matrix *, EMACS_INT, EMACS_INT,
+ int, int);
static int update_menu_bar (struct frame *, int, int);
static int try_window_reusing_current_matrix (struct window *);
static int try_window_id (struct window *);
struct display_pos *);
static void reseat_to_string (struct it *, const char *,
Lisp_Object, EMACS_INT, EMACS_INT, int, int);
+static int get_next_display_element (struct it *);
static enum move_it_result
move_it_in_display_line_to (struct it *, EMACS_INT, int,
enum move_operation_enum);
#endif /* HAVE_WINDOW_SYSTEM */
+static void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face);
static int coords_in_mouse_face_p (struct window *, int, int);
*BOTTOM_RIGHT_Y the coordinates of the bottom-right corner of the
box. */
-INLINE void
+static INLINE void
window_box_edges (struct window *w, int area, int *top_left_x, int *top_left_y,
int *bottom_right_x, int *bottom_right_y)
{
}
-/* Given HPOS/VPOS in the current matrix of W, return corresponding
- frame-relative pixel positions in *FRAME_X and *FRAME_Y. If we
- can't tell the positions because W's display is not up to date,
- return 0. */
-
-int
-glyph_to_pixel_coords (struct window *w, int hpos, int vpos,
- int *frame_x, int *frame_y)
-{
-#ifdef HAVE_WINDOW_SYSTEM
- if (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w))))
- {
- int success_p;
-
- xassert (hpos >= 0 && hpos < w->current_matrix->matrix_w);
- xassert (vpos >= 0 && vpos < w->current_matrix->matrix_h);
-
- if (display_completed)
- {
- struct glyph_row *row = MATRIX_ROW (w->current_matrix, vpos);
- struct glyph *glyph = row->glyphs[TEXT_AREA];
- struct glyph *end = glyph + min (hpos, row->used[TEXT_AREA]);
-
- hpos = row->x;
- vpos = row->y;
- while (glyph < end)
- {
- hpos += glyph->pixel_width;
- ++glyph;
- }
-
- /* If first glyph is partially visible, its first visible position is still 0. */
- if (hpos < 0)
- hpos = 0;
-
- success_p = 1;
- }
- else
- {
- hpos = vpos = 0;
- success_p = 0;
- }
-
- *frame_x = WINDOW_TO_FRAME_PIXEL_X (w, hpos);
- *frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, vpos);
- return success_p;
- }
-#endif
-
- *frame_x = hpos;
- *frame_y = vpos;
- return 1;
-}
-
-
/* Find the glyph under window-relative coordinates X/Y in window W.
Consider only glyphs from buffer text, i.e. no glyphs from overlay
strings. Return in *HPOS and *VPOS the row and column number of
return glyph;
}
-/* EXPORT:
- Convert frame-relative x/y to coordinates relative to window W.
+/* Convert frame-relative x/y to coordinates relative to window W.
Takes pseudo-windows into account. */
-void
+static void
frame_to_window_pixel_xy (struct window *w, int *x, int *y)
{
if (w->pseudo_window_p)
unsigned last_glyphless_glyph_face_id = (1 << FACE_ID_BITS);
int last_glyphless_glyph_merged_face_id = 0;
-int
+static int
get_next_display_element (struct it *it)
{
/* Non-zero means that we found a display element. Zero means that
/* Pop the top-most entry off Vmessage_stack. */
-void
+static void
pop_message (void)
{
xassert (CONSP (Vmessage_stack));
to t before calling set_message_1 (which calls insert).
*/
-void
+static void
set_message (const char *s, Lisp_Object string,
EMACS_INT nbytes, int multibyte_p)
{
return 0. PREV_BUF and PREV_PT are the last point buffer and
position. BUF and PT are the current point buffer and position. */
-int
+static int
check_point_in_composition (struct buffer *prev_buf, EMACS_INT prev_pt,
struct buffer *buf, EMACS_INT pt)
{
Return 0 if cursor is not on this row, 1 otherwise. */
-int
+static int
set_cursor_from_row (struct window *w, struct glyph_row *row,
struct glyph_matrix *matrix,
EMACS_INT delta, EMACS_INT delta_bytes,
return rc;
}
-void
+static void
set_vertical_scroll_bar (struct window *w)
{
EMACS_INT start, end, whole;
/* Highlight trailing whitespace, if any, in ROW. */
-void
+static void
highlight_trailing_whitespace (struct frame *f, struct glyph_row *row)
{
int used = row->used[TEXT_AREA];
#endif
}
-/* EXPORT:
- Display the active region described by mouse_face_* according to DRAW. */
+/* Display the active region described by mouse_face_* according to DRAW. */
-void
+static void
show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw)
{
struct window *w = XWINDOW (hlinfo->mouse_face_window);