forked from enlightenment/efl
parent
c0a9b68eeb
commit
6f1873f87d
|
@ -138,6 +138,15 @@ typedef enum _Edje_Tween_Mode
|
|||
EDJE_TWEEN_MODE_LAST = 5
|
||||
} Edje_Tween_Mode;
|
||||
|
||||
enum _Edje_Cursor
|
||||
{
|
||||
EDJE_CURSOR_MAIN,
|
||||
EDJE_CURSOR_SELECTION_BEGIN,
|
||||
EDJE_CURSOR_SELECTION_END
|
||||
// more later
|
||||
};
|
||||
typedef enum _Edje_Cursor Edje_Cursor;
|
||||
|
||||
typedef struct _Edje_Message_String Edje_Message_String;
|
||||
typedef struct _Edje_Message_Int Edje_Message_Int;
|
||||
typedef struct _Edje_Message_Float Edje_Message_Float;
|
||||
|
@ -413,16 +422,28 @@ extern "C" {
|
|||
EAPI void edje_object_part_text_unescaped_set(Evas_Object *obj, const char *part, const char *text_to_escape);
|
||||
EAPI char *edje_object_part_text_unescaped_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_select_none(const Evas_Object *obj, const char *part);
|
||||
EAPI void edje_object_part_text_select_all(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_select_none (const Evas_Object *obj, const char *part);
|
||||
EAPI void edje_object_part_text_select_all (const Evas_Object *obj, const char *part);
|
||||
EAPI void edje_object_part_text_insert (Evas_Object *obj, const char *part, const char *text);
|
||||
EAPI const Eina_List *edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part);
|
||||
EAPI const 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_select_allow_set(const Evas_Object *obj, const char *part, Eina_Bool allow);
|
||||
EAPI void edje_object_part_text_select_abort(const Evas_Object *obj, const char *part);
|
||||
EAPI const Eina_List *edje_object_part_text_anchor_list_get (const Evas_Object *obj, const char *part);
|
||||
EAPI const 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_select_allow_set (const Evas_Object *obj, const char *part, Eina_Bool allow);
|
||||
EAPI void edje_object_part_text_select_abort (const Evas_Object *obj, const char *part);
|
||||
|
||||
EAPI Eina_Bool edje_object_part_text_cursor_next(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
EAPI Eina_Bool edje_object_part_text_cursor_prev(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
EAPI Eina_Bool edje_object_part_text_cursor_up(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
EAPI Eina_Bool edje_object_part_text_cursor_down(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
EAPI void edje_object_part_text_cursor_begin_set(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
EAPI void edje_object_part_text_cursor_end_set(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
EAPI void edje_object_part_text_cursor_copy(const Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst);
|
||||
EAPI void edje_object_part_text_cursor_line_begin_set(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
EAPI void edje_object_part_text_cursor_line_end_set(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
EAPI Eina_Bool edje_object_part_text_cursor_is_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
EAPI Eina_Bool edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
EAPI const char *edje_object_part_text_cursor_content_get(const Evas_Object *obj, const char *part, Edje_Cursor cur);
|
||||
|
||||
EAPI void edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
|
||||
EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow);
|
||||
|
|
|
@ -179,6 +179,7 @@ static void
|
|||
_curs_update_from_curs(Evas_Textblock_Cursor *c, Evas_Object *o __UNUSED__, Entry *en)
|
||||
{
|
||||
Evas_Coord cx, cy, cw, ch;
|
||||
if (c != en->cursor) return;
|
||||
evas_textblock_cursor_char_geometry_get(c, &cx, &cy, &cw, &ch);
|
||||
en->cx = cx + (cw / 2);
|
||||
en->cy = cy + (ch / 2);
|
||||
|
@ -1632,8 +1633,7 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
|
|||
#endif
|
||||
}
|
||||
done:
|
||||
en->cursor = evas_object_textblock_cursor_get(rp->object);
|
||||
|
||||
en->cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(rp->object);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1882,6 +1882,208 @@ _edje_entry_select_abort(Edje_Real_Part *rp)
|
|||
}
|
||||
}
|
||||
|
||||
static Evas_Textblock_Cursor *
|
||||
_cursor_get(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Entry *en = rp->entry_data;
|
||||
if (!en) return NULL;
|
||||
switch (cur)
|
||||
{
|
||||
case EDJE_CURSOR_MAIN:
|
||||
return en->cursor;
|
||||
break;
|
||||
case EDJE_CURSOR_SELECTION_BEGIN:
|
||||
return en->sel_start;
|
||||
break;
|
||||
case EDJE_CURSOR_SELECTION_END:
|
||||
return en->sel_end;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
_edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
if (!c) return 0;
|
||||
if (!evas_textblock_cursor_char_next(c))
|
||||
{
|
||||
evas_textblock_cursor_eol_set(c, 0);
|
||||
if (evas_textblock_cursor_node_next(c)) goto ok;
|
||||
else return 0;
|
||||
}
|
||||
ok:
|
||||
_curs_update_from_curs(c, rp->object, rp->entry_data);
|
||||
_sel_update(c, rp->object, rp->entry_data);
|
||||
_edje_entry_real_part_configure(rp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
_edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
if (!c) return 0;
|
||||
if (!evas_textblock_cursor_char_prev(c))
|
||||
{
|
||||
if (evas_textblock_cursor_node_prev(c)) goto ok;
|
||||
else return 0;
|
||||
}
|
||||
ok:
|
||||
_curs_update_from_curs(c, rp->object, rp->entry_data);
|
||||
_sel_update(c, rp->object, rp->entry_data);
|
||||
_edje_entry_real_part_configure(rp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
_edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
Evas_Coord lx, ly, lw, lh, cx, cy, cw, ch;
|
||||
int ln;
|
||||
if (!c) return 0;
|
||||
ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL);
|
||||
ln--;
|
||||
if (ln < 0) return 0;
|
||||
if (!evas_object_textblock_line_number_geometry_get(rp->object, ln,
|
||||
&lx, &ly, &lw, &lh))
|
||||
return 0;
|
||||
evas_textblock_cursor_char_geometry_get(c, &cx, &cy, &cw, &ch);
|
||||
if (!evas_textblock_cursor_char_coord_set(c, cx, ly + (lh / 2)))
|
||||
{
|
||||
if (cx < (lx +(lw / 2)))
|
||||
evas_textblock_cursor_line_first(c);
|
||||
else
|
||||
evas_textblock_cursor_line_last(c);
|
||||
}
|
||||
_curs_update_from_curs(c, rp->object, rp->entry_data);
|
||||
_sel_update(c, rp->object, rp->entry_data);
|
||||
_edje_entry_real_part_configure(rp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
_edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
Evas_Coord lx, ly, lw, lh, cx, cy, cw, ch;
|
||||
int ln, ll;
|
||||
if (!c) return 0;
|
||||
ln = evas_textblock_cursor_line_geometry_get(c, NULL, NULL, NULL, NULL);
|
||||
ln++;
|
||||
if (!evas_object_textblock_line_number_geometry_get(rp->object, ln,
|
||||
&lx, &ly, &lw, &lh))
|
||||
return 0;
|
||||
evas_textblock_cursor_char_geometry_get(c, &cx, &cy, &cw, &ch);
|
||||
if (!evas_textblock_cursor_char_coord_set(c, cx, ly + (lh / 2)))
|
||||
{
|
||||
if (cx < (lx +(lw / 2)))
|
||||
evas_textblock_cursor_line_first(c);
|
||||
else
|
||||
evas_textblock_cursor_line_last(c);
|
||||
}
|
||||
_curs_update_from_curs(c, rp->object, rp->entry_data);
|
||||
_sel_update(c, rp->object, rp->entry_data);
|
||||
_edje_entry_real_part_configure(rp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
_edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
if (!c) return;
|
||||
evas_textblock_cursor_node_first(c);
|
||||
_curs_update_from_curs(c, rp->object, rp->entry_data);
|
||||
_sel_update(c, rp->object, rp->entry_data);
|
||||
_edje_entry_real_part_configure(rp);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
if (!c) return;
|
||||
evas_textblock_cursor_node_last(c);
|
||||
_curs_update_from_curs(c, rp->object, rp->entry_data);
|
||||
_sel_update(c, rp->object, rp->entry_data);
|
||||
_edje_entry_real_part_configure(rp);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_entry_cursor_copy(Edje_Real_Part *rp, Edje_Cursor cur, Edje_Cursor dst)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
if (!c) return;
|
||||
Evas_Textblock_Cursor *d = _cursor_get(rp, dst);
|
||||
if (!d) return;
|
||||
evas_textblock_cursor_copy(c, d);
|
||||
_curs_update_from_curs(c, rp->object, rp->entry_data);
|
||||
_sel_update(c, rp->object, rp->entry_data);
|
||||
_edje_entry_real_part_configure(rp);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_entry_cursor_line_begin(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
if (!c) return;
|
||||
evas_textblock_cursor_line_first(c);
|
||||
_curs_update_from_curs(c, rp->object, rp->entry_data);
|
||||
_sel_update(c, rp->object, rp->entry_data);
|
||||
_edje_entry_real_part_configure(rp);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
if (!c) return;
|
||||
evas_textblock_cursor_line_last(c);
|
||||
_curs_update_from_curs(c, rp->object, rp->entry_data);
|
||||
_sel_update(c, rp->object, rp->entry_data);
|
||||
_edje_entry_real_part_configure(rp);
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
_edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
if (!c) return 0;
|
||||
return evas_textblock_cursor_node_format_get(c);
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
_edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
if (!c) return 0;
|
||||
return evas_textblock_cursor_node_format_is_visible_get(c);
|
||||
}
|
||||
|
||||
const char *
|
||||
_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur)
|
||||
{
|
||||
Evas_Textblock_Cursor *c = _cursor_get(rp, cur);
|
||||
const char *s;
|
||||
static buf[16];
|
||||
int pos, pos2, ch;
|
||||
if (!c) return NULL;
|
||||
s = evas_textblock_cursor_node_format_get(c);
|
||||
if (s) return s;
|
||||
s = evas_textblock_cursor_node_text_get(c);
|
||||
if (!s) return NULL;
|
||||
pos = evas_textblock_cursor_pos_get(c);
|
||||
pos2 = evas_string_char_next_get(s, pos, &ch);
|
||||
strncpy(buf, s + pos, pos2 - pos);
|
||||
buf[pos2 - pos] = 0;
|
||||
return buf;
|
||||
}
|
||||
|
||||
#ifdef HAVE_ECORE_IMF
|
||||
static int
|
||||
_edje_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx __UNUSED__, char **text, int *cursor_pos)
|
||||
|
|
|
@ -585,6 +585,18 @@ struct _Edje_Part_Description
|
|||
} padding;
|
||||
} table;
|
||||
|
||||
#if 0
|
||||
// // // // //
|
||||
struct {
|
||||
struct {
|
||||
double ax, ay, az;
|
||||
} rot;
|
||||
// FIXME: center point is another part id
|
||||
// FIXME: perspective should other part or global value/obj
|
||||
} map;
|
||||
// // // // //
|
||||
#endif
|
||||
|
||||
Edje_Color color, color2, color3; /* color for rect or text, shadow etc. */
|
||||
Eina_List *external_params; /* parameters for external objects */
|
||||
|
||||
|
@ -1360,6 +1372,18 @@ void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Co
|
|||
void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow);
|
||||
void _edje_entry_select_abort(Edje_Real_Part *rp);
|
||||
|
||||
Eina_Bool _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
Eina_Bool _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
Eina_Bool _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
Eina_Bool _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
void _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
void _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
void _edje_entry_cursor_line_begin(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
void _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
Eina_Bool _edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
Eina_Bool _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
const char *_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur);
|
||||
|
||||
void _edje_external_init();
|
||||
void _edje_external_shutdown();
|
||||
Evas_Object *_edje_external_type_add(const char *type_name, Evas *evas, Evas_Object *parent, const Eina_List *params);
|
||||
|
|
|
@ -1761,6 +1761,277 @@ edje_object_part_text_select_abort(const Evas_Object *obj, const char *part)
|
|||
_edje_entry_select_abort(rp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
edje_object_part_text_cursor_next(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return 0;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return 0;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
return _edje_entry_cursor_next(rp, cur);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
edje_object_part_text_cursor_prev(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return 0;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return 0;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
return _edje_entry_cursor_prev(rp, cur);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
edje_object_part_text_cursor_up(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return 0;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return 0;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
return _edje_entry_cursor_up(rp, cur);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
edje_object_part_text_cursor_down(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return 0;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return 0;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
return _edje_entry_cursor_down(rp, cur);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI void
|
||||
edje_object_part_text_cursor_begin_set(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
_edje_entry_cursor_begin(rp, cur);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI void
|
||||
edje_object_part_text_cursor_end_set(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
_edje_entry_cursor_end(rp, cur);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI void
|
||||
edje_object_part_text_cursor_copy(const Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
_edje_entry_cursor_copy(rp, src, dst);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI void
|
||||
edje_object_part_text_cursor_line_begin_set(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
_edje_entry_cursor_line_begin(rp, cur);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI void
|
||||
edje_object_part_text_cursor_line_end_set(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
_edje_entry_cursor_line_end(rp, cur);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
edje_object_part_text_cursor_is_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return 0;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return 0;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
return _edje_entry_cursor_is_format_get(rp, cur);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!part)) return 0;
|
||||
rp = _edje_real_part_recursive_get(ed, (char *)part);
|
||||
if (!rp) return 0;
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
return _edje_entry_cursor_is_visible_format_get(rp, cur);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XX
|
||||
*
|
||||
* @param obj A valid Evas_Object handle
|
||||
* @param part The part name
|
||||
*/
|
||||
EAPI const char *
|
||||
edje_object_part_text_cursor_content_get(const Evas_Object *obj, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
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_cursor_content_get(rp, cur);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Swallows an object into the edje.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue