@@ -165,7 +165,7 @@ def present(self):
165165 tb_present ()
166166 pass
167167
168- def change_cell (self , int x , int y , int ch , uint16_t fg , uint16_t bg ):
168+ def change_cell (self , x , y , ch , fg , bg ):
169169 """Change cell in position (x;y).
170170 """
171171 tb_change_cell (x , y , ch , fg , bg )
@@ -185,7 +185,7 @@ def clear(self):
185185 """
186186 tb_clear ()
187187
188- def set_cursor (self , int x , int y ):
188+ def set_cursor (self , x , y ):
189189 """Set cursor position to (x;y).
190190
191191 Set both arguments to HIDE_CURSOR or use 'hide_cursor' function to hide it.
@@ -197,28 +197,28 @@ def hide_cursor(self):
197197 """
198198 tb_set_cursor (- 1 , - 1 )
199199
200- def select_input_mode (self , int mode ):
200+ def select_input_mode (self , mode ):
201201 """Select preferred input mode: INPUT_ESC or INPUT_ALT.
202202
203203 INPUT_CURRENT returns the selected mode without changing anything.
204204 """
205205 return int (tb_select_input_mode (mode ))
206206
207- def select_output_mode (self , int mode ):
207+ def select_output_mode (self , mode ):
208208 """Select preferred output mode: one of OUTPUT_* constants.
209209
210210 OUTPUT_CURRENT returns the selected mode without changing anything.
211211 """
212212 return int (tb_select_output_mode (mode ))
213213
214- def peek_event (self , int timeout = 0 ):
214+ def peek_event (self , timeout = 0 ):
215215 """Wait for an event up to 'timeout' milliseconds and return it.
216216
217217 Returns None if there was no event and timeout is expired.
218218 Returns a tuple otherwise: (type, unicode character, key, mod, width, height, mousex, mousey).
219219 """
220+ """
220221 cdef tb_event e
221- cdef int result
222222 with self._poll_lock:
223223 with nogil:
224224 result = tb_peek_event(&e, timeout)
@@ -229,15 +229,16 @@ def peek_event(self, int timeout=0):
229229 uch = unichr(e.ch)
230230 else:
231231 uch = None
232+ """
232233 return (e .type , uch , e .key , e .mod , e .w , e .h , e .x , e .y )
233234
234235 def poll_event (self ):
235236 """Wait for an event and return it.
236237
237238 Returns a tuple: (type, unicode character, key, mod, width, height, mousex, mousey).
238239 """
240+ """
239241 cdef tb_event e
240- cdef int result
241242 with self._poll_lock:
242243 with nogil:
243244 result = tb_poll_event(&e)
@@ -246,4 +247,5 @@ def poll_event(self):
246247 uch = unichr(e.ch)
247248 else:
248249 uch = None
250+ """
249251 return (e .type , uch , e .key , e .mod , e .w , e .h , e .x , e .y )
0 commit comments