ptrdiff_t, ptrdiff_t, struct it *, int, int, int, int);
static void compute_line_metrics (struct it *);
static void run_redisplay_end_trigger_hook (struct it *);
- static int get_overlay_strings (struct it *, ptrdiff_t);
- static int get_overlay_strings_1 (struct it *, ptrdiff_t, int);
+ static bool get_overlay_strings (struct it *, ptrdiff_t);
+ static bool get_overlay_strings_1 (struct it *, ptrdiff_t, bool);
static void next_overlay_string (struct it *);
- static void reseat (struct it *, struct text_pos, int);
- static void reseat_1 (struct it *, struct text_pos, int);
- static void back_to_previous_visible_line_start (struct it *);
- static void reseat_at_next_visible_line_start (struct it *, int);
- static int next_element_from_ellipsis (struct it *);
- static int next_element_from_display_vector (struct it *);
- static int next_element_from_string (struct it *);
- static int next_element_from_c_string (struct it *);
- static int next_element_from_buffer (struct it *);
- static int next_element_from_composition (struct it *);
- static int next_element_from_image (struct it *);
+ static void reseat (struct it *, struct text_pos, bool);
+ static void reseat_1 (struct it *, struct text_pos, bool);
+ static bool next_element_from_display_vector (struct it *);
+ static bool next_element_from_string (struct it *);
+ static bool next_element_from_c_string (struct it *);
+ static bool next_element_from_buffer (struct it *);
+ static bool next_element_from_composition (struct it *);
+ static bool next_element_from_image (struct it *);
+ static bool next_element_from_stretch (struct it *);
+#ifdef HAVE_XWIDGETS
- static int next_element_from_xwidget (struct it *);
++static bool next_element_from_xwidget (struct it *);
+#endif
- static int next_element_from_stretch (struct it *);
static void load_overlay_strings (struct it *, ptrdiff_t);
- static int init_from_display_pos (struct it *, struct window *,
- struct display_pos *);
- static void reseat_to_string (struct it *, const char *,
- Lisp_Object, ptrdiff_t, ptrdiff_t, int, int);
- static int get_next_display_element (struct it *);
+ static bool get_next_display_element (struct it *);
static enum move_it_result
move_it_in_display_line_to (struct it *, ptrdiff_t, int,
enum move_operation_enum);
LOCATION specifies where to display: `left-margin',
`right-margin' or nil. */
- valid_p = (STRINGP (value)
+ bool valid_p = (STRINGP (value)
#ifdef HAVE_WINDOW_SYSTEM
- || ((it ? FRAME_WINDOW_P (it->f) : frame_window_p)
- && valid_image_p (value))
+ || ((it ? FRAME_WINDOW_P (it->f) : frame_window_p)
+ && valid_image_p (value))
#endif /* not HAVE_WINDOW_SYSTEM */
- || (CONSP (value) && EQ (XCAR (value), Qspace)));
+ || (CONSP (value) && EQ (XCAR (value), Qspace))
+#ifdef HAVE_XWIDGETS
+ || ((it ? FRAME_WINDOW_P (it->f) : frame_window_p)
+ && valid_xwidget_spec_p (value))
+#endif
+ );
- if (valid_p && !display_replaced_p)
+ if (valid_p && display_replaced == 0)
{
int retval = 1;
next_element_from_image (struct it *it)
{
it->what = IT_IMAGE;
- it->ignore_overlay_strings_at_pos_p = 0;
- return 1;
+ it->ignore_overlay_strings_at_pos_p = false;
+ return true;
}
- /* I'm not sure about this. FIXME JAVE */
- static int
+#ifdef HAVE_XWIDGETS
- return 1;
++static bool
+next_element_from_xwidget (struct it *it)
+{
+ it->what = IT_XWIDGET;
++ return true;
+}
+#endif
+
/* Fill iterator IT with next display element from a stretch glyph
property. IT->object is the value of the text property. Value is
++START; \
s->x = (X); \
} \
- while (0)
+ while (false)
+#ifdef HAVE_XWIDGETS
+#define BUILD_XWIDGET_GLYPH_STRING(START, END, HEAD, TAIL, HL, X, LAST_X) \
+ do \
+ { \
+ s = alloca (sizeof *s); \
+ INIT_GLYPH_STRING (s, NULL, w, row, area, START, HL); \
+ fill_xwidget_glyph_string (s); \
+ append_glyph_string (&(HEAD), &(TAIL), s); \
+ ++(START); \
+ s->x = (X); \
+ } \
+ while (false)
+#endif
+
/* Add a glyph string for a sequence of character glyphs to the list
of strings between HEAD and TAIL. START is the index of the first
(X) += s->width; \
} \
} \
- } while (0)
+ } while (false)
+#ifdef HAVE_XWIDGETS
+# define BUILD_GLYPH_STRINGS(START, END, HEAD, TAIL, HL, X, LAST_X) \
+ BUILD_GLYPH_STRINGS_1(START, END, HEAD, TAIL, HL, X, LAST_X) \
+ BUILD_GLYPH_STRINGS_XW(START, END, HEAD, TAIL, HL, X, LAST_X) \
+ BUILD_GLYPH_STRINGS_2(START, END, HEAD, TAIL, HL, X, LAST_X)
+#else
+# define BUILD_GLYPH_STRINGS(START, END, HEAD, TAIL, HL, X, LAST_X) \
+ BUILD_GLYPH_STRINGS_1(START, END, HEAD, TAIL, HL, X, LAST_X) \
+ BUILD_GLYPH_STRINGS_2(START, END, HEAD, TAIL, HL, X, LAST_X)
+#endif
+
+
/* Draw glyphs between START and END in AREA of ROW on window W,
starting at x-position X. X is relative to AREA in W. HL is a
face-override with the following meaning: