def pointer_event(self, e, event) : e.set_x(event.m_x) e.set_y(event.m_y) mask = e.get_modifiers() mask = self.get_sr_py_modifier_mask(event, mask) e.set_modifiers(mask) state = e.get_pointer_state() state, n = self.get_sr_py_pointer_modifier_mask(event, state) e.set_pointer_state(state) sr_py.add_pointer_event(e)
def pointer_event(self, e, event): e.set_x(event.x()) e.set_y(event.y()) mask = e.get_modifiers() mask = self.get_sr_py_modifier_mask(event, mask) e.set_modifiers(mask) state = e.get_pointer_state() state, n = self.get_sr_py_pointer_modifier_mask(event, state) e.set_pointer_state(state) sr_py.add_pointer_event(e, self._id)
def on_eventbox_button_release_event(self, window_widget, event) : e = sr_py.PointerEvent() e.set_time(long(event.time)) e.set_pointer_state(sr_py.PointerEvent.BUTTON_RELEASE_E) e.set_x(int(event.x)) e.set_y(int(event.y)) # translate gdk modifiers to sci modifiers mask = e.get_modifiers() e.set_modifiers(get_sr_py_modifier_mask(event, mask)) state = e.get_pointer_state() e.set_pointer_state(get_sr_py_pointer_modifier_mask(event.button, state)) sr_py.add_pointer_event(e) return True
def on_eventbox_motion_notify_event(self, window_widget, event) : e = sr_py.PointerEvent() e.set_time(long(event.time)) e.set_pointer_state(sr_py.PointerEvent.MOTION_E) e.set_x(int(event.x)) e.set_y(int(event.y)) #e.set_which(event.button) # translate gdk modifiers to sci modifiers mask = e.get_modifiers() e.set_modifiers(get_sr_py_modifier_mask(event, mask)) n = get_sr_py_button_num(event) state = e.get_pointer_state() e.set_pointer_state(get_sr_py_pointer_modifier_mask(n, state)) sr_py.add_pointer_event(e) return True