kuuko pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=5903c8a936181ce9afd8ee858bfcef61c334f624

commit 5903c8a936181ce9afd8ee858bfcef61c334f624
Author: Kai Huuhko <[email protected]>
Date:   Tue May 13 22:21:53 2014 +0300

    efl.ecore.x: Add keyboard_grab/ungrab
---
 efl/ecore/x.pyx        | 4 ++++
 efl/ecore/x_window.pxi | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/efl/ecore/x.pyx b/efl/ecore/x.pyx
index 045be39..ef1bd66 100644
--- a/efl/ecore/x.pyx
+++ b/efl/ecore/x.pyx
@@ -233,5 +233,9 @@ def window_at_xy_begin_get(Window begin, int x, int y):
     return Window_from_xid(xid)
 
 
+def keyboard_ungrab():
+    ecore_x_keyboard_ungrab()
+
+
 include "x_window.pxi"
 include "x_events.pxi"
diff --git a/efl/ecore/x_window.pxi b/efl/ecore/x_window.pxi
index dd6cda9..a99e80d 100644
--- a/efl/ecore/x_window.pxi
+++ b/efl/ecore/x_window.pxi
@@ -451,6 +451,9 @@ cdef class Window:
         ecore_x_netwm_window_state_set(self.xid, _states, len(states))
         PyMem_Free(<void*>_states)
 
+    def keyboard_grab(self):
+        return bool(ecore_x_keyboard_grab(self.xid))
+
 def Window_from_xid(unsigned long xid):
     """Create a Python wrapper for given window id.
 

-- 


Reply via email to