aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--efl/elementary/object.pxd3
-rw-r--r--efl/elementary/object.pyx33
-rw-r--r--examples/elementary/test_tooltip.py18
3 files changed, 53 insertions, 1 deletions
diff --git a/efl/elementary/object.pxd b/efl/elementary/object.pxd
index 8e71ea3..24f0d48 100644
--- a/efl/elementary/object.pxd
+++ b/efl/elementary/object.pxd
@@ -143,6 +143,9 @@ cdef extern from "Elementary.h":
const_char * elm_object_tooltip_style_get(Evas_Object *obj)
Eina_Bool elm_object_tooltip_window_mode_set(Evas_Object *obj, Eina_Bool disable)
Eina_Bool elm_object_tooltip_window_mode_get(Evas_Object *obj)
+ void elm_object_tooltip_move_freeze_push(Evas_Object *obj)
+ void elm_object_tooltip_move_freeze_pop(Evas_Object *obj)
+ int elm_object_tooltip_move_freeze_get(const_Evas_Object *obj)
# Object - Translatable text (elm_general.h) (py3: DONE)
void elm_object_domain_translatable_part_text_set(Evas_Object *obj, const_char *part, const_char *domain, const_char *text)
diff --git a/efl/elementary/object.pyx b/efl/elementary/object.pyx
index b056678..99e6825 100644
--- a/efl/elementary/object.pyx
+++ b/efl/elementary/object.pyx
@@ -1490,6 +1490,39 @@ cdef class Object(evasObject):
def tooltip_window_mode_get(self):
return bool(elm_object_tooltip_window_mode_get(self.obj))
+ def tooltip_move_freeze_push(self):
+ """tooltip_move_freeze_push()
+
+ This increments the tooltip movement freeze count by one. If the count
+ is more than 0, the tooltip position will be fixed.
+
+ .. versionadded:: 1.9
+
+ """
+ elm_object_tooltip_move_freeze_push(self.obj)
+
+ def tooltip_move_freeze_pop(self):
+ """tooltip_move_freeze_pop()
+
+ This decrements the tooltip freeze count by one. If the count
+ is more than 0, the tooltip position will be fixed.
+
+ .. versionadded:: 1.9
+
+ """
+ elm_object_tooltip_move_freeze_pop(self.obj)
+
+ def tooltip_move_freeze_get(self):
+ """tooltip_move_freeze_get()
+
+ Get the movement freeze count of the object
+
+ .. versionadded:: 1.9
+
+ """
+ return elm_object_tooltip_move_freeze_get(self.obj)
+
+
#Translatable text
@DEPRECATED("1.8", "Use :py:func:`domain_translatable_part_text_set` instead.")
def domain_translatable_text_part_set(self, part, domain, text):
diff --git a/examples/elementary/test_tooltip.py b/examples/elementary/test_tooltip.py
index 97078ae..dee4266 100644
--- a/examples/elementary/test_tooltip.py
+++ b/examples/elementary/test_tooltip.py
@@ -182,12 +182,28 @@ def tooltip_clicked(obj):
bt = Button(win, text="Unlocked tooltip visibility");
bt.tooltip_text_set(
- "This tooltip is unlocked visible,<br> clock the button to lock!")
+ "This tooltip is unlocked visible,<br> click the button to lock!")
data = dict()
bt.callback_clicked_add(_tt_visible_lock_toggle, data)
bx.pack_end(bt)
bt.show()
+ def _tt_move_freeze_toggle(obj, *args, **kargs):
+ if obj.tooltip_move_freeze_get():
+ obj.text_set("Unfreezed tooltip movement");
+ obj.tooltip_move_freeze_pop()
+ else:
+ obj.text_set("Freezed tooltip movement");
+ obj.tooltip_move_freeze_push()
+
+ bt = Button(win, text="Freezed tooltip movement");
+ bt.tooltip_text_set(
+ "This tooltip has freezed movement,<br> click the button to unfreeze!")
+ bt.tooltip_move_freeze_push()
+ bt.callback_clicked_add(_tt_move_freeze_toggle)
+ bx.pack_end(bt)
+ bt.show()
+
en = Entry(win, scrollable=True, single_line=True,
entry="Hello, some scrolled entry here!", size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)