#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"
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;
{
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;
}
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;
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;
}
}
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;
}
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;
}
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;
(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;
}
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;
}
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;
(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;
-/* 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,
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 {
get {
}
values {
- autocapital_type: Elm.Autocapital.Type; [[The type of autocapitalization.]]
+ autocapital_type: Efl.Ui.Autocapital_Type; [[The type of autocapitalization.]]
}
}
@property password_mode {
get {
}
values {
- hints: Elm.Input.Hints; [[Input hint.]]
+ hints: Efl.Ui.Input_Hints; [[Input hint.]]
}
}
@property input_panel_layout {
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 {
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 {
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.]]
}
}
/* 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]]
}
}