diff options
author | Tom Hacohen <tom@stosb.com> | 2019-10-09 17:10:26 +0300 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2019-10-09 17:10:26 +0300 |
commit | 88fc3cecb4e568f07a6cf8e3525a2453e3c6f08b (patch) | |
tree | f6542b567d09081400b8c9a3f504f340b74b4a9c | |
parent | bf7c2adb36e9c08a1abda44dc2a36b518041b6fa (diff) | |
download | efl-devs/tasn/ifaces-with-factories.tar.gz |
Add item providers.devs/tasn/ifaces-with-factories
-rw-r--r-- | src/lib/elementary/efl2_text_raw_editable.c | 7 | ||||
-rw-r--r-- | src/lib/elementary/efl2_text_raw_editable.eo | 24 |
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 61b9dc080a..95e721b00b 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_ #endif } - EOLIAN static void _efl2_text_raw_editable_efl2_input_text_input_panel_return_key_autoenabled_set(Eo *obj, Efl2_Text_Raw_Editable_Data *en, Eina_Bool enabled) { @@ -2788,6 +2787,12 @@ _efl2_text_raw_editable_efl2_input_text_input_panel_return_key_autoenabled_set(E } EOLIAN static void +_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) +{ + #warning IMPLEMENTATION +} + +EOLIAN static void _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) { 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 b13cf8731c..d579e1df4a 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 { merge: bool; [[$true if can be merged with the previous one. Used for example with insertion when something is already selected]] } +function @beta Efl2.Ui.Text_Provider.Item { + [[This is a function that takes in a $.key and creates an object based on it. + + It's meant for translating <item> objects into actual canvas objects. + + If the function found a suitable object it returns the object, otherwise $null. + ]] + params { + @in parent: Efl.Object; [[Parent of the object returned]] + @in key: string; [[The key to translate into an object]] + } + return: Efl.Object; +}; + class @beta Efl2.Text.Raw_Editable extends Efl2.Canvas.Text implements Efl2.Input.Text { methods { @property editable { @@ -82,6 +96,16 @@ class @beta Efl2.Text.Raw_Editable extends Efl2.Canvas.Text implements Efl2.Inpu } } + @property item_provider { + [[The item provider which will be used to create items from their names + e.g.: "emoticon/happy" or "href=file://image.jpg" etc. + ]] + set { } + values { + provider_function: Efl2.Ui.Text_Provider.Item; [[The provider function]] + } + } + text_filter { [[Replaces the string on the change info with the new filtered string |