forked from enlightenment/efl
Ui text: add cursor_new method
The cursor object is meant to be instantiated in the following manner: eo_add(EFL_CANVAS_TEXT_CURSOR_CLASS, text_obj, efl_canvas_text_cursor_text_object_set(eo_self, text_obj)); This can't be done directly on the Ui Text object, so it has to be with an method call, sadly. @feature
This commit is contained in:
parent
d3d655bedf
commit
a9546e36ec
|
@ -5428,6 +5428,14 @@ _efl_ui_text_elm_interface_atspi_accessible_name_get(Eo *obj, Efl_Ui_Text_Data *
|
|||
return ret ? strdup(ret) : NULL;
|
||||
}
|
||||
|
||||
EOLIAN static Efl_Canvas_Text_Cursor *
|
||||
_efl_ui_text_cursor_new(Eo *obj, Efl_Ui_Text_Data *sd EINA_UNUSED)
|
||||
{
|
||||
Eo *text_obj = edje_object_part_swallow_get(sd->entry_edje, "elm.text");
|
||||
return eo_add(EFL_CANVAS_TEXT_CURSOR_CLASS, (Eo *) obj,
|
||||
efl_canvas_text_cursor_text_object_set(eo_self, text_obj));
|
||||
}
|
||||
|
||||
static inline Eo *
|
||||
_decoration_create(Efl_Ui_Text_Data *sd, const char *file,
|
||||
const char *source, Eina_Bool above)
|
||||
|
|
|
@ -361,6 +361,10 @@ class Efl.Ui.Text (Elm.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
|
|||
@in data: const(void_ptr) @optional; [[The data to associate with the item for related functions.]]
|
||||
}
|
||||
}
|
||||
cursor_new {
|
||||
[[Creates and returns a new cursor for the text.]]
|
||||
return: Efl.Canvas.Text.Cursor;
|
||||
}
|
||||
}
|
||||
implements {
|
||||
class.constructor;
|
||||
|
|
Loading…
Reference in New Issue