summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2014-11-18 20:55:12 +0100
committerDave Andreoli <dave@gurumeditation.it>2014-11-18 20:55:12 +0100
commit8f05e1c1778df055379d1d5f76c4395fee468918 (patch)
tree7c789a8d401f310de4a427bde278ec1ae3e75944
parent90cead3b12c0e73afa1dcdc233c0b282f9df918c (diff)
New 1.12 api: edje_object_part_text_input_hint_set/get
-rw-r--r--efl/edje/efl.edje.pyx4
-rw-r--r--efl/edje/efl.edje_object.pxi31
-rw-r--r--include/efl.edje.pxd5
3 files changed, 40 insertions, 0 deletions
diff --git a/efl/edje/efl.edje.pyx b/efl/edje/efl.edje.pyx
index 60ba34e..402942d 100644
--- a/efl/edje/efl.edje.pyx
+++ b/efl/edje/efl.edje.pyx
@@ -125,6 +125,10 @@ EDJE_EXTERNAL_PARAM_TYPE_BOOL = 3
125EDJE_EXTERNAL_PARAM_TYPE_CHOICE = 4 125EDJE_EXTERNAL_PARAM_TYPE_CHOICE = 4
126EDJE_EXTERNAL_PARAM_TYPE_MAX = 5 126EDJE_EXTERNAL_PARAM_TYPE_MAX = 5
127 127
128# Edje_Input_Hints
129EDJE_INPUT_HINT_NONE = 0
130EDJE_INPUT_HINT_AUTO_COMPLETE = 1
131EDJE_INPUT_HINT_SENSITIVE_DATA = 2
128 132
129 133
130def init(): 134def init():
diff --git a/efl/edje/efl.edje_object.pxi b/efl/edje/efl.edje_object.pxi
index ed9ce29..dddf916 100644
--- a/efl/edje/efl.edje_object.pxi
+++ b/efl/edje/efl.edje_object.pxi
@@ -625,6 +625,37 @@ cdef class Edje(Object):
625 libc.stdlib.free(s) 625 libc.stdlib.free(s)
626 return str 626 return str
627 627
628 def part_text_input_hint_set(self, part, input_hints):
629 """ Sets the input hint which allows input methods to fine-tune
630 their behavior.
631
632 :param part: the part name
633 :type part: str
634 :param input_hints: the hints to set
635 :type input_hints: Edje_Input_Hints
636
637 .. versionadded:: 1.12
638
639 """
640 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
641 edje_object_part_text_input_hint_set(self.obj,
642 <const char *>part if part is not None else NULL,
643 input_hints)
644
645 def part_text_input_hint_get(self, part):
646 """ Gets the value of input hint.
647
648 :param part: the part name
649 :type part: str
650
651 .. versionadded:: 1.12
652
653 """
654
655 if isinstance(part, unicode): part = PyUnicode_AsUTF8String(part)
656 return edje_object_part_text_input_hint_get(self.obj,
657 <const char *>part if part is not None else NULL)
658
628 def part_swallow(self, part, Object obj): 659 def part_swallow(self, part, Object obj):
629 """Swallows an object into the edje 660 """Swallows an object into the edje
630 661
diff --git a/include/efl.edje.pxd b/include/efl.edje.pxd
index 3f3974d..2550cce 100644
--- a/include/efl.edje.pxd
+++ b/include/efl.edje.pxd
@@ -50,6 +50,9 @@ cdef extern from "Edje.h":
50 ctypedef enum Edje_External_Param_Type: 50 ctypedef enum Edje_External_Param_Type:
51 pass 51 pass
52 52
53 ctypedef enum Edje_Input_Hints:
54 pass
55
53 cdef int EDJE_EXTERNAL_INT_UNSET 56 cdef int EDJE_EXTERNAL_INT_UNSET
54 cdef double EDJE_EXTERNAL_DOUBLE_UNSET 57 cdef double EDJE_EXTERNAL_DOUBLE_UNSET
55 cdef unsigned int EDJE_EXTERNAL_TYPE_ABI_VERSION 58 cdef unsigned int EDJE_EXTERNAL_TYPE_ABI_VERSION
@@ -257,6 +260,8 @@ cdef extern from "Edje.h":
257 void edje_object_part_text_unescaped_set(Evas_Object *obj, char *part, char *text_to_escape) 260 void edje_object_part_text_unescaped_set(Evas_Object *obj, char *part, char *text_to_escape)
258 char *edje_object_part_text_unescaped_get(Evas_Object *obj, char *part) 261 char *edje_object_part_text_unescaped_get(Evas_Object *obj, char *part)
259 262
263 void edje_object_part_text_input_hint_set(Evas_Object *obj, char *part, Edje_Input_Hints input_hints)
264 Edje_Input_Hints edje_object_part_text_input_hint_get(Evas_Object *obj, char *part)
260 265
261 void edje_object_part_swallow(Evas_Object *obj, char *part, Evas_Object *obj_swallow) 266 void edje_object_part_swallow(Evas_Object *obj, char *part, Evas_Object *obj_swallow)
262 void edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow) 267 void edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)