New 1.20 API: elm/edje text_prediction_hint
no tests, as I have no idea on how to use this feature
This commit is contained in:
parent
6bd7daa883
commit
15b29e3ce8
|
@ -783,6 +783,25 @@ cdef class Edje(Object):
|
|||
return edje_object_part_text_input_hint_get(self.obj,
|
||||
<const char *>part if part is not None else NULL)
|
||||
|
||||
def part_text_prediction_hint_set(self, part, hint):
|
||||
"""Sets the prediction hint to use an intelligent reply suggestion
|
||||
service.
|
||||
|
||||
:param part: the part name
|
||||
:type part: str
|
||||
|
||||
:param hint: the prediction hint text
|
||||
:type hint: str
|
||||
|
||||
.. versionadded:: 1.20
|
||||
|
||||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
if isinstance(hint, unicode): hint = PyUnicode_AsUTF8String(hint)
|
||||
edje_object_part_text_prediction_hint_set(self.obj,
|
||||
<const char *>part if part is not None else NULL,
|
||||
<const char *>hint if hint is not None else NULL)
|
||||
|
||||
def part_swallow(self, part, Object obj):
|
||||
"""Swallows an object into the edje
|
||||
|
||||
|
|
|
@ -1472,6 +1472,24 @@ cdef class Entry(LayoutClass):
|
|||
def prediction_allow_get(self):
|
||||
return elm_entry_prediction_allow_get(self.obj)
|
||||
|
||||
property prediction_hint:
|
||||
"""The prediction hint to use an intelligent reply suggestion service.
|
||||
|
||||
:type: string (**writeonly**)
|
||||
|
||||
.. versionadded:: 1.20
|
||||
|
||||
"""
|
||||
def __set__(self, string):
|
||||
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
|
||||
elm_entry_prediction_hint_set(self.obj,
|
||||
<const char *>string if string is not None else NULL)
|
||||
|
||||
def prediction_hint_set(self, string):
|
||||
if isinstance(string, unicode): string = PyUnicode_AsUTF8String(string)
|
||||
elm_entry_prediction_hint_set(self.obj,
|
||||
<const char *>string if string is not None else NULL)
|
||||
|
||||
# TODO:
|
||||
# def filter_limit_size(self, data, text):
|
||||
# """Filter inserted text based on user defined character and byte limits
|
||||
|
|
|
@ -139,6 +139,7 @@ cdef extern from "Elementary.h":
|
|||
void elm_entry_imf_context_reset(Evas_Object *obj)
|
||||
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)
|
||||
# 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)
|
||||
|
|
|
@ -255,6 +255,8 @@ cdef extern from "Edje.h":
|
|||
void edje_object_part_text_input_hint_set(Evas_Object *obj, char *part, Edje_Input_Hints input_hints)
|
||||
Edje_Input_Hints edje_object_part_text_input_hint_get(Evas_Object *obj, char *part)
|
||||
|
||||
void edje_object_part_text_prediction_hint_set(Evas_Object *obj, char *part, const char *prediction_hint)
|
||||
|
||||
void edje_object_part_swallow(Evas_Object *obj, char *part, Evas_Object *obj_swallow)
|
||||
void edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
|
||||
Evas_Object *edje_object_part_swallow_get(Evas_Object *obj, char *part)
|
||||
|
|
Loading…
Reference in New Issue