forked from enlightenment/efl
parent
f4b0bbe7b8
commit
1d8a7e4dd3
|
@ -238,6 +238,7 @@ extern "C" {
|
||||||
EAPI const char *edje_object_part_text_selection_get(const Evas_Object *obj, const char *part);
|
EAPI const char *edje_object_part_text_selection_get(const Evas_Object *obj, const char *part);
|
||||||
EAPI void edje_object_part_text_insert (Evas_Object *obj, const char *part, const char *text);
|
EAPI void edje_object_part_text_insert (Evas_Object *obj, const char *part, const char *text);
|
||||||
EAPI Eina_List *edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part);
|
EAPI Eina_List *edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part);
|
||||||
|
EAPI Eina_List *edje_object_part_text_anchor_geometry_get(const Evas_Object *obj, const char *part, const char *anchor);
|
||||||
EAPI void edje_object_part_text_cursor_geometry_get(const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
|
EAPI void edje_object_part_text_cursor_geometry_get(const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
|
||||||
|
|
||||||
EAPI void edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
|
EAPI void edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
|
||||||
|
|
|
@ -34,7 +34,7 @@ struct _Entry
|
||||||
struct _Sel
|
struct _Sel
|
||||||
{
|
{
|
||||||
Evas_Textblock_Rectangle rect;
|
Evas_Textblock_Rectangle rect;
|
||||||
Evas_Object *obj_fg, *obj_bg, *obj;
|
Evas_Object *obj_fg, *obj_bg, *obj, *sobj;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Anchor
|
struct _Anchor
|
||||||
|
@ -517,6 +517,7 @@ _anchors_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
Evas_Textblock_Rectangle *r;
|
Evas_Textblock_Rectangle *r;
|
||||||
|
|
||||||
r = range->data;
|
r = range->data;
|
||||||
|
*(&(sel->rect)) = *r;
|
||||||
if (sel->obj_bg)
|
if (sel->obj_bg)
|
||||||
{
|
{
|
||||||
evas_object_move(sel->obj_bg, x + r->x, y + r->y);
|
evas_object_move(sel->obj_bg, x + r->x, y + r->y);
|
||||||
|
@ -1284,6 +1285,22 @@ _edje_entry_set_cursor_end(Edje_Real_Part *rp)
|
||||||
_curs_end(en->cursor, rp->object, en);
|
_curs_end(en->cursor, rp->object, en);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Eina_List *
|
||||||
|
_edje_entry_anchor_geometry_get(Edje_Real_Part *rp, const char *anchor)
|
||||||
|
{
|
||||||
|
Entry *en = rp->entry_data;
|
||||||
|
Eina_List *l;
|
||||||
|
Anchor *an;
|
||||||
|
|
||||||
|
if (!en) return;
|
||||||
|
EINA_LIST_FOREACH(en->anchors, l, an)
|
||||||
|
{
|
||||||
|
if (!strcmp(anchor, an->name))
|
||||||
|
return an->sel;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
const Eina_List *
|
const Eina_List *
|
||||||
_edje_entry_anchors_list(Edje_Real_Part *rp)
|
_edje_entry_anchors_list(Edje_Real_Part *rp)
|
||||||
{
|
{
|
||||||
|
@ -1296,9 +1313,7 @@ _edje_entry_anchors_list(Edje_Real_Part *rp)
|
||||||
{
|
{
|
||||||
EINA_LIST_FOREACH(en->anchors, l, an)
|
EINA_LIST_FOREACH(en->anchors, l, an)
|
||||||
{
|
{
|
||||||
char *n;
|
const char *n = an->name;
|
||||||
|
|
||||||
n = an->name;
|
|
||||||
if (!n) n = "";
|
if (!n) n = "";
|
||||||
anchors = eina_list_append(anchors, strdup(n));
|
anchors = eina_list_append(anchors, strdup(n));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1245,6 +1245,7 @@ void _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text);
|
||||||
void _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text);
|
void _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text);
|
||||||
void _edje_entry_set_cursor_start(Edje_Real_Part *rp);
|
void _edje_entry_set_cursor_start(Edje_Real_Part *rp);
|
||||||
void _edje_entry_set_cursor_end(Edje_Real_Part *rp);
|
void _edje_entry_set_cursor_end(Edje_Real_Part *rp);
|
||||||
|
const Eina_List *_edje_entry_anchor_geometry_get(Edje_Real_Part *rp, const char *anchor);
|
||||||
const Eina_List *_edje_entry_anchors_list(Edje_Real_Part *rp);
|
const Eina_List *_edje_entry_anchors_list(Edje_Real_Part *rp);
|
||||||
void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
|
void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
|
||||||
|
|
||||||
|
|
|
@ -960,7 +960,7 @@ edje_object_part_text_insert(Evas_Object *obj, const char *part, const char *tex
|
||||||
/** Returns a list of char * anchor names
|
/** Returns a list of char * anchor names
|
||||||
* @param obj A valid Evas_Object handle
|
* @param obj A valid Evas_Object handle
|
||||||
* @param part The part name
|
* @param part The part name
|
||||||
* @return The list of anchors
|
* @return The list of anchors (const char *)
|
||||||
*/
|
*/
|
||||||
EAPI Eina_List *
|
EAPI Eina_List *
|
||||||
edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part)
|
edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part)
|
||||||
|
@ -977,6 +977,27 @@ edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns a list of Evas_Textblock_Rectangle * anchor rectangles
|
||||||
|
* @param obj A valid Evas_Object handle
|
||||||
|
* @param part The part name
|
||||||
|
* @param anchor The anchor name
|
||||||
|
* @return The list of anchor rects (const Evas_Textblock_Rectangle *)
|
||||||
|
*/
|
||||||
|
EAPI Eina_List *
|
||||||
|
edje_object_part_text_anchor_geometry_get(const Evas_Object *obj, const char *part, const char *anchor)
|
||||||
|
{
|
||||||
|
Edje *ed;
|
||||||
|
Edje_Real_Part *rp;
|
||||||
|
|
||||||
|
ed = _edje_fetch(obj);
|
||||||
|
if ((!ed) || (!part)) return NULL;
|
||||||
|
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||||
|
if (!rp) return NULL;
|
||||||
|
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||||
|
return _edje_entry_anchor_geometry_get(rp, anchor);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns the cursor geometry of the part relative to the edje object
|
/** Returns the cursor geometry of the part relative to the edje object
|
||||||
* @param obj A valid Evas_Object handle
|
* @param obj A valid Evas_Object handle
|
||||||
* @param part The part name
|
* @param part The part name
|
||||||
|
|
Loading…
Reference in New Issue