diff options
author | Dave Andreoli <dave@gurumeditation.it> | 2018-07-22 08:04:09 +0200 |
---|---|---|
committer | Dave Andreoli <dave@gurumeditation.it> | 2018-07-22 08:04:09 +0200 |
commit | 48d9c26945e918ef5c2f45b8971ae6b1d262dba4 (patch) | |
tree | 136343c63e6ec3aff59aba8ac3094bc2ad00988a | |
parent | 4721842b1e7e89bafbc1a82e591547e1dc81d3b6 (diff) |
New 1.21 API: edje.Object.part_text_prediction_hint_hash_set/del
-rw-r--r-- | efl/edje/efl.edje_object.pxi | 45 | ||||
-rw-r--r-- | include/efl.edje.pxd | 2 |
2 files changed, 47 insertions, 0 deletions
diff --git a/efl/edje/efl.edje_object.pxi b/efl/edje/efl.edje_object.pxi index 29354ce..4c98986 100644 --- a/efl/edje/efl.edje_object.pxi +++ b/efl/edje/efl.edje_object.pxi | |||
@@ -786,6 +786,51 @@ cdef class Edje(Object): | |||
786 | <const char *>part if part is not None else NULL, | 786 | <const char *>part if part is not None else NULL, |
787 | <const char *>hint if hint is not None else NULL) | 787 | <const char *>hint if hint is not None else NULL) |
788 | 788 | ||
789 | def part_text_prediction_hint_hash_set(self, part, key, value): | ||
790 | """Sets the prediction hint data at the specified key | ||
791 | |||
792 | :param part: the part name | ||
793 | :type part: str | ||
794 | |||
795 | :param key: the key of the prediction hint | ||
796 | :type key: str | ||
797 | |||
798 | :param value: the data to replace | ||
799 | :type value: str | ||
800 | |||
801 | :return bool: `True` on success, `False` otherwise | ||
802 | |||
803 | .. versionadded:: 1.21 | ||
804 | |||
805 | """ | ||
806 | if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) | ||
807 | if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key) | ||
808 | if isinstance(value, unicode): value = PyUnicode_AsUTF8String(value) | ||
809 | edje_object_part_text_prediction_hint_hash_set(self.obj, | ||
810 | <const char *>part if part is not None else NULL, | ||
811 | <const char *>key if key is not None else NULL, | ||
812 | <const char *>value if value is not None else NULL) | ||
813 | |||
814 | def part_text_prediction_hint_hash_del(self, part, key): | ||
815 | """Removes the prediction hint data identified by a key | ||
816 | |||
817 | :param part: the part name | ||
818 | :type part: str | ||
819 | |||
820 | :param key: the key of the prediction hint | ||
821 | :type key: str | ||
822 | |||
823 | :return bool: `True` on success, `False` otherwise | ||
824 | |||
825 | .. versionadded:: 1.21 | ||
826 | |||
827 | """ | ||
828 | if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part) | ||
829 | if isinstance(key, unicode): key = PyUnicode_AsUTF8String(key) | ||
830 | edje_object_part_text_prediction_hint_hash_del(self.obj, | ||
831 | <const char *>part if part is not None else NULL, | ||
832 | <const char *>key if key is not None else NULL) | ||
833 | |||
789 | def part_swallow(self, part, Object obj): | 834 | def part_swallow(self, part, Object obj): |
790 | """Swallows an object into the edje | 835 | """Swallows an object into the edje |
791 | 836 | ||
diff --git a/include/efl.edje.pxd b/include/efl.edje.pxd index 14862c8..d99e879 100644 --- a/include/efl.edje.pxd +++ b/include/efl.edje.pxd | |||
@@ -256,6 +256,8 @@ cdef extern from "Edje.h": | |||
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) | 258 | void edje_object_part_text_prediction_hint_set(Evas_Object *obj, char *part, const char *prediction_hint) |
259 | Eina_Bool edje_object_part_text_prediction_hint_hash_set(Evas_Object *obj, const char *part, const char *key, const char *value) | ||
260 | Eina_Bool edje_object_part_text_prediction_hint_hash_del(Evas_Object *obj, const char *part, const char *key) | ||
259 | 261 | ||
260 | void edje_object_part_swallow(Evas_Object *obj, char *part, Evas_Object *obj_swallow) | 262 | void edje_object_part_swallow(Evas_Object *obj, char *part, Evas_Object *obj_swallow) |
261 | void edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow) | 263 | void edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow) |