New 1.12 api: edje_object_part_text_input_hint_set/get
This commit is contained in:
parent
90cead3b12
commit
8f05e1c177
|
@ -125,6 +125,10 @@ EDJE_EXTERNAL_PARAM_TYPE_BOOL = 3
|
|||
EDJE_EXTERNAL_PARAM_TYPE_CHOICE = 4
|
||||
EDJE_EXTERNAL_PARAM_TYPE_MAX = 5
|
||||
|
||||
# Edje_Input_Hints
|
||||
EDJE_INPUT_HINT_NONE = 0
|
||||
EDJE_INPUT_HINT_AUTO_COMPLETE = 1
|
||||
EDJE_INPUT_HINT_SENSITIVE_DATA = 2
|
||||
|
||||
|
||||
def init():
|
||||
|
|
|
@ -625,6 +625,37 @@ cdef class Edje(Object):
|
|||
libc.stdlib.free(s)
|
||||
return str
|
||||
|
||||
def part_text_input_hint_set(self, part, input_hints):
|
||||
""" Sets the input hint which allows input methods to fine-tune
|
||||
their behavior.
|
||||
|
||||
:param part: the part name
|
||||
:type part: str
|
||||
:param input_hints: the hints to set
|
||||
:type input_hints: Edje_Input_Hints
|
||||
|
||||
.. versionadded:: 1.12
|
||||
|
||||
"""
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
edje_object_part_text_input_hint_set(self.obj,
|
||||
<const char *>part if part is not None else NULL,
|
||||
input_hints)
|
||||
|
||||
def part_text_input_hint_get(self, part):
|
||||
""" Gets the value of input hint.
|
||||
|
||||
:param part: the part name
|
||||
:type part: str
|
||||
|
||||
.. versionadded:: 1.12
|
||||
|
||||
"""
|
||||
|
||||
if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
|
||||
return edje_object_part_text_input_hint_get(self.obj,
|
||||
<const char *>part if part is not None else NULL)
|
||||
|
||||
def part_swallow(self, part, Object obj):
|
||||
"""Swallows an object into the edje
|
||||
|
||||
|
|
|
@ -50,6 +50,9 @@ cdef extern from "Edje.h":
|
|||
ctypedef enum Edje_External_Param_Type:
|
||||
pass
|
||||
|
||||
ctypedef enum Edje_Input_Hints:
|
||||
pass
|
||||
|
||||
cdef int EDJE_EXTERNAL_INT_UNSET
|
||||
cdef double EDJE_EXTERNAL_DOUBLE_UNSET
|
||||
cdef unsigned int EDJE_EXTERNAL_TYPE_ABI_VERSION
|
||||
|
@ -257,6 +260,8 @@ cdef extern from "Edje.h":
|
|||
void edje_object_part_text_unescaped_set(Evas_Object *obj, char *part, char *text_to_escape)
|
||||
char *edje_object_part_text_unescaped_get(Evas_Object *obj, char *part)
|
||||
|
||||
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_swallow(Evas_Object *obj, char *part, Evas_Object *obj_swallow)
|
||||
void edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
|
||||
|
|
Loading…
Reference in New Issue