face doesn't exist. */
#define FACE_FROM_ID(F, ID) \
- (((unsigned) (ID) < FRAME_FACE_CACHE (F)->used) \
+ (UNSIGNED_CMP (ID, <, FRAME_FACE_CACHE (F)->used) \
? FRAME_FACE_CACHE (F)->faces_by_id[ID] \
: NULL)
bidi_dir_t override;
};
-/* Data type for iterating over bidi text. */
+/* Data type for reordering bidirectional text. */
struct bidi_it {
EMACS_INT bytepos; /* iterator's position in buffer */
EMACS_INT charpos;
- int ch; /* character itself */
- int ch_len; /* length of its multibyte sequence */
+ int ch; /* character at that position, or u+FFFC
+ ("object replacement character") for a run
+ of characters covered by a display string */
+ EMACS_INT nchars; /* its "length", usually 1; it's > 1 for a run
+ of characters covered by a display string */
+ EMACS_INT ch_len; /* its length in bytes */
bidi_type_t type; /* bidi type of this character, after
resolving weak and neutral types */
bidi_type_t type_after_w1; /* original type, after overrides and W1 */
int first_elt; /* if non-zero, examine current char first */
bidi_dir_t paragraph_dir; /* current paragraph direction */
int new_paragraph; /* if non-zero, we expect a new paragraph */
+ int frame_window_p; /* non-zero if displaying on a GUI frame */
EMACS_INT separator_limit; /* where paragraph separator should end */
+ EMACS_INT disp_pos; /* position of display string after ch */
};
/* Value is non-zero when the bidi iterator is at base paragraph
/* 1 means that loading the image failed. Don't try again. */
unsigned load_failed_p;
- /* A place for image types to store additional data. The member
- data.lisp_val is marked during GC, so it's safe to store Lisp data
- there. Image types should free this data when their `free'
- function is called. */
- struct
- {
- int int_val;
- void *ptr_val;
- Lisp_Object lisp_val;
- } data;
+ /* A place for image types to store additional data. It is marked
+ during GC. */
+ Lisp_Object lisp_data;
/* Hash value of image specification to speed up comparisons. */
- unsigned hash;
+ EMACS_UINT hash;
/* Image id of this image. */
int id;
/* Defined in bidi.c */
-extern void bidi_init_it (EMACS_INT, EMACS_INT, struct bidi_it *);
+extern void bidi_init_it (EMACS_INT, EMACS_INT, int, struct bidi_it *);
extern void bidi_move_to_visually_next (struct bidi_it *);
extern void bidi_paragraph_init (bidi_dir_t, struct bidi_it *, int);
extern int bidi_mirror_char (int);
struct glyph_row *,
struct glyph_row *, int);
int line_bottom_y (struct it *);
-int display_prop_intangible_p (Lisp_Object);
+int display_prop_intangible_p (Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT);
void resize_echo_area_exactly (void);
int resize_mini_window (struct window *, int);
#if defined USE_TOOLKIT_SCROLL_BARS && !defined USE_GTK
extern Lisp_Object lookup_glyphless_char_display (int, struct it *);
extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object,
struct font *, int, int *);
+extern EMACS_INT compute_display_string_pos (EMACS_INT, int);
+extern EMACS_INT compute_display_string_end (EMACS_INT);
#ifdef HAVE_WINDOW_SYSTEM
EMACS_INT pos, EMACS_INT bufpos,
EMACS_INT region_beg, EMACS_INT region_end,
EMACS_INT *endptr, enum face_id, int mouse);
-int merge_faces (struct frame *, Lisp_Object, int, int);
+int merge_faces (struct frame *, Lisp_Object, EMACS_INT, int);
int compute_char_face (struct frame *, int, Lisp_Object);
void free_all_realized_faces (Lisp_Object);
extern Lisp_Object Qforeground_color, Qbackground_color;