efl_ui_text: remove elm_general.eot
authorYeongjong Lee <yj34.lee@samsung.com>
Thu, 31 Oct 2019 17:38:08 +0000 (13:38 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 11 Nov 2019 02:20:41 +0000 (11:20 +0900)
Summary: remove legacy dependency in eo file.

Test Plan: ninja

Reviewers: woohyun, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10580

src/lib/elementary/Efl_Ui.h
src/lib/elementary/efl_ui_text.c
src/lib/elementary/efl_ui_text.eo
src/lib/elementary/elm_general.eot

index 917ef5b..5b1620d 100644 (file)
@@ -224,13 +224,13 @@ EAPI Eina_Bool efl_ui_win_autodel_get(const Efl_Ui_Win *obj);
 # include <efl_ui_win_socket.eo.h>
 # include <efl_ui_relative_layout.eo.h>
 
-/* FIXME: Efl.Ui.Text must not use elm_general.h
-# include <elm_general.h>
+// FIXME - Text object must stop using Context_Item_Clicked_Cb!
+typedef void (*Context_Item_Clicked_Cb)(void *data, Eo *obj, void *event_info);
+
 # include <efl_text_interactive.eo.h>
 # include <efl_ui_text.eo.h>
 # include <efl_ui_text_editable.eo.h>
 # include <efl_ui_text_async.eo.h>
-*/
 
 # include <efl_ui_animation_view.eo.h>
 # include <efl_ui_clock.eo.h>
index ec32ab3..caf84c2 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "elm_entry_common.h"
 #include "elm_widget_entry.h"
-#include "efl_ui_text.eo.h"
 #include "elm_hoversel_eo.h"
 #include "efl_ui_text_part.eo.h"
 #include "elm_part_helper.h"
@@ -73,11 +72,11 @@ struct _Efl_Ui_Text_Data
    int                                   cursor_pos;
    Elm_Scroller_Policy                   policy_h, policy_v;
    Elm_Wrap_Type                         line_wrap;
-   Elm_Input_Panel_Layout                input_panel_layout;
-   Elm_Autocapital_Type                  autocapital_type;
-   Elm_Input_Panel_Lang                  input_panel_lang;
-   Elm_Input_Panel_Return_Key_Type       input_panel_return_key_type;
-   Elm_Input_Hints                       input_hints;
+   Efl_Ui_Input_Panel_Layout             input_panel_layout;
+   Efl_Ui_Autocapital_Type               autocapital_type;
+   Efl_Ui_Input_Panel_Language_Type      input_panel_lang;
+   Efl_Ui_Input_Panel_Return_Key_Type    input_panel_return_key_type;
+   Efl_Ui_Input_Hints                    input_hints;
    Efl_Text_Cursor_Cursor               *sel_handler_cursor;
    void                                 *input_panel_imdata;
    int                                   input_panel_imdata_len;
@@ -390,7 +389,7 @@ _validate(Evas_Object *obj)
 {
    EFL_UI_TEXT_DATA_GET(obj, sd);
    Eina_Bool res;
-   Elm_Validate_Content vc;
+   Efl_Ui_Validate_Content_Info vc;
    Eina_Strbuf *buf;
 
    if (sd->validators == 0) return;
@@ -2496,7 +2495,7 @@ _efl_ui_text_context_menu_clear(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
 }
 
 EOLIAN static void
-_efl_ui_text_context_menu_item_add(Eo *obj, Efl_Ui_Text_Data *sd, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data)
+_efl_ui_text_context_menu_item_add(Eo *obj, Efl_Ui_Text_Data *sd, const char *label, const char *icon_file, Efl_Ui_Icon_Type icon_type, Context_Item_Clicked_Cb func, const void *data)
 {
    Elm_Entry_Context_Menu_Item *it;
 
@@ -2507,7 +2506,7 @@ _efl_ui_text_context_menu_item_add(Eo *obj, Efl_Ui_Text_Data *sd, const char *la
    it->obj = obj;
    it->label = eina_stringshare_add(label);
    it->icon_file = eina_stringshare_add(icon_file);
-   it->icon_type = icon_type;
+   it->icon_type = (Elm_Icon_Type)icon_type;
    it->func = func;
    it->data = (void *)data;
 }
@@ -2630,20 +2629,20 @@ _efl_ui_text_scrollable_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
 }
 
 EOLIAN static void
-_efl_ui_text_input_panel_layout_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Input_Panel_Layout layout)
+_efl_ui_text_input_panel_layout_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Efl_Ui_Input_Panel_Layout layout)
 {
    sd->input_panel_layout = layout;
 
    edje_object_part_text_input_panel_layout_set
      (sd->entry_edje, "efl.text", (Edje_Input_Panel_Layout)layout);
 
-   if (layout == ELM_INPUT_PANEL_LAYOUT_PASSWORD)
+   if (layout == EFL_UI_INPUT_PANEL_LAYOUT_PASSWORD)
      efl_ui_text_input_hint_set(obj, ((sd->input_hints & ~ELM_INPUT_HINT_AUTO_COMPLETE) | ELM_INPUT_HINT_SENSITIVE_DATA));
-   else if (layout == ELM_INPUT_PANEL_LAYOUT_TERMINAL)
+   else if (layout == EFL_UI_INPUT_PANEL_LAYOUT_TERMINAL)
      efl_ui_text_input_hint_set(obj, (sd->input_hints & ~ELM_INPUT_HINT_AUTO_COMPLETE));
 }
 
