sdlterm/cython/sdlterm.pyx
changeset 73 85a282b5e4fc
parent 71 cfd3445107b4
equal deleted inserted replaced
72:6e0656600754 73:85a282b5e4fc
    26         int RESIZE
    26         int RESIZE
    27         int KEYPRESS
    27         int KEYPRESS
    28         int MOUSEDOWN
    28         int MOUSEDOWN
    29         int MOUSEUP
    29         int MOUSEUP
    30         int MOUSEMOVE
    30         int MOUSEMOVE
       
    31         int MOUSEHOVER
    31         int MOUSEWHEEL
    32         int MOUSEWHEEL
    32 
    33 
    33         int type
    34         int type
    34         Event_key key
    35         Event_key key
    35         Event_mouse mouse
    36         Event_mouse mouse
    90     def wait_event(self, timeout=None):
    91     def wait_event(self, timeout=None):
    91         if not self.thisptr.wait_event(self.event, timeout or 0):
    92         if not self.thisptr.wait_event(self.event, timeout or 0):
    92             # timeout
    93             # timeout
    93             return None
    94             return None
    94         event = self.event
    95         event = self.event
       
    96         if event.type == event.MOUSEHOVER:
       
    97             return ('mousehover', 0, event.mouse.x, event.mouse.y)
    95         if event.type == event.MOUSEMOVE:
    98         if event.type == event.MOUSEMOVE:
    96             return ('mousemove', 0, event.mouse.x, event.mouse.y, event.mouse.relx, event.mouse.rely)
    99             return ('mousemove', 0, event.mouse.x, event.mouse.y, event.mouse.relx, event.mouse.rely)
    97         if event.type == event.MOUSEDOWN:
   100         if event.type == event.MOUSEDOWN:
    98             return ('mousedown', event.mouse.button, event.mouse.x, event.mouse.y)
   101             return ('mousedown', event.mouse.button, event.mouse.x, event.mouse.y)
    99         if event.type == event.MOUSEUP:
   102         if event.type == event.MOUSEUP: