};
+/* Structure describing how to use partial glyphs (images slicing) */
+
+struct glyph_slice
+{
+ unsigned x : 16;
+ unsigned y : 16;
+ unsigned width : 16;
+ unsigned height : 16;
+};
+
+
/* Glyphs.
Be extra careful when changing this structure! Esp. make sure that
w32_char_font_type. Otherwise it equals FONT_TYPE_UNKNOWN. */
unsigned font_type : 3;
+ struct glyph_slice slice;
+
/* A union of sub-structures for different glyph types. */
union
{
#define CHAR_GLYPH_SPACE_P(GLYPH) \
(GLYPH_FROM_CHAR_GLYPH ((GLYPH)) == SPACEGLYPH)
+/* Are glyph slices of glyphs *X and *Y equal */
+
+#define GLYPH_SLICE_EQUAL_P(X, Y) \
+ ((X)->slice.x == (Y)->slice.x \
+ && (X)->slice.y == (Y)->slice.y \
+ && (X)->slice.width == (Y)->slice.width \
+ && (X)->slice.height == (Y)->slice.height)
+
/* Are glyphs *X and *Y displayed equal? */
#define GLYPH_EQUAL_P(X, Y) \
((X)->type == (Y)->type \
&& (X)->u.val == (Y)->u.val \
+ && GLYPH_SLICE_EQUAL_P (X, Y) \
&& (X)->face_id == (Y)->face_id \
&& (X)->padding_p == (Y)->padding_p \
&& (X)->left_box_line_p == (Y)->left_box_line_p \
extern struct glyph space_glyph;
-/* Frame being updated by update_window/update_frame. */
-
-extern struct frame *updating_frame;
-
/* Window being updated by update_window. This is non-null as long as
update_window has not finished, and null otherwise. It's role is
analogous to updating_frame. */
/* Image, if any. */
struct image *img;
+ /* Slice */
+ struct glyph_slice slice;
+
struct glyph_string *next, *prev;
};
width and height of the bitmap, DH is the height adjustment (if
bitmap is periodic). X and Y are frame coordinates of the area to
display the bitmap, DY is relative offset of the bitmap into that
- area. BX, NX, BY, NY specifies the area to clear if the bitmap
+ area. BX, NX, BY, NY specifies the area to clear if the bitmap
does not fill the entire area. FACE is the fringe face. */
struct draw_fringe_bitmap_params
};
+struct it_slice
+{
+ Lisp_Object x;
+ Lisp_Object y;
+ Lisp_Object width;
+ Lisp_Object height;
+};
+
+
struct it
{
/* The window in which we iterate over current_buffer (or a string). */
unsigned multibyte_p : 1;
unsigned string_from_display_prop_p : 1;
unsigned display_ellipsis_p : 1;
+ struct it_slice slice;
Lisp_Object space_width;
short voffset;
Lisp_Object font_height;
skipped due to selective display. */
unsigned face_before_selective_p : 1;
+ /* If 1, adjust current glyph so it does not increase current row
+ descent/ascent (line-height property). Reset after this glyph. */
+ unsigned constrain_row_ascent_descent_p : 1;
+
/* The ID of the default face to use. One of DEFAULT_FACE_ID,
MODE_LINE_FACE_ID, etc, depending on what we are displaying. */
int base_face_id;
/* If what == IT_IMAGE, the id of the image to display. */
int image_id;
+ /* Values from `slice' property. */
+ struct it_slice slice;
+
/* Value of the `space-width' property, if any; nil if none. */
Lisp_Object space_width;
only.) */
int extra_line_spacing;
+ /* Override font height information for this glyph.
+ Used if override_ascent >= 0. Cleared after this glyph. */
+ int override_ascent, override_descent, override_boff;
+
/* If non-null, glyphs are produced in glyph_row with each call to
produce_glyphs. */
struct glyph_row *glyph_row;
int (*encode_char) P_ ((int c, XChar2b *char2b,
struct font_info *font_into, int *two_byte_p));
-/* Compute left and right overhang of glyph string S.
+/* Compute left and right overhang of glyph string S.
A NULL pointer if platform does not support this. */
void (*compute_glyph_string_overhangs) P_ ((struct glyph_string *s));
void (*draw_vertical_window_border) P_ ((struct window *w,
int x, int y0, int y1));
-/* Shift display of frame F to make room for inserted glyphs.
+/* Shift display of frame F to make room for inserted glyphs.
The area at pixel (X,Y) of width WIDTH and height HEIGHT is
shifted right by SHIFT_BY pixels. */
void (*shift_glyphs_for_insert) P_ ((struct frame *f,
extern int help_echo_showing_p;
extern int current_mode_line_height, current_header_line_height;
extern Lisp_Object help_echo_string, help_echo_window;
-extern Lisp_Object help_echo_object, previous_help_echo_string;
+extern Lisp_Object help_echo_object, previous_help_echo_string;
extern int help_echo_pos;
extern struct frame *last_mouse_frame;
extern int last_tool_bar_item;
int image_background_transparent P_ ((struct image *, struct frame *,
XImagePtr_or_DC mask));
+int image_ascent P_ ((struct image *, struct face *, struct glyph_slice *));
+
#endif
/* Defined in sysdep.c */
extern Lisp_Object buffer_posn_from_coords P_ ((struct window *,
int *, int *,
struct display_pos *,
- Lisp_Object *,
+ Lisp_Object *,
int *, int *, int *, int *));
extern Lisp_Object mode_line_string P_ ((struct window *, enum window_part,
int *, int *, int *,
void prepare_desired_row P_ ((struct glyph_row *));
int line_hash_code P_ ((struct glyph_row *));
void set_window_update_flags P_ ((struct window *, int));
-void write_glyphs P_ ((struct glyph *, int));
-void insert_glyphs P_ ((struct glyph *, int));
+void write_glyphs P_ ((struct frame *, struct glyph *, int));
+void insert_glyphs P_ ((struct frame *, struct glyph *, int));
void redraw_frame P_ ((struct frame *));
void redraw_garbaged_frames P_ ((void));
int scroll_cost P_ ((struct frame *, int, int, int));
/* Defined in term.c */
-extern void ring_bell P_ ((void));
+extern void ring_bell P_ ((struct frame *));
extern void update_begin P_ ((struct frame *));
extern void update_end P_ ((struct frame *));
-extern void set_terminal_window P_ ((int));
-extern void set_scroll_region P_ ((int, int));
+extern void set_terminal_window P_ ((struct frame *, int));
+extern void set_scroll_region P_ ((struct frame *, int, int));
extern void turn_off_insert P_ ((struct tty_display_info *));
extern void turn_off_highlight P_ ((struct tty_display_info *));
extern void background_highlight P_ ((struct tty_display_info *));
-extern void clear_frame P_ ((void));
-extern void clear_end_of_line P_ ((int));
-extern void clear_end_of_line_raw P_ ((int));
-extern void tty_clear_end_of_line P_ ((int));
-extern void delete_glyphs P_ ((int));
-extern void ins_del_lines P_ ((int, int));
+extern void clear_frame P_ ((struct frame *));
+extern void clear_end_of_line P_ ((struct frame *, int));
+extern void clear_end_of_line_raw P_ ((struct frame *, int));
+extern void tty_clear_end_of_line P_ ((struct frame *, int));
+extern void delete_glyphs P_ ((struct frame *, int));
+extern void ins_del_lines P_ ((struct frame *, int, int));
extern int string_cost P_ ((char *));
extern int per_line_cost P_ ((char *));
extern void calculate_costs P_ ((struct frame *));
extern struct display *term_init P_ ((char *, char *, int));
extern void delete_tty P_ ((struct display *));
extern void fatal P_ ((/* char *, ... */));
-extern void cursor_to P_ ((int, int));
+extern void cursor_to P_ ((struct frame *, int, int));
extern int tty_capable_p P_ ((struct tty_display_info *, unsigned, unsigned long, unsigned long));
extern void tty_set_terminal_modes P_ ((struct display *));
extern void tty_reset_terminal_modes P_ ((struct display *));