當前位置: 首頁>>代碼示例>>Python>>正文


Python Stage.queue_refresh_stage方法代碼示例

本文整理匯總了Python中stage.Stage.queue_refresh_stage方法的典型用法代碼示例。如果您正苦於以下問題:Python Stage.queue_refresh_stage方法的具體用法?Python Stage.queue_refresh_stage怎麽用?Python Stage.queue_refresh_stage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在stage.Stage的用法示例。


在下文中一共展示了Stage.queue_refresh_stage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: ScreensaverManager

# 需要導入模塊: from stage import Stage [as 別名]
# 或者: from stage.Stage import queue_refresh_stage [as 別名]

#.........這裏部分代碼省略.........
            self.emit("active-changed", False)

        self.cancel_timers()

        self.stage.destroy_stage()
        self.stage = None

        # Ideal time to check for leaking connections that might prevent GC by python and gobject
        if trackers.DEBUG_SIGNALS:
            trackers.con_tracker_get().dump_connections_list()

        if trackers.DEBUG_TIMERS:
            trackers.timer_tracker_get().dump_timer_list()

    def grab_stage(self):
        """
        Makes a hard grab on the Stage window, all keyboard and mouse events are dispatched or eaten
        by us now.
        """
        self.grab_helper.move_to_window(self.stage.get_window(), True)

    def update_stage(self):
        """
        Tells the stage to check its canvas size and make sure its windows are up-to-date.  This is called
        when our login manager tells us its "Active" property has changed.  We are always connected to the
        login manager, so we first check if we have a stage.
        """
        if self.stage == None:
            return

        if status.Debug:
            print("manager: queuing stage refresh (login manager reported active?")

        self.stage.queue_refresh_stage()

    def start_timers(self):
        """
        Stamps our current time starts our lock delay timer (the elapsed time to allow after
        activation, to lock the computer.)
        """
        self.activated_timestamp = time.time()
        self.start_lock_delay()

    def cancel_timers(self):
        """
        Zeros out our activated timestamp and cancels our lock delay timer.
        """
        self.activated_timestamp = 0
        self.stop_lock_delay()

    def cancel_unlock_widget(self):
        """
        Return to sleep (not Awake) - hides the pointer and the unlock widget.
        """
        self.grab_stage()
        self.stage.cancel_unlocking();

    def on_lock_delay_timeout(self):
        """
        Updates the lock status when our timer has hit its limit
        """
        if status.Debug:
            print("manager: locking after delay ('lock-delay')")

        status.Locked = True
開發者ID:icarter09,項目名稱:cinnamon-screensaver,代碼行數:69,代碼來源:manager.py


注:本文中的stage.Stage.queue_refresh_stage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。