def do_show(ag, key, data=None): pass log__("", (), __=(log4fun, _log4mod)) if 'c' not in app.app_proc(app.PROC_GET_KEYSTATE, ''): ag.hide() app.timer_proc( app.TIMER_START_ONE, lambda tag: ag.hide() if 'c' not in app.app_proc(app.PROC_GET_KEYSTATE, '') else 0, 200) return []
def timer_callback(self, tag='', info=''): callback = self._callback_wr() if callback is not None: callback(tag, info) if self._last_period < self._maxtime: self._last_period = min(self._maxtime, self._last_period + self._delta) ct.timer_proc(ct.TIMER_START, self.timer_callback, self._last_period) else: ct.timer_proc(ct.TIMER_STOP, self.timer_callback, 0)
def update(self): ct.timer_proc(ct.TIMER_STOP, TIMERCALL, 0) ct.timer_proc(ct.TIMER_START_ONE, TIMERCALL, TIMERTIME)
def stop(self): ct.timer_proc(ct.TIMER_STOP, self.timer_callback, 0)
def restart(self): self._last_period = self._mintime ct.timer_proc(ct.TIMER_START, self.timer_callback, self._last_period)