summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-11-14 17:27:49 +0100
committerDave Andreoli <dave@gurumeditation.it>2015-11-14 17:27:49 +0100
commit8ad08e8ef862bd0696e8d221e473b7860ee9e619 (patch)
treeb82f654d9dc45561f397156846f7ce2b2fb9c9fb /efl
parented5f93850fda13816d7da7252079d0c4a5e414cd (diff)
New 1.16 API: various next_item_get/set
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/object.pxi38
-rw-r--r--efl/elementary/object_cdef.pxi2
-rw-r--r--efl/elementary/object_item.pxi74
-rw-r--r--efl/elementary/object_item_cdef.pxi5
4 files changed, 119 insertions, 0 deletions
diff --git a/efl/elementary/object.pxi b/efl/elementary/object.pxi
index 3ed8cef..68dc40f 100644
--- a/efl/elementary/object.pxi
+++ b/efl/elementary/object.pxi
@@ -858,6 +858,44 @@ cdef class Object(SmartObject):
858 def focused_object_get(self): 858 def focused_object_get(self):
859 return object_from_instance(elm_object_focused_object_get(self.obj)) 859 return object_from_instance(elm_object_focused_object_get(self.obj))
860 860
861 def focus_next_item_get(self, Elm_Focus_Direction direction):
862 """Get next object item which was set with specific focus direction.
863
864 Get next object item which was set by :func:`focus_next_item_set`
865 with specific focus direction.
866
867 :return: Focus next object item or ``None``, if there is no focus next
868 object item.
869 :rtype: :class:`ObjectItem`
870
871 .. versionadded:: 1.16
872
873 """
874 return _object_item_to_python(
875 elm_object_focus_next_item_get(self.obj, direction))
876
877 def focus_next_item_set(self, ObjectItem next,
878 Elm_Focus_Direction direction):
879 """ Set next object item with specific focus direction.
880
881 When focus next object item is set with specific focus direction, this
882 object item will be the first candidate when finding next focusable
883 object or item. If the focus next object item is set, it is preference
884 to focus next object. Focus next object item can be registered with six
885 directions that are previous, next, up, down, right, and left.
886
887 :param next: Focus next object item
888 :type next: :class:`ObjectItem`
889 :param dir: Focus direction
890 :type dir: :ref:`Elm_Focus_Direction`
891
892 :see: :py:func:`focus_next_item_get`
893
894 .. versionadded:: 1.16
895
896 """
897 elm_object_focus_next_item_set(self.obj, next.item, direction)
898
861 property focused_item: 899 property focused_item:
862 """The focused object item in an object tree. 900 """The focused object item in an object tree.
863 901
diff --git a/efl/elementary/object_cdef.pxi b/efl/elementary/object_cdef.pxi
index 877c954..7de9b10 100644
--- a/efl/elementary/object_cdef.pxi
+++ b/efl/elementary/object_cdef.pxi
@@ -176,6 +176,8 @@ cdef extern from "Elementary.h":
176 Eina_Bool elm_object_tree_focus_allow_get(const Evas_Object *obj) 176 Eina_Bool elm_object_tree_focus_allow_get(const Evas_Object *obj)
177 Eina_Bool elm_object_focus_highlight_style_set(Evas_Object *obj, const char *style) 177 Eina_Bool elm_object_focus_highlight_style_set(Evas_Object *obj, const char *style)
178 const char * elm_object_focus_highlight_style_get(const Evas_Object *obj) 178 const char * elm_object_focus_highlight_style_get(const Evas_Object *obj)
179 Elm_Object_Item * elm_object_focus_next_item_get(const Evas_Object *obj, Elm_Focus_Direction dir)
180 void elm_object_focus_next_item_set(Evas_Object *obj, Elm_Object_Item *next_item, Elm_Focus_Direction dir)
179 Elm_Object_Item * elm_object_focused_item_get(const Evas_Object *obj) 181 Elm_Object_Item * elm_object_focused_item_get(const Evas_Object *obj)
180 void elm_object_focus_move_policy_set(Evas_Object *obj, Elm_Focus_Move_Policy policy) 182 void elm_object_focus_move_policy_set(Evas_Object *obj, Elm_Focus_Move_Policy policy)
181 Elm_Focus_Move_Policy elm_object_focus_move_policy_get(Evas_Object *obj) 183 Elm_Focus_Move_Policy elm_object_focus_move_policy_get(Evas_Object *obj)
diff --git a/efl/elementary/object_item.pxi b/efl/elementary/object_item.pxi
index 4eec972..a824015 100644
--- a/efl/elementary/object_item.pxi
+++ b/efl/elementary/object_item.pxi
@@ -641,6 +641,80 @@ cdef class ObjectItem(object):
641 def focus_get(self): 641 def focus_get(self):
642 return elm_object_item_focus_get(self.item) 642 return elm_object_item_focus_get(self.item)
643 643
644 def focus_next_object_get(self, Elm_Focus_Direction direction):
645 """Get next object which was set with specific focus direction.
646
647 :param dir: Focus direction
648 :type dir: :ref:`Elm_Focus_Direction`
649 :return: Focus next object or None, if there is no focus next object.
650 :rtype: :class:`Object`
651
652 :see: :func:`focus_next_object_set`
653
654 .. versionadded:: 1.16
655
656 """
657 return object_from_instance(
658 elm_object_item_focus_next_object_get(self.item, direction)
659 )
660
661 def focus_next_object_set(self, evasObject next,
662 Elm_Focus_Direction direction):
663 """Set next object with specific focus direction.
664
665 When focus next object is set with specific focus direction, this object
666 will be the first candidate when finding next focusable object. Focus
667 next object can be registered with six directions that are previous,
668 next, up, down, right, and left.
669
670 :param next: Focus next object
671 :type next: :class:`Object`
672 :param dir: Focus direction
673 :type dir: :ref:`Elm_Focus_Direction`
674
675 :see: :py:func:`focus_next_object_get`
676
677 .. versionadded:: 1.16
678
679 """
680 elm_object_item_focus_next_object_set(self.item, next.obj, direction)
681
682 def focus_next_item_get(self, Elm_Focus_Direction direction):
683 """Get next object item which was set with specific focus direction.
684
685 :return: Focus next object item or ``None``, if there is no focus next
686 object item.
687 :rtype: :class:`ObjectItem`
688
689 .. versionadded:: 1.16
690
691 """
692 return _object_item_to_python(
693 elm_object_item_focus_next_item_get(self.item, direction))
694
695 def focus_next_item_set(self, ObjectItem next,
696 Elm_Focus_Direction direction):
697 """ Set next object item with specific focus direction.
698
699 When focus next object item is set with specific focus direction, this
700 object item will be the first candidate when finding next focusable
701 object or item. If the focus next object item is set, it is preference
702 to focus next object. Focus next object item can be registered with six
703 directions that are previous, next, up, down, right, and left.
704
705 :param next: Focus next object item
706 :type next: :class:`ObjectItem`
707 :param dir: Focus direction
708 :type dir: :ref:`Elm_Focus_Direction`
709
710 :see: :py:func:`focus_next_item_get`
711
712 .. versionadded:: 1.16
713
714 """
715 elm_object_item_focus_next_item_set(self.item, next.item, direction)
716
717
644 718
645 # TODO: Accessibility 719 # TODO: Accessibility
646 # def access_unregister(self): 720 # def access_unregister(self):
diff --git a/efl/elementary/object_item_cdef.pxi b/efl/elementary/object_item_cdef.pxi
index 70dce68..490f40d 100644
--- a/efl/elementary/object_item_cdef.pxi
+++ b/efl/elementary/object_item_cdef.pxi
@@ -44,6 +44,11 @@ cdef extern from "Elementary.h":
44 Eina_Bool elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it) 44 Eina_Bool elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it)
45 void elm_object_item_focus_set(Elm_Object_Item *it, Eina_Bool focused) 45 void elm_object_item_focus_set(Elm_Object_Item *it, Eina_Bool focused)
46 Eina_Bool elm_object_item_focus_get(const Elm_Object_Item *it) 46 Eina_Bool elm_object_item_focus_get(const Elm_Object_Item *it)
47 Evas_Object * elm_object_item_focus_next_object_get(Elm_Object_Item *it, Elm_Focus_Direction dir)
48 void elm_object_item_focus_next_object_set(Elm_Object_Item *it, Evas_Object *next, Elm_Focus_Direction dir)
49 Elm_Object_Item * elm_object_item_focus_next_item_get(Elm_Object_Item *it, Elm_Focus_Direction dir)
50 void elm_object_item_focus_next_item_set(Elm_Object_Item *it, Elm_Object_Item *next_item, Elm_Focus_Direction dir)
51
47 52
48 53
49 #TODO: Evas_Object * elm_object_item_access_register(Elm_Object_Item *item) 54 #TODO: Evas_Object * elm_object_item_access_register(Elm_Object_Item *item)