def set_handler(self, name, handler):
        if name not in self._event_stack[0]:
            self._event_stack[0][name] = RuleSet()
        ruleset = self._event_stack[0][name]
        if not hasattr(handler, 'selector'):
            handler.selector = universal_selector
        ruleset.add_rule(handler)
Inspect handler for a selector and apply to the primary-set.
dataset/ETHPy150Open ardekantur/pyglet/contrib/layout/layout/gl/event.py/LayoutEventDispatcher.set_handler