Пример #1
0
 def run(self):
     mouse_detector = MouseDetector.get_instance()
     mouse_detector.start()
     try:
         self.mainloop.run()
     finally:
         mouse_detector.terminate()
Пример #2
0
    def __init__(self, config, abbr_expander):
        super(Engine, self).__init__()
        logging.info("You are running ibus-bogo")

        self.config = config
        self.input_context_capabilities = 0
        self.setup_tool_buttons()

        self.abbr_expander = abbr_expander

        self.reset_engine()

        # Create a new thread to detect mouse clicks
        mouse_detector = MouseDetector.get_instance()
        mouse_detector.add_mouse_click_listener(self.reset_engine)