예제 #1
0
 def __iter__(self):
     while True:
         self.render()
         event, *pos = yield loop.Select(loop.TOUCH)
         result = self.touch(event, pos)
         if result is not None:
             return result
예제 #2
0
def _dispatch_reports():
    while True:
        report, = yield loop.Select(_interface)
        report = memoryview(report)
        if __debug__:
            log.debug(__name__, 'read report %s', ubinascii.hexlify(report))
        sessions.dispatch(report, _session_open, _session_close,
                          _session_unknown)
예제 #3
0
 def __iter__(self):
     timeout = loop.Sleep(1000 * 1000 * 1)
     touch = loop.Select(loop.TOUCH)
     wait = loop.Wait((touch, timeout))
     while True:
         self.render()
         result = yield wait
         if touch in wait.finished:
             event, *pos = result
             self.touch(event, pos)
         elif self.zoom_buttons:
             self.zoom_buttons = None
             for btn in self.key_buttons:
                 btn.taint()
예제 #4
0
 def __iter__(self):
     timeout = loop.Sleep(1000 * 1000 * 1)
     touch = loop.Select(loop.TOUCH)
     wait = loop.Wait((touch, timeout))
     while True:
         self.render()
         result = yield wait
         if touch in wait.finished:
             event, *pos = result
             self.touch(event, pos)
         else:
             self.pending_button = None
             self.pending_index = 0
             self._update_suggestion()
             self._update_buttons()
예제 #5
0
 def __iter__(self):
     while True:
         event, *pos = yield loop.Select(loop.TOUCH)
         result = self.send(event, pos)
         if result is not None:
             return result