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
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)
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()
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()
def __iter__(self): while True: event, *pos = yield loop.Select(loop.TOUCH) result = self.send(event, pos) if result is not None: return result