def eventhandler(self, event, menuw=None): """eventhandler""" logger.log(9, "eventhandler(event=%s, menuw=%r)", event, menuw) if event == "MENU_BACK_ONE_MENU": rc.remove_app(self) self.menuw.show() return True elif event == "MENU_SELECT": self.weather.getForecast(force=1) skin.clear() skin.draw("oneclick", self, transition=skin.TRANSITION_IN) return True elif event in ("MENU_DOWN", "MENU_RIGHT"): self.nextSkin() skin.draw("oneclick", self, transition=skin.TRANSITION_PAGE) return True elif event in ("MENU_UP", "MENU_LEFT"): self.prevSkin() skin.draw("oneclick", self, transition=skin.TRANSITION_PAGE) return True return False
def eventhandler(self, event, menuw=None): '''eventhandler''' if event == 'MENU_BACK_ONE_MENU': rc.app(None) self.menuw.show() return True elif event == 'MENU_SELECT': # TODO: update the current forecast data, and refresh self.weather.getForecast(force=1) skin.clear() skin.draw('weather', self) return True elif event in ('MENU_DOWN', 'MENU_RIGHT'): # Fire up the next skin self.nextSkin() skin.draw('weather', self) return True elif event in ('MENU_UP', 'MENU_LEFT'): # Fire up the previous skin self.prevSkin() skin.draw('weather', self) return True return False
def eventhandler(self, event, menuw=None): """eventhandler""" _debug_('eventhandler(event=%s, menuw=%r)' % (event, menuw), 2) if event == 'MENU_BACK_ONE_MENU': rc.app(None) self.menuw.show() return True elif event == 'MENU_SELECT': self.weather.getForecast(force=1) skin.clear() skin.draw('oneclick', self) return True elif event in ('MENU_DOWN', 'MENU_RIGHT'): self.nextSkin() skin.draw('oneclick', self) return True elif event in ('MENU_UP', 'MENU_LEFT'): self.prevSkin() skin.draw('oneclick', self) return True return False
def eventhandler(self, event, menuw=None): """eventhandler""" logger.log(9, 'eventhandler(event=%s, menuw=%r)', event, menuw) if event == 'MENU_BACK_ONE_MENU': rc.remove_app(self) self.menuw.show() return True elif event == 'MENU_SELECT': self.weather.getForecast(force=1) skin.clear() skin.draw('oneclick', self, transition=skin.TRANSITION_IN) return True elif event in ('MENU_DOWN', 'MENU_RIGHT'): self.nextSkin() skin.draw('oneclick', self, transition=skin.TRANSITION_PAGE) return True elif event in ('MENU_UP', 'MENU_LEFT'): self.prevSkin() skin.draw('oneclick', self, transition=skin.TRANSITION_PAGE) return True return False
def eventhandler(self, event, menuw=None): """eventhandler""" logger.log( 9, 'eventhandler(event=%s, menuw=%r)', event, menuw) if event == 'MENU_BACK_ONE_MENU': rc.remove_app(self) self.menuw.show() return True elif event == 'MENU_SELECT': self.weather.getForecast(force=1) skin.clear() skin.draw('oneclick', self, transition=skin.TRANSITION_IN) return True elif event in ('MENU_DOWN', 'MENU_RIGHT'): self.nextSkin() skin.draw('oneclick', self, transition=skin.TRANSITION_PAGE) return True elif event in ('MENU_UP', 'MENU_LEFT'): self.prevSkin() skin.draw('oneclick', self, transition=skin.TRANSITION_PAGE) return True return False
def montage(self, arg=None, menuw=None): skin.clear() monitors = self.zm.list_monitor() l = len(monitors) w = int(sqrt(l)) if w != sqrt(l): w = w + 1 mon_w = osd.width / w if ((w*w) - l) >= w : mon_h = osd.height / (w - 1) else: mon_h = osd.height / w x = 0 y = 0 threads = [] for (id, name, width, height) in monitors: t = threading.Thread(target=self.live_montage, args=(id, x, y, mon_w, mon_h)) t.start() threads.append(t) x += mon_w if (x + (osd.width % w)) == osd.width: y += mon_h x = (x % osd.width) for t in threads: t.join() skin.redraw()
def montage(self, arg=None, menuw=None): skin.clear() monitors = self.zm.list_monitor() l = len(monitors) w = int(sqrt(l)) if w != sqrt(l): w = w + 1 mon_w = osd.width / w if ((w * w) - l) >= w: mon_h = osd.height / (w - 1) else: mon_h = osd.height / w x = 0 y = 0 threads = [] for (id, name, width, height) in monitors: t = threading.Thread(target=self.live_montage, args=(id, x, y, mon_w, mon_h)) t.start() threads.append(t) x += mon_w if (x + (osd.width % w)) == osd.width: y += mon_h x = x % osd.width for t in threads: t.join() skin.redraw()
def fullscreen(self): if self.player.playerGUI.visible: self.player.playerGUI.hide() self.visual.set_fullscreen() self.visual.set_message(self.item_info()) skin.clear() rc.app(self)
def fullscreen(self): _debug_('fullscreen()', 2) if self.player.playerGUI.visible: self.player.playerGUI.hide() self.visual.set_fullscreen() self.visual.set_info(self.item_info(), 10) skin.clear() rc.app(self)
def start_saver(self): _debug_("start screensaver") self.screensaver_showing = True if self.plugins is None: self.plugins = plugin.get('screensaver') print 'Plugins =', self.plugins skin.clear() # Start Screensaver thread self.stop_screensaver = False thread.start_new_thread(self.__run__, ())
def start_saver(self): _debug_('start_saver()', 2) self.screensaver_showing = True if self.plugins is None: self.plugins = plugin.get('screensaver') _debug_('plugins=%r' % (self.plugins)) skin.clear() # Start Screensaver thread self.stop_screensaver = False self.thread = threading.Thread(target=self.__run__) self.thread.start()
def resume_visual(self): logger.debug('%s.resume_visual() self.view=%r self.succession=%r', self.__class__, self.view, self.player.playerGUI.succession) self.timer.stop() if self.mpvgoom is not None: self.title = None self.message = self.item_info(self.message_fmt) if self.view == MpvMode.FULL: skin.clear() else: self.start_visual()
def fullscreen(self): logger.debug('fullscreen()') self.mpvgoom.mode = MpvMode.FULL if self.player.playerGUI.visible: self.player.playerGUI.hide() osd.active = False self.mpvgoom.set_fullscreen() skin.clear() skin.suspend() rc.app(self)
def start_saver(self): logger.log( 9, 'start_saver()') if self.screensaver_showing or not skin.active(): return self.screensaver_showing = True if self.plugins is None: self.plugins = plugin.get('screensaver') logger.debug('plugins=%r', self.plugins) osd.screensaver_running = True skin.clear() self.current_saver = None self.index = 0 plugins_count = len(self.plugins) logger.debug('found %s screensaver(s)', plugins_count) if config.SCREENSAVER_SCREEN_OFF_DELAY: logger.debug('Enabling DPMS timer') self.dpms_timer.start(config.SCREENSAVER_SCREEN_OFF_DELAY) self.__next()
def hide(self, clear=True): if self.visible: self.visible = 0 if clear: skin.clear(osd_update=clear)
def hide(self): if self.visible: self.visible = 0 skin.clear() rc.app(None)
def hide(self): logger.debug("hide()") if self.visible: self.visible = False skin.clear() rc.remove_app(self.player)
def event(self, arg=None, menuw=None): skin.clear() ev = ZoneMinderEvent(arg) ev.start_stream() ev.stop_display = False ev.display()
def hide(self): logger.debug('hide()') if self.visible: self.visible = False skin.clear() rc.remove_app(self.player)
def hide(self): """ hide the guide""" if self.visible: self.visible = 0 skin.clear()
def live(self, arg=None, menuw=None): skin.clear() mon = ZoneMinderMonitor(arg) mon.start_stream() mon.stop_display = False mon.display()
def hide(self): """ hide the guide""" logger.log( 9, 'hide') if self.visible: self.visible = 0 skin.clear()
def hide(self): """ hide the guide""" _debug_('hide', 2) if self.visible: self.visible = 0 skin.clear()
def hide(self): """ hide the guide""" logger.log(9, 'hide') if self.visible: self.visible = 0 skin.clear()