sdlterm/cython/sdlterm.pyx
changeset 69 4e7be77bafff
parent 67 71f60bf6ebb7
child 71 cfd3445107b4
equal deleted inserted replaced
68:bc51b0220be2 69:4e7be77bafff
     1 # distutils: language = c++
     1 # distutils: language = c++
     2 # distutils: sources = src/sdlterm.cc
     2 # distutils: sources = sdlterm/src/sdlterm.cc
     3 # distutils: include_dirs = /usr/include/SDL src
     3 # distutils: include_dirs = /usr/include/SDL sdlterm/src
     4 # distutils: libraries = SDL SDL_ttf
     4 # distutils: libraries = SDL SDL_ttf
     5 # distutils: define_macros = _GNU_SOURCE=1 _REENTRANT
     5 # distutils: define_macros = _GNU_SOURCE=1 _REENTRANT
     6 # distutils: extra_compile_args = --std=c++11
     6 # distutils: extra_compile_args = --std=c++11
     7 # cython: language_level=3
     7 # cython: language_level=3
     8 
     8 
    84     def show_cursor(self, x, y):
    84     def show_cursor(self, x, y):
    85         self.thisptr.show_cursor(x, y)
    85         self.thisptr.show_cursor(x, y)
    86     def hide_cursor(self):
    86     def hide_cursor(self):
    87         self.thisptr.hide_cursor()
    87         self.thisptr.hide_cursor()
    88 
    88 
    89     def wait_event(self, timeout):
    89     def wait_event(self, timeout=None):
    90         if not self.thisptr.wait_event(self.event, timeout or 0):
    90         if not self.thisptr.wait_event(self.event, timeout or 0):
    91             # timeout
    91             # timeout
    92             return None
    92             return None
    93         event = self.event
    93         event = self.event
    94         if event.type == event.MOUSEMOVE:
    94         if event.type == event.MOUSEMOVE: