Skip to content

Commit b122706

Browse files
committed
Clean up termbox API headers
1 parent 9b0c969 commit b122706

File tree

1 file changed

+3
-38
lines changed

1 file changed

+3
-38
lines changed

examples/termbox/termbox.py

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,15 @@
1-
"""Termbox library python binding.
2-
3-
This is a binding module for termbox library.
41
"""
2+
Implementation of Termbox Python API in tdl.
53
6-
include "termboxconfig.pyx"
7-
8-
## No unichr in python3, use chr instead.
9-
if PY_MAJOR_VERSION == 3:
10-
unichr = chr
11-
12-
cdef extern from "stdint.h":
13-
ctypedef unsigned int uint32_t
14-
ctypedef unsigned short uint16_t
15-
ctypedef signed int int32_t
16-
17-
cdef extern from "../termbox.h":
18-
struct tb_event:
19-
uint16_t type
20-
uint32_t ch
21-
uint16_t key
22-
uint16_t mod
23-
int32_t w
24-
int32_t h
25-
int32_t x
26-
int32_t y
27-
int tb_init()
28-
void tb_shutdown()
29-
void tb_present()
30-
void tb_clear()
31-
void tb_change_cell(int x, int y, uint32_t ch, uint16_t fg, uint16_t bg)
32-
int tb_width()
33-
int tb_height()
34-
void tb_set_cursor(int x, int y)
35-
int tb_select_input_mode(int mode)
36-
int tb_select_output_mode(int mode)
37-
int tb_peek_event(tb_event *event, int timeout) nogil
38-
int tb_poll_event(tb_event *event) nogil
4+
See README.md for details.
5+
"""
396

407
class TermboxException(Exception):
418
def __init__(self, msg):
429
self.msg = msg
4310
def __str__(self):
4411
return self.msg
4512

46-
import threading
47-
4813
__instance = None
4914

5015
# keys ----------------------------------

0 commit comments

Comments
 (0)