83 def show_cursor(self, x, y): |
83 def show_cursor(self, x, y): |
84 self.thisptr.show_cursor(x, y) |
84 self.thisptr.show_cursor(x, y) |
85 def hide_cursor(self): |
85 def hide_cursor(self): |
86 self.thisptr.hide_cursor() |
86 self.thisptr.hide_cursor() |
87 |
87 |
88 def get_next_event(self): |
88 def wait_event(self, timeout): |
89 self.thisptr.get_next_event(self.event) |
89 if not self.thisptr.wait_event(self.event, timeout or 0): |
|
90 # timeout |
|
91 return None |
90 event = self.event |
92 event = self.event |
91 if event.type == event.MOUSEMOVE: |
93 if event.type == event.MOUSEMOVE: |
92 return ('mousemove', event.mouse.x, event.mouse.y) |
94 return ('mousemove', event.mouse.x, event.mouse.y) |
93 if event.type == event.MOUSEDOWN: |
95 if event.type == event.MOUSEDOWN: |
94 return ('mousedown', event.mouse.x, event.mouse.y, event.mouse.button) |
96 return ('mousedown', event.mouse.x, event.mouse.y, event.mouse.button) |