@classmethod
    def set_default_handler(cls, name, selector, handler):
        '''Inspect handler for a selector and apply to the primary-set.
        If the handler has no selector, it is assumed to have a universal
        selector.
        '''
        if name not in cls.default_event_handlers:
            cls.default_event_handlers[name] = RuleSet()
        ruleset = cls.default_event_handlers[name]
        ruleset.add_rule(Rule(selector, handler))
dataset/ETHPy150Open ardekantur/pyglet/contrib/wydget/wydget/event.py/GUIEventDispatcher.set_default_handler/original