summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2019-10-09 17:10:26 +0300
committerTom Hacohen <tom@stosb.com>2019-10-09 17:10:26 +0300
commit88fc3cecb4e568f07a6cf8e3525a2453e3c6f08b (patch)
treef6542b567d09081400b8c9a3f504f340b74b4a9c
parentbf7c2adb36e9c08a1abda44dc2a36b518041b6fa (diff)
-rw-r--r--src/lib/elementary/efl2_text_raw_editable.c7
-rw-r--r--src/lib/elementary/efl2_text_raw_editable.eo24
2 files changed, 30 insertions, 1 deletions
diff --git a/src/lib/elementary/efl2_text_raw_editable.c b/src/lib/elementary/efl2_text_raw_editable.c
index 61b9dc0..95e721b 100644
--- a/src/lib/elementary/efl2_text_raw_editable.c
+++ b/src/lib/elementary/efl2_text_raw_editable.c
@@ -2774,7 +2774,6 @@ _efl2_text_raw_editable_efl2_input_text_capitalize_get(const Eo *obj, Efl2_Text_
2774#endif 2774#endif
2775} 2775}
2776 2776
2777
2778EOLIAN static void 2777EOLIAN static void
2779_efl2_text_raw_editable_efl2_input_text_input_panel_return_key_autoenabled_set(Eo *obj, Efl2_Text_Raw_Editable_Data *en, Eina_Bool enabled) 2778_efl2_text_raw_editable_efl2_input_text_input_panel_return_key_autoenabled_set(Eo *obj, Efl2_Text_Raw_Editable_Data *en, Eina_Bool enabled)
2780{ 2779{
@@ -2788,6 +2787,12 @@ _efl2_text_raw_editable_efl2_input_text_input_panel_return_key_autoenabled_set(E
2788} 2787}
2789 2788
2790EOLIAN static void 2789EOLIAN static void
2790_efl2_text_raw_editable_item_provider_set(Eo *ob EINA_UNUSED, Efl2_Text_Raw_Editable_Data *pd, void *provider_function_data, Efl2_Ui_Text_Provider_Item provider_function, Eina_Free_Cb provider_function_free_cb)
2791{
2792 #warning IMPLEMENTATION
2793}
2794
2795EOLIAN static void
2791_efl2_text_raw_editable_text_filter(Eo *obj EINA_UNUSED, Efl2_Text_Raw_Editable_Data *pd EINA_UNUSED, Efl2_Text_Change_Info *change_info, const char *new_text) 2796_efl2_text_raw_editable_text_filter(Eo *obj EINA_UNUSED, Efl2_Text_Raw_Editable_Data *pd EINA_UNUSED, Efl2_Text_Change_Info *change_info, const char *new_text)
2792{ 2797{
2793 eina_stringshare_replace(&change_info->content, new_text); 2798 eina_stringshare_replace(&change_info->content, new_text);
diff --git a/src/lib/elementary/efl2_text_raw_editable.eo b/src/lib/elementary/efl2_text_raw_editable.eo
index b13cf87..d579e1d 100644
--- a/src/lib/elementary/efl2_text_raw_editable.eo
+++ b/src/lib/elementary/efl2_text_raw_editable.eo
@@ -10,6 +10,20 @@ struct @beta Efl2.Text.Change_Info {
10 merge: bool; [[$true if can be merged with the previous one. Used for example with insertion when something is already selected]] 10 merge: bool; [[$true if can be merged with the previous one. Used for example with insertion when something is already selected]]
11} 11}
12 12
13function @beta Efl2.Ui.Text_Provider.Item {
14 [[This is a function that takes in a $.key and creates an object based on it.
15
16 It's meant for translating <item> objects into actual canvas objects.
17
18 If the function found a suitable object it returns the object, otherwise $null.
19 ]]
20 params {
21 @in parent: Efl.Object; [[Parent of the object returned]]
22 @in key: string; [[The key to translate into an object]]
23 }
24 return: Efl.Object;
25};
26
13class @beta Efl2.Text.Raw_Editable extends Efl2.Canvas.Text implements Efl2.Input.Text { 27class @beta Efl2.Text.Raw_Editable extends Efl2.Canvas.Text implements Efl2.Input.Text {
14 methods { 28 methods {
15 @property editable { 29 @property editable {
@@ -82,6 +96,16 @@ class @beta Efl2.Text.Raw_Editable extends Efl2.Canvas.Text implements Efl2.Inpu
82 } 96 }
83 } 97 }
84 98
99 @property item_provider {
100 [[The item provider which will be used to create items from their names
101 e.g.: "emoticon/happy" or "href=file://image.jpg" etc.
102 ]]
103 set { }
104 values {
105 provider_function: Efl2.Ui.Text_Provider.Item; [[The provider function]]
106 }
107 }
108
85 text_filter { 109 text_filter {
86 [[Replaces the string on the change info with the new filtered string 110 [[Replaces the string on the change info with the new filtered string
87 111