summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2018-07-22 07:51:16 +0200
committerDave Andreoli <dave@gurumeditation.it>2018-07-22 07:51:16 +0200
commit4721842b1e7e89bafbc1a82e591547e1dc81d3b6 (patch)
treef1ba39a929c1243c5f6fb3e1687d241ae4bed02d
parent6aa35011362985ad782217162007fed227ee4df5 (diff)
New 1.21 API: elm.Entry.prediction_hint_hash_set/del
-rw-r--r--efl/elementary/entry.pxi34
-rw-r--r--efl/elementary/entry_cdef.pxi2
2 files changed, 36 insertions, 0 deletions
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):
1490 elm_entry_prediction_hint_set(self.obj, 1490 elm_entry_prediction_hint_set(self.obj,
1491 <const char *>string if string is not None else NULL) 1491 <const char *>string if string is not None else NULL)
1492 1492
1493 def prediction_hint_hash_set(self, key, value):
1494 """Sets the prediction hint data at the specified key.
1495
1496 :param key: The key of the prediction hint
1497 :type key: string
1498 :param value: The data to replace
1499 :type value: string
1500
1501 :return bool: `True` on success, `False` otherwise
1502
1503 .. versionadded:: 1.21
1504
1505 """
1506 if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key)
1507 if isinstance(value, unicode): value = PyUnicode_AsUTF8String(value)
1508 return bool(elm_entry_prediction_hint_hash_set(self.obj,
1509 <const char *>key if key is not None else NULL,
1510 <const char *>value if value is not None else NULL))
1511
1512 def prediction_hint_hash_del(self, key):
1513 """Removes the prediction hint data identified by a key.
1514
1515 :param key: The key of the prediction hint
1516 :type key: string
1517
1518 :return bool: `True` on success, `False` otherwise
1519
1520 .. versionadded:: 1.21
1521
1522 """
1523 if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key)
1524 return bool(elm_entry_prediction_hint_hash_del(self.obj,
1525 <const char *>key if key is not None else NULL))
1526
1493 # TODO: 1527 # TODO:
1494 # def filter_limit_size(self, data, text): 1528 # def filter_limit_size(self, data, text):
1495 # """Filter inserted text based on user defined character and byte limits 1529 # """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":
131 void elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool allow) 131 void elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool allow)
132 Eina_Bool elm_entry_prediction_allow_get(const Evas_Object *obj) 132 Eina_Bool elm_entry_prediction_allow_get(const Evas_Object *obj)
133 void elm_entry_prediction_hint_set(Evas_Object *obj, const char *prediction_hint) 133 void elm_entry_prediction_hint_set(Evas_Object *obj, const char *prediction_hint)
134 Eina_Bool elm_entry_prediction_hint_hash_set(Evas_Object *obj, const char *key, const char *value)
135 Eina_Bool elm_entry_prediction_hint_hash_del(Evas_Object *obj, const char *key)
134 # TODO: void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text) 136 # TODO: void elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text)
135 # TODO: void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text) 137 # TODO: void elm_entry_filter_accept_set(void *data, Evas_Object *entry, char **text)
136 # TODO: void *elm_entry_imf_context_get(const Evas_Object *obj) 138 # TODO: void *elm_entry_imf_context_get(const Evas_Object *obj)