-EOLIAN static Elm_Input_Panel_Layout
+EOLIAN static Efl_Ui_Input_Panel_Layout
 _efl_ui_text_input_panel_layout_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
 {
    return sd->input_panel_layout;
@@ -2665,14 +2664,14 @@ _efl_ui_text_input_panel_layout_variation_get(const Eo *obj EINA_UNUSED, Efl_Ui_
 }
 
 EOLIAN static void
-_efl_ui_text_autocapital_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Autocapital_Type autocapital_type)
+_efl_ui_text_autocapital_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Efl_Ui_Autocapital_Type autocapital_type)
 {
    sd->autocapital_type = autocapital_type;
    edje_object_part_text_autocapital_type_set
      (sd->entry_edje, "efl.text", (Edje_Text_Autocapital_Type)autocapital_type);
 }
 
-EOLIAN static Elm_Autocapital_Type
+EOLIAN static Efl_Ui_Autocapital_Type
 _efl_ui_text_autocapital_type_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
 {
    return sd->autocapital_type;
@@ -2693,7 +2692,7 @@ _efl_ui_text_prediction_allow_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *s
 }
 
 EOLIAN static void
-_efl_ui_text_input_hint_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Input_Hints hints)
+_efl_ui_text_input_hint_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Efl_Ui_Input_Hints hints)
 {
    sd->input_hints = hints;
 
@@ -2701,7 +2700,7 @@ _efl_ui_text_input_hint_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Input
      (sd->entry_edje, "efl.text", (Edje_Input_Hints)hints);
 }
 
-EOLIAN static Elm_Input_Hints
+EOLIAN static Efl_Ui_Input_Hints
 _efl_ui_text_input_hint_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
 {
    return sd->input_hints;
@@ -2735,14 +2734,14 @@ _efl_ui_text_input_panel_hide(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
 }
 
 EOLIAN static void
-_efl_ui_text_input_panel_language_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Input_Panel_Lang lang)
+_efl_ui_text_input_panel_language_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Efl_Ui_Input_Panel_Language_Type lang)
 {
    sd->input_panel_lang = lang;
    edje_object_part_text_input_panel_language_set
      (sd->entry_edje, "efl.text", (Edje_Input_Panel_Lang)lang);
 }
 
-EOLIAN static Elm_Input_Panel_Lang
+EOLIAN static Efl_Ui_Input_Panel_Language_Type
 _efl_ui_text_input_panel_language_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
 {
    return sd->input_panel_lang;
@@ -2770,7 +2769,7 @@ _efl_ui_text_input_panel_imdata_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data
 }
 
 EOLIAN static void
-_efl_ui_text_input_panel_return_key_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Elm_Input_Panel_Return_Key_Type return_key_type)
+_efl_ui_text_input_panel_return_key_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd, Efl_Ui_Input_Panel_Return_Key_Type return_key_type)
 {
    sd->input_panel_return_key_type = return_key_type;
 
@@ -2778,7 +2777,7 @@ _efl_ui_text_input_panel_return_key_type_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Da
      (sd->entry_edje, "efl.text", (Edje_Input_Panel_Return_Key_Type)return_key_type);
 }
 
-EOLIAN static Elm_Input_Panel_Return_Key_Type
+EOLIAN static Efl_Ui_Input_Panel_Return_Key_Type
 _efl_ui_text_input_panel_return_key_type_get(const Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
 {
    return sd->input_panel_return_key_type;
index e742053..e718d42 100644 (file)
@@ -1,5 +1,86 @@
-/* FIXME - Text object must stop using elm_general! */
-import elm_general;
+/* FIXME - Text object must stop using Context_Item_Clicked_Cb! */
+/* Legacy-only function pointer types, for the legacy EO classes (genlist, etc...) */
+type @beta @extern Context_Item_Clicked_Cb: __undefined_type; [[Evas smart callback type]]
+
+struct @beta Efl.Ui.Validate_Content_Info
+{
+   [[Validate content information.]]
+   text: string; [[Validate content text]]
+   signal: string; [[Validate content signal]]
+}
+
+enum @beta Efl.Ui.Autocapital_Type
+{
+   [[Autocapitalization Types.
+     Choose method of auto-capitalization.
+   ]]
+   none,         [[No auto-capitalization when typing.]]
+   word,         [[Autocapitalize each word typed.]]
+   sentence,     [[Autocapitalize the start of each sentence.]]
+   allcharacter  [[Autocapitalize all letters.]]
+}
+
+enum @beta Efl.Ui.Input_Panel_Language_Type
+{
+   [[Input panel (virtual keyboard) language modes.
+   ]]
+   automatic,    [[Automatic]]
+   alphabet      [[Alphabet]]
+}
+
+
+enum @beta Efl.Ui.Input_Hints
+{
+   [[Enumeration that defines the types of Input Hints.]]
+   none                = 0,        [[No active hints.]]
+   auto_complete       = 1 << 0,   [[Suggest word auto completion.]]
+   sensitive_data      = 1 << 1,   [[Typed text should not be stored.]]
+}
+
+
+enum @beta Efl.Ui.Input_Panel_Layout
+{
+   [[Input panel (virtual keyboard) layout types.
+     Type of input panel (virtual keyboard) to use - this is a hint and may not provide exactly what is desired.
+   ]]
+   normal,      [[Default layout.]]
+   number,      [[Number layout.]]
+   email,       [[Email layout.]]
+   url,         [[URL layout.]]
+   phonenumber, [[Phone Number layout.]]
+   ip,          [[IP layout.]]
+   month,       [[Month layout.]]
+   numberonly,  [[Number Only layout.]]
+   invalid,     [[Never use this.]]
+   hex,         [[Hexadecimal layout.]]
+   terminal,    [[Command-line terminal layout including esc, alt, ctrl key, so on (no auto-correct, no auto-capitalization).]]
+   password,    [[Like normal, but no auto-correct, no auto-capitalization etc.]]
+   datetime,    [[Date and time layout.]]
+   emoticon,    [[Emoticon layout.]]
+   voice        [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown.]]
+}
+
+enum @beta Efl.Ui.Input_Panel_Return_Key_Type
+{
+   [["Return" Key types on the input panel (virtual keyboard).
+   ]]
+   default, [[Default.]]
+   done,    [[Done.]]
+   go,      [[Go.]]
+   join,    [[Join.]]
+   login,   [[Login.]]
+   next,    [[Next.]]
+   search,  [[Search string or magnifier icon.]]
+   send,    [[Send.]]
+   signin   [[Sign-in.]]
+}
+enum @beta Efl.Ui.Icon_Type
+{
+   [[Icon types.]]
+   none, [[Icon has no type set.]]
+   file, [[Icon is of type file.]]
+   standard [[Icon is of type standard.]]
+}
 
 class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickable,
                  Efl.Access.Text, Efl.Access.Editable.Text, Efl.File,
@@ -73,7 +154,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
          get {
          }
          values {
-            lang: Elm.Input.Panel.Lang; [[Language to be set to the input panel.]]
+            lang: Efl.Ui.Input_Panel_Language_Type; [[Language to be set to the input panel.]]
          }
       }
       @property selection_handler_disabled {
@@ -104,7 +185,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
          get {
          }
          values {
-            autocapital_type: Elm.Autocapital.Type; [[The type of autocapitalization.]]
+            autocapital_type: Efl.Ui.Autocapital_Type; [[The type of autocapitalization.]]
          }
       }
       @property password_mode {
@@ -149,7 +230,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
          get {
          }
          values {
-            hints: Elm.Input.Hints; [[Input hint.]]
+            hints: Efl.Ui.Input_Hints; [[Input hint.]]
          }
       }
       @property input_panel_layout {
@@ -159,7 +240,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
          get {
          }
          values {
-            layout: Elm.Input.Panel.Layout(Elm.Input.Panel.Layout.invalid); [[Layout type.]]
+            layout: Efl.Ui.Input_Panel_Layout(Efl.Ui.Input_Panel_Layout.invalid); [[Layout type.]]
          }
       }
       @property input_panel_return_key_type {
@@ -172,7 +253,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
          get {
          }
          values {
-            return_key_type: Elm.Input.Panel.Return_Key.Type; [[The type of "return" key on the input panel.]]
+            return_key_type: Efl.Ui.Input_Panel_Return_Key_Type; [[The type of "return" key on the input panel.]]
          }
       }
       @property input_panel_enabled {
@@ -274,8 +355,8 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
          params {
             @in label: string @optional; [[The item's text label.]]
             @in icon_file: string @optional; [[The item's icon file.]]
-            @in icon_type: Elm.Icon.Type; [[The item's icon type.]]
-            @in func: Evas_Smart_Cb @optional; [[The callback to execute when the item is clicked.]]
+            @in icon_type: Efl.Ui.Icon_Type; [[The item's icon type.]]
+            @in func: Context_Item_Clicked_Cb @optional; [[The callback to execute when the item is clicked.]]
             @in data: const(void_ptr) @optional; [[The data to associate with the item for related functions.]]
          }
       }
@@ -335,18 +416,19 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
       /* can be $NULL, tag nullable once Eolian supports it */
       changed,user: Efl.Ui.Text_Change_Info;
          [[The text object has changed due to user interaction]]
-      validate: Elm.Validate_Content; [[Called when validating]]
+      validate: Efl.Ui.Validate_Content_Info; [[Called when validating]]
       context,open: void; [[Called when context menu was opened]]
       preedit,changed: void; [[Called when entry preedit changed]]
       press: void; [[Called when entry pressed]]
       redo,request: void; [[Called when redo is requested]]
       undo,request: void; [[Called when undo is requested]]
       aborted: void; [[Called when entry is aborted]]
-      anchor,down: Elm.Entry_Anchor_Info; [[Called on anchor down]]
-      anchor,hover,opened: Elm.Entry_Anchor_Hover_Info; [[Called when hover opened]]
-      anchor,in: Elm.Entry_Anchor_Info; [[Called on anchor in]]
-      anchor,out: Elm.Entry_Anchor_Info; [[Called on anchor out]]
-      anchor,up: Elm.Entry_Anchor_Info; [[called on anchor up]]
+      // FIXME: efl_ui_text doesn't support anchor callbacks yet.
+      //anchor,down: Elm.Entry_Anchor_Info; [[Called on anchor down]]
+      //anchor,hover,opened: Elm.Entry_Anchor_Hover_Info; [[Called when hover opened]]
+      //anchor,in: Elm.Entry_Anchor_Info; [[Called on anchor in]]
+      //anchor,out: Elm.Entry_Anchor_Info; [[Called on anchor out]]
+      //anchor,up: Elm.Entry_Anchor_Info; [[called on anchor up]]
       cursor,changed,manual: void; [[Called on manual cursor change]]
    }
 }
index d508080..1d6bf40 100644 (file)
@@ -39,7 +39,6 @@ enum @beta @extern Elm.Icon.Type
 }
 
 /* FIXME: shouldn't exist, they are unusable by the bindings */
-struct @beta @extern Elm.Validate_Content; [[Data for the elm_validator_regexp_helper()]]
 struct @beta @extern Elm.Entry_Anchor_Info; [[The info sent in the callback for the "anchor,clicked" signals emitted
                                               by entries.]]
 struct @beta @extern Elm.Entry_Anchor_Hover_Info; [[The info sent in the callback for "anchor,hover" signals emitted