From b9cf4c6da51ee2a56621319febec6f14271000d8 Mon Sep 17 00:00:00 2001 From: Xavi Artigas Date: Fri, 25 Oct 2019 18:00:31 -0300 Subject: [PATCH] Efl.Ui.Text: Fix Text Cursor composition Summary: This is a temporary fix while Text is being revamped. Efl.Ui.Text internally composites Efl.Text_Cursor (through some other interfaces) but this was not being advertised in the EO file. This caused no trouble to C but was preventing C# from using the Cursors API (because C# relies on the EO composites section). On top of this, the cursor_new() method has been removed, since it was redundant. Test Plan: Builds and passes tests, and C# is able to do things like: ``` Efl.TextCursorCursor cursor = screen.GetTextCursor(Efl.TextCursorGetType.Main); screen.InsertCursorText(cursor, str); ``` Reviewers: lauromoura, cedric, tasn Reviewed By: lauromoura Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10465 --- src/lib/elementary/efl_ui_text.c | 7 ------- src/lib/elementary/efl_ui_text.eo | 6 +----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index a57ca7e..ec32ab3 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -3389,13 +3389,6 @@ _efl_ui_text_efl_access_object_i18n_name_get(const Eo *obj, Efl_Ui_Text_Data *pd return ret; } -EOLIAN static Efl_Text_Cursor_Cursor * -_efl_ui_text_cursor_new(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd EINA_UNUSED) -{ - Eo *text_obj = sd->text_obj; - return efl_text_cursor_new(text_obj); -} - static void _edje_signal_emit(Efl_Ui_Text_Data *sd, const char *sig, const char *src) { diff --git a/src/lib/elementary/efl_ui_text.eo b/src/lib/elementary/efl_ui_text.eo index 2118bab..e742053 100644 --- a/src/lib/elementary/efl_ui_text.eo +++ b/src/lib/elementary/efl_ui_text.eo @@ -5,7 +5,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl Efl.Access.Text, Efl.Access.Editable.Text, Efl.File, Efl.Ui.Text_Selectable composites - Efl.Text_Interactive, Efl.Text_Markup + Efl.Text_Interactive, Efl.Text_Markup, Efl.Text_Cursor { [[A flexible text widget which can be static (as a label) or editable by the user (as a text entry). It provides all sorts of editing facilities @@ -279,10 +279,6 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl @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: ptr(Efl.Text_Cursor_Cursor); [[Text cursor]] - } } implements { Efl.Object.constructor; -- 2.7.4