summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-01-04 14:34:04 +0100
committerDave Andreoli <dave@gurumeditation.it>2015-01-04 14:34:04 +0100
commit84a09b61b6d650b5056ce576f686e19b7ced05b6 (patch)
tree89cc0fde2b9bd7d7ceb7bae7d7caa2003713b3eb /efl
parent6d2e2e9d8eea6144da7b7d8ed0758e9fa49ab554 (diff)
Remove specific X code from elm
Just using unsigned int for the Ecore_X_ID type
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/window.pxd14
-rw-r--r--efl/elementary/window.pyx42
2 files changed, 10 insertions, 46 deletions
diff --git a/efl/elementary/window.pxd b/efl/elementary/window.pxd
index 0ae4406..a1bd1b4 100644
--- a/efl/elementary/window.pxd
+++ b/efl/elementary/window.pxd
@@ -2,13 +2,6 @@ from efl.evas cimport Eina_Bool, Evas_Object
2from enums cimport Elm_Illume_Command, Elm_Win_Type, Elm_Win_Indicator_Mode, \ 2from enums cimport Elm_Illume_Command, Elm_Win_Type, Elm_Win_Indicator_Mode, \
3 Elm_Win_Indicator_Opacity_Mode, Elm_Win_Keyboard_Mode 3 Elm_Win_Indicator_Opacity_Mode, Elm_Win_Keyboard_Mode
4 4
5cdef extern from "Ecore_X.h":
6 ctypedef unsigned int Ecore_X_ID
7 ctypedef Ecore_X_ID Ecore_X_Window
8
9# TODO:
10# cdef extern from "Ecore_Evas_Types.h":
11 # ctypedef struct Ecore_Wl_Window
12 5
13cdef extern from "Elementary.h": 6cdef extern from "Elementary.h":
14 Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type) 7 Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
@@ -127,11 +120,8 @@ cdef extern from "Elementary.h":
127 Eina_Bool elm_win_wm_rotation_manual_rotation_done_get(const Evas_Object *obj) 120 Eina_Bool elm_win_wm_rotation_manual_rotation_done_get(const Evas_Object *obj)
128 void elm_win_wm_rotation_manual_rotation_done(Evas_Object *obj) 121 void elm_win_wm_rotation_manual_rotation_done(Evas_Object *obj)
129 122
130 # X specific call - won't work on non-x engines (return 0)
131 Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj)
132 # TODO: Ecore_Wl_Window *elm_win_wl_window_get(const Evas_Object *obj)
133
134 void elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating) 123 void elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
135 Eina_Bool elm_win_floating_mode_get(const Evas_Object *obj) 124 Eina_Bool elm_win_floating_mode_get(const Evas_Object *obj)
136 125
137 # TODO: Ecore_Window elm_win_window_id_get(const Evas_Object *obj) 126 # X specific call - won't work on non-x engines (return 0)
127 unsigned int elm_win_xwindow_get(const Evas_Object *obj)
diff --git a/efl/elementary/window.pyx b/efl/elementary/window.pyx
index 207dea0..a771791 100644
--- a/efl/elementary/window.pyx
+++ b/efl/elementary/window.pyx
@@ -1659,39 +1659,27 @@ cdef class Window(Object):
1659 """Returns the X Window id. 1659 """Returns the X Window id.
1660 1660
1661 X Window id is a value of type long int which can be used in 1661 X Window id is a value of type long int which can be used in
1662 combination with some functions/objects in the ecore.x module. 1662 combination with some functions/objects in the ecore_x module.
1663 1663
1664 For example you can hide the mouse cursor with:: 1664 For example you can hide the mouse cursor with::
1665 1665
1666 import ecore.x 1666 import ecore_x
1667 xid = your_elm_win.xwindow_xid 1667 xid = your_elm_win.xwindow_xid
1668 xwin = ecore.x.Window_from_xid(xid) 1668 xwin = ecore_x.Window_from_xid(xid)
1669 xwin.cursor_hide() 1669 xwin.cursor_hide()
1670 1670
1671 .. note:: This is not portable at all. Works only under the X window 1671 .. warning:: This is not portable at all. Works only under the X
1672 system. 1672 window system. And you must build python-efl with ecore_x
1673 enabled.
1673 1674
1674 :type: long 1675 :type: long
1675 1676
1676 """ 1677 """
1677 def __get__(self): 1678 def __get__(self):
1678 cdef Ecore_X_Window xwin 1679 return elm_win_xwindow_get(self.obj)
1679 xwin = elm_win_xwindow_get(self.obj)
1680 return xwin
1681 1680
1682 def xwindow_xid_get(self): 1681 def xwindow_xid_get(self):
1683 cdef Ecore_X_Window xwin 1682 return elm_win_xwindow_get(self.obj)
1684 xwin = elm_win_xwindow_get(self.obj)
1685 return xwin
1686
1687 # TODO:
1688 # property wl_window:
1689 # """Get the Ecore_Wl_Window of an Evas_Object
1690
1691 # :type: Ecore_Wl_Window
1692
1693 # """
1694 # Ecore_Wl_Window *elm_win_wl_window_get(const Evas_Object *obj)
1695 1683
1696 property floating_mode: 1684 property floating_mode:
1697 """Floating mode of a window. 1685 """Floating mode of a window.
@@ -1712,20 +1700,6 @@ cdef class Window(Object):
1712 def floating_mode_get(self): 1700 def floating_mode_get(self):
1713 return bool(elm_win_floating_mode_get(self.obj)) 1701 return bool(elm_win_floating_mode_get(self.obj))
1714 1702
1715 # TODO:
1716 # property window_id:
1717 # """
1718
1719 # Get the Ecore_Window of an Evas_Object
1720
1721 # When Elementary is using a Wayland engine, this function will return the surface id of the elm window's surface.
1722
1723 # :type: Ecore_Window
1724 # :since: 1.8
1725
1726 # """
1727 # def __get__(self):
1728 # return Ecore_Window elm_win_window_id_get(self.obj)
1729 1703
1730 def callback_delete_request_add(self, func, *args, **kwargs): 1704 def callback_delete_request_add(self, func, *args, **kwargs):
1731 """The user requested to close the window. See :py:attr:`autodel`.""" 1705 """The user requested to close the window. See :py:attr:`autodel`."""