forked from enlightenment/efl
add api to get the item geometry itself. needed to put somethign there.
SVN revision: 48305
This commit is contained in:
parent
d37f08a616
commit
1112f418dc
|
@ -1366,6 +1366,7 @@ extern "C" {
|
|||
EAPI Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
|
||||
EAPI int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1);
|
||||
EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
|
||||
EAPI Eina_Bool evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
|
||||
|
||||
EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
|
||||
EAPI void evas_textblock_cursor_eol_set(Evas_Textblock_Cursor *cur, Eina_Bool eol) EINA_ARG_NONNULL(1);
|
||||
|
|
|
@ -5157,6 +5157,39 @@ evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, cons
|
|||
return rects;
|
||||
}
|
||||
|
||||
/**
|
||||
* to be documented.
|
||||
* @param cur to be documented.
|
||||
* @param cx to be documented.
|
||||
* @param cy to be documented.
|
||||
* @param cw to be documented.
|
||||
* @param ch to be documented.
|
||||
* @return to be documented.
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
|
||||
{
|
||||
Evas_Object_Textblock *o;
|
||||
Evas_Object_Textblock_Line *ln = NULL;
|
||||
Evas_Object_Textblock_Format_Item *fi = NULL;
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
if (!cur) return 0;
|
||||
o = (Evas_Object_Textblock *)(cur->obj->object_data);
|
||||
if (!o->formatted.valid) _relayout(cur->obj);
|
||||
_find_layout_format_item_line_match(cur->obj, cur->node, &ln, &fi);
|
||||
if ((!ln) || (!fi)) return 0;
|
||||
x = ln->x + fi->x;
|
||||
y = ln->y + ln->baseline + fi->y;
|
||||
w = fi->w;
|
||||
h = fi->h;
|
||||
if (cx) *cx = x;
|
||||
if (cy) *cy = y;
|
||||
if (cw) *cw = w;
|
||||
if (ch) *ch = h;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* To be documented.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue