davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=4721842b1e7e89bafbc1a82e591547e1dc81d3b6
commit 4721842b1e7e89bafbc1a82e591547e1dc81d3b6 Author: Dave Andreoli <d...@gurumeditation.it> Date: Sun Jul 22 07:51:16 2018 +0200 New 1.21 API: elm.Entry.prediction_hint_hash_set/del --- efl/elementary/entry.pxi | 34 ++++++++++++++++++++++++++++++++++ efl/elementary/entry_cdef.pxi | 2 ++ 2 files changed, 36 insertions(+) diff --git a/efl/elementary/entry.pxi b/efl/elementary/entry.pxi index 155d4c3..e05261b 100644 --- a/efl/elementary/entry.pxi +++ b/efl/elementary/entry.pxi @@ -1490,6 +1490,40 @@ cdef class Entry(LayoutClass): elm_entry_prediction_hint_set(self.obj, <const char *>string if string is not None else NULL) + def prediction_hint_hash_set(self, key, value): + """Sets the prediction hint data at the specified key. + + :param key: The key of the prediction hint + :type key: string + :param value: The data to replace + :type value: string + + :return bool: `True` on success, `False` otherwise + + .. versionadded:: 1.21 + + """ + if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key) + if isinstance(value, unicode): value = PyUnicode_AsUTF8String(value) + return bool(elm_entry_prediction_hint_hash_set(self.obj, + <const char *>key if key is not None else NULL, + <const char *>value if value is not None else NULL)) + + def prediction_hint_hash_del(self, key): + """Removes the prediction hint data identified by a key. + + :param key: The key of the prediction hint + :type key: string + + :return bool: `True` on success, `False` otherwise + + .. versionadded:: 1.21 + + """ + if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key) + return bool(elm_entry_prediction_hint_hash_del(self.obj, + <const char *>key if key is not None else NULL)) + # TODO: # def filter_limit_size(self, data, text): # """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 7cda8be..f20295c 100644 --- a/efl/elementary/entry_cdef.pxi +++ b/efl/elementary/entry_cdef.pxi @@ -131,6 +131,8 @@ cdef extern from "Elementary.h": void elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool allow) Eina_Bool elm_entry_prediction_allow_get(const Evas_Object *obj) void elm_entry_prediction_hint_set(Evas_Object *obj, const char *prediction_hint) + Eina_Bool elm_entry_prediction_hint_hash_set(Evas_Object *obj, const char *key, const char *value) + Eina_Bool elm_entry_prediction_hint_hash_del(Evas_Object *obj, const char *key) # TODO: void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text) # TODO: void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text) # TODO: void *elm_entry_imf_context_get(const Evas_Object *obj) --