Пример #1
0
    def __init__(self, synchronous_check=False):
        """
            __init__ just initializes the application with some placeholder
            members. The real initialization is done in `App.init`.
        """
        SXObject.__init__(self)

        self.conn = None
        self.cursors = None
        self.synchronous_check = synchronous_check

        self.running = False

        # filehandles used when select'ing 
        self.fds = {'read': {}, 'write': {}, 'error': {}}
        # timeout used when select'ing
        self.select_timeout = None

        # timer callbacks
        self.timers = []

        # a list of functions that should be called in the next
        # iteration of the mainloop. That's not nice and should
        # be removed. Currently, it's used to make the Python gc
        # collect client objects.
        self.functions_to_call = []
Пример #2
0
    def __init__(self, plugin, screen, name, idx, config):
        SXObject.__init__(self)

        self.plugin = plugin
        self.screen = screen
        self.name = name
        self.clients = FocusStack(self.screen.conn) # maybe weak references are a good idea.
        self.idx = idx
        self.config = config