forked from enlightenment/efl
Elementary: Added elm_entry_cursor_geometry_get for getting the cursor's geometry.
SVN revision: 56277
This commit is contained in:
parent
5e82ffad18
commit
cc49bde155
|
@ -1204,6 +1204,7 @@ extern "C" {
|
|||
EAPI Eina_Bool elm_entry_cursor_is_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
EAPI Eina_Bool elm_entry_cursor_is_visible_format_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
EAPI const char *elm_entry_cursor_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
EAPI Eina_Bool elm_entry_cursor_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
|
||||
EAPI void elm_entry_selection_cut(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
EAPI void elm_entry_selection_copy(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
EAPI void elm_entry_selection_paste(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||
|
|
|
@ -1843,6 +1843,32 @@ elm_entry_select_all(Evas_Object *obj)
|
|||
edje_object_part_text_select_all(wd->ent, "elm.text");
|
||||
}
|
||||
|
||||
/**
|
||||
* This function returns the geometry of the cursor.
|
||||
*
|
||||
* It's useful if you want to draw something on the cursor (or where it is),
|
||||
* or for example in the case of scrolled entry where you want to show the
|
||||
* cursor.
|
||||
*
|
||||
* @param obj The entry object
|
||||
* @param x returned geometry
|
||||
* @param y returned geometry
|
||||
* @param w returned geometry
|
||||
* @param h returned geometry
|
||||
* @return EINA_TRUE upon success, EINA_FALSE upon failure
|
||||
*
|
||||
* @ingroup Entry
|
||||
*/
|
||||
EAPI Eina_Bool
|
||||
elm_entry_cursor_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return EINA_FALSE;
|
||||
edje_object_part_text_cursor_geometry_get(wd->ent, "elm.text", x, y, w, h);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* This moves the cursor one place to the right within the entry.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue