summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2017-07-15 17:07:08 +0200
committerDave Andreoli <dave@gurumeditation.it>2017-07-15 17:07:08 +0200
commit15b29e3ce88cb90e967140f76d001dc3d46a4c5e (patch)
tree2aef9d490db84c525e4a5f8b49c2b92f8ea8528e
parent6bd7daa8834dadc2582a460cb7a834154e8903cc (diff)
New 1.20 API: elm/edje text_prediction_hint
no tests, as I have no idea on how to use this feature
-rw-r--r--efl/edje/efl.edje_object.pxi19
-rw-r--r--efl/elementary/entry.pxi18
-rw-r--r--efl/elementary/entry_cdef.pxi1
-rw-r--r--include/efl.edje.pxd2
4 files changed, 40 insertions, 0 deletions
diff --git a/efl/edje/efl.edje_object.pxi b/efl/edje/efl.edje_object.pxi
index 34d25e0..3ff969f 100644
--- a/efl/edje/efl.edje_object.pxi
+++ b/efl/edje/efl.edje_object.pxi
@@ -783,6 +783,25 @@ cdef class Edje(Object):
783 return edje_object_part_text_input_hint_get(self.obj, 783 return edje_object_part_text_input_hint_get(self.obj,
784 <const char *>part if part is not None else NULL) 784 <const char *>part if part is not None else NULL)
785 785
786 def part_text_prediction_hint_set(self, part, hint):
787 """Sets the prediction hint to use an intelligent reply suggestion
788 service.
789
790 :param part: the part name
791 :type part: str
792
793 :param hint: the prediction hint text
794 :type hint: str
795
796 .. versionadded:: 1.20
797
798 """
799 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
800 if isinstance(hint, unicode): hint = PyUnicode_AsUTF8String(hint)
801 edje_object_part_text_prediction_hint_set(self.obj,
802 <const char *>part if part is not None else NULL,
803 <const char *>hint if hint is not None else NULL)
804
786 def part_swallow(self, part, Object obj): 805 def part_swallow(self, part, Object obj):
787 """Swallows an object into the edje 806 """Swallows an object into the edje
788 807
diff --git a/efl/elementary/entry.pxi b/efl/elementary/entry.pxi
index 358b9a5..155d4c3 100644
--- a/efl/elementary/entry.pxi
+++ b/efl/elementary/entry.pxi
@@ -1472,6 +1472,24 @@ cdef class Entry(LayoutClass):
1472 def prediction_allow_get(self): 1472 def prediction_allow_get(self):
1473 return elm_entry_prediction_allow_get(self.obj) 1473 return elm_entry_prediction_allow_get(self.obj)
1474 1474
1475 property prediction_hint:
1476 """The prediction hint to use an intelligent reply suggestion service.
1477
1478 :type: string (**writeonly**)
1479
1480 .. versionadded:: 1.20
1481
1482 """
1483 def __set__(self, string):
1484 if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
1485 elm_entry_prediction_hint_set(self.obj,
1486 <const char *>string if string is not None else NULL)
1487
1488 def prediction_hint_set(self, string):
1489 if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
1490 elm_entry_prediction_hint_set(self.obj,
1491 <const char *>string if string is not None else NULL)
1492
1475 # TODO: 1493 # TODO:
1476 # def filter_limit_size(self, data, text): 1494 # def filter_limit_size(self, data, text):
1477 # """Filter inserted text based on user defined character and byte limits 1495 # """Filter inserted text based on user defined character and byte limits
diff --git a/efl/elementary/entry_cdef.pxi b/efl/elementary/entry_cdef.pxi
index 8a579a3..8e95e6d 100644
--- a/efl/elementary/entry_cdef.pxi
+++ b/efl/elementary/entry_cdef.pxi
@@ -139,6 +139,7 @@ cdef extern from "Elementary.h":
139 void elm_entry_imf_context_reset(Evas_Object *obj) 139 void elm_entry_imf_context_reset(Evas_Object *obj)
140 void elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool allow) 140 void elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool allow)
141 Eina_Bool elm_entry_prediction_allow_get(const Evas_Object *obj) 141 Eina_Bool elm_entry_prediction_allow_get(const Evas_Object *obj)
142 void elm_entry_prediction_hint_set(Evas_Object *obj, const char *prediction_hint)
142 # TODO: void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text) 143 # TODO: void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text)
143 # TODO: void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text) 144 # TODO: void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text)
144 # TODO: void *elm_entry_imf_context_get(const Evas_Object *obj) 145 # TODO: void *elm_entry_imf_context_get(const Evas_Object *obj)
diff --git a/include/efl.edje.pxd b/include/efl.edje.pxd
index de6fa7a..14862c8 100644
--- a/include/efl.edje.pxd
+++ b/include/efl.edje.pxd
@@ -255,6 +255,8 @@ cdef extern from "Edje.h":
255 void edje_object_part_text_input_hint_set(Evas_Object *obj, char *part, Edje_Input_Hints input_hints) 255 void edje_object_part_text_input_hint_set(Evas_Object *obj, char *part, Edje_Input_Hints input_hints)
256 Edje_Input_Hints edje_object_part_text_input_hint_get(Evas_Object *obj, char *part) 256 Edje_Input_Hints edje_object_part_text_input_hint_get(Evas_Object *obj, char *part)
257 257
258 void edje_object_part_text_prediction_hint_set(Evas_Object *obj, char *part, const char *prediction_hint)
259
258 void edje_object_part_swallow(Evas_Object *obj, char *part, Evas_Object *obj_swallow) 260 void edje_object_part_swallow(Evas_Object *obj, char *part, Evas_Object *obj_swallow)
259 void edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow) 261 void edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
260 Evas_Object *edje_object_part_swallow_get(Evas_Object *obj, char *part) 262 Evas_Object *edje_object_part_swallow_get(Evas_Object *obj, char *part)