inline HTMLInterval * html_interval_new_from_cursor (HTMLCursor *a, HTMLCursor *b) { HTMLCursor *begin, *end; if (html_cursor_get_position (a) < html_cursor_get_position (b)) { begin = a; end = b; } else { begin = b; end = a; } return html_interval_new (begin->object, end->object, begin->offset, end->offset); }
static void display_search_results (HTMLSearch *info) { HTMLEngine *e = info->engine; if (!info->found) return; if (e->editable) { html_engine_hide_cursor (e); html_engine_disable_selection (e); html_cursor_jump_to (e->cursor, e, HTML_OBJECT (info->found->data), info->start_pos); html_engine_set_mark (e); html_cursor_jump_to (e->cursor, e, info->last, info->stop_pos); html_engine_show_cursor (e); } else { html_engine_select_interval (e, html_interval_new (HTML_OBJECT (info->found->data), info->last, info->start_pos, info->stop_pos)); move_to_found (info); } }
inline HTMLInterval * html_interval_new_from_points (HTMLPoint *from, HTMLPoint *to) { return html_interval_new (from->object, to->object, from->offset, to->offset); }