Ejemplo n.º 1
0
 def wait_for_event(self):
     """
         wait for a xcb event and return the pythonized
         `event.Event` subclass instance.
     """
     _event = _xcb.xcb_wait_for_event(self._connection)
     return event.pythonize_event(self, _event.contents)
Ejemplo n.º 2
0
 def wait_for_event_dispatch(self):
     """
         wait for a xcb event and dispatch it using the
         pyglet event dispatcher coming with samurai-x
         as `samuraix.event`.
     """
     _event = _xcb.xcb_wait_for_event(self._connection)
     pyevent = event.pythonize_event(self, _event.contents)
     if pyevent:
         pyevent.dispatch()
Ejemplo n.º 3
0
 def poll_for_event(self):
     """
         poll for a xcb event; return None if there is no
         event in the queue, return the pythonized
         `event.Event` subclass instance if there is one.
     """
     _event = _xcb.xcb_poll_for_event(self._connection)
     if _event:
         return event.pythonize_event(self, _event.contents)
     else:
         return None