author | Radek Brich <radek.brich@devl.cz> |
Sun, 06 Jan 2013 23:03:24 +0100 | |
changeset 54 | 86b84535726e |
parent 53 | c4263588b716 |
child 55 | 1ab0edd5d784 |
permissions | -rw-r--r-- |
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
1 |
# distutils: language = c++ |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
2 |
# distutils: sources = src/sdlterm.cc |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
3 |
# distutils: include_dirs = /usr/include/SDL src |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
4 |
# distutils: libraries = SDL SDL_ttf |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
5 |
# distutils: define_macros = _GNU_SOURCE=1 _REENTRANT |
49
1611c462c3e3
Update sdlterm: Optimize commit() - use two cell buffers, redraw only dirty cells, not everything. Fix keypress event, filter mousemove.
Radek Brich <radek.brich@devl.cz>
parents:
48
diff
changeset
|
6 |
# distutils: extra_compile_args = --std=c++11 |
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
7 |
# cython: language_level=3 |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
8 |
|
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
9 |
from libcpp cimport bool |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
10 |
|
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
11 |
|
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
12 |
cdef extern from "sdlterm.h": |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
13 |
cdef struct Event_key: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
14 |
char *keyname |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
15 |
Py_UNICODE unicode |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
16 |
|
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
17 |
cdef struct Event_mouse: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
18 |
int x, y |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
19 |
int button |
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
20 |
|
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
21 |
cdef struct Event: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
22 |
# enum |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
23 |
int QUIT |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
24 |
int RESIZE |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
25 |
int KEYPRESS |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
26 |
int MOUSEDOWN |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
27 |
int MOUSEUP |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
28 |
int MOUSEMOVE |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
29 |
int MOUSEWHEEL |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
30 |
|
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
31 |
int type |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
32 |
Event_key key |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
33 |
Event_mouse mouse |
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
34 |
|
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
35 |
cdef cppclass Terminal: |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
36 |
Terminal() except + |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
37 |
|
49
1611c462c3e3
Update sdlterm: Optimize commit() - use two cell buffers, redraw only dirty cells, not everything. Fix keypress event, filter mousemove.
Radek Brich <radek.brich@devl.cz>
parents:
48
diff
changeset
|
38 |
void select_font(char *fname_regular, char *fname_bold, int ptsize) except + |
1611c462c3e3
Update sdlterm: Optimize commit() - use two cell buffers, redraw only dirty cells, not everything. Fix keypress event, filter mousemove.
Radek Brich <radek.brich@devl.cz>
parents:
48
diff
changeset
|
39 |
void resize(int pxwidth, int pxheight) except + |
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
40 |
|
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
41 |
void erase() |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
42 |
void putch(int x, int y, Py_UNICODE ch) |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
43 |
void commit() |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
44 |
|
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
45 |
int prepare_attr(int fg, int bg, int style) |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
46 |
void set_attr(int value) |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
47 |
|
53
c4263588b716
DriverSDL: Implement cursor, handle window resize.
Radek Brich <radek.brich@devl.cz>
parents:
50
diff
changeset
|
48 |
void show_cursor(int x, int y) |
c4263588b716
DriverSDL: Implement cursor, handle window resize.
Radek Brich <radek.brich@devl.cz>
parents:
50
diff
changeset
|
49 |
void hide_cursor() |
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
50 |
|
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
51 |
void get_next_event(Event event) |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
52 |
|
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
53 |
int get_width() |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
54 |
int get_height() |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
55 |
|
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
56 |
|
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
57 |
cdef class SDLTerminal: |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
58 |
cdef Terminal *thisptr # hold a C++ instance which we're wrapping |
49
1611c462c3e3
Update sdlterm: Optimize commit() - use two cell buffers, redraw only dirty cells, not everything. Fix keypress event, filter mousemove.
Radek Brich <radek.brich@devl.cz>
parents:
48
diff
changeset
|
59 |
cdef Event event |
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
60 |
|
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
61 |
def __cinit__(self): |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
62 |
self.thisptr = new Terminal() |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
63 |
def __dealloc__(self): |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
64 |
del self.thisptr |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
65 |
|
54
86b84535726e
DriverSDL: system font lookup.
Radek Brich <radek.brich@devl.cz>
parents:
53
diff
changeset
|
66 |
def select_font(self, bytes fname_regular, bytes fname_bold, int ptsize): |
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
67 |
self.thisptr.select_font(fname_regular, fname_bold, ptsize) |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
68 |
def resize(self, width, height): |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
69 |
self.thisptr.resize(width, height) |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
70 |
|
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
71 |
def erase(self): |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
72 |
self.thisptr.erase() |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
73 |
def putch(self, x, y, ch): |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
74 |
self.thisptr.putch(x, y, ch) |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
75 |
def commit(self): |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
76 |
self.thisptr.commit() |
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
77 |
|
50
c5b8b9d2da95
DriverSDL: Implement colors.
Radek Brich <radek.brich@devl.cz>
parents:
49
diff
changeset
|
78 |
def prepare_attr(self, fg, bg, style): |
c5b8b9d2da95
DriverSDL: Implement colors.
Radek Brich <radek.brich@devl.cz>
parents:
49
diff
changeset
|
79 |
return self.thisptr.prepare_attr(fg, bg, style) |
c5b8b9d2da95
DriverSDL: Implement colors.
Radek Brich <radek.brich@devl.cz>
parents:
49
diff
changeset
|
80 |
def set_attr(self, value): |
c5b8b9d2da95
DriverSDL: Implement colors.
Radek Brich <radek.brich@devl.cz>
parents:
49
diff
changeset
|
81 |
self.thisptr.set_attr(value) |
c5b8b9d2da95
DriverSDL: Implement colors.
Radek Brich <radek.brich@devl.cz>
parents:
49
diff
changeset
|
82 |
|
53
c4263588b716
DriverSDL: Implement cursor, handle window resize.
Radek Brich <radek.brich@devl.cz>
parents:
50
diff
changeset
|
83 |
def show_cursor(self, x, y): |
c4263588b716
DriverSDL: Implement cursor, handle window resize.
Radek Brich <radek.brich@devl.cz>
parents:
50
diff
changeset
|
84 |
self.thisptr.show_cursor(x, y) |
c4263588b716
DriverSDL: Implement cursor, handle window resize.
Radek Brich <radek.brich@devl.cz>
parents:
50
diff
changeset
|
85 |
def hide_cursor(self): |
c4263588b716
DriverSDL: Implement cursor, handle window resize.
Radek Brich <radek.brich@devl.cz>
parents:
50
diff
changeset
|
86 |
self.thisptr.hide_cursor() |
c4263588b716
DriverSDL: Implement cursor, handle window resize.
Radek Brich <radek.brich@devl.cz>
parents:
50
diff
changeset
|
87 |
|
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
88 |
def get_next_event(self): |
49
1611c462c3e3
Update sdlterm: Optimize commit() - use two cell buffers, redraw only dirty cells, not everything. Fix keypress event, filter mousemove.
Radek Brich <radek.brich@devl.cz>
parents:
48
diff
changeset
|
89 |
self.thisptr.get_next_event(self.event) |
1611c462c3e3
Update sdlterm: Optimize commit() - use two cell buffers, redraw only dirty cells, not everything. Fix keypress event, filter mousemove.
Radek Brich <radek.brich@devl.cz>
parents:
48
diff
changeset
|
90 |
event = self.event |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
91 |
if event.type == event.MOUSEMOVE: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
92 |
return ('mousemove', event.mouse.x, event.mouse.y) |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
93 |
if event.type == event.MOUSEDOWN: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
94 |
return ('mousedown', event.mouse.x, event.mouse.y, event.mouse.button) |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
95 |
if event.type == event.MOUSEUP: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
96 |
return ('mouseup', event.mouse.x, event.mouse.y, event.mouse.button) |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
97 |
if event.type == event.KEYPRESS: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
98 |
keyname = event.key.keyname |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
99 |
if keyname: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
100 |
keyname = keyname.decode() |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
101 |
else: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
102 |
keyname = None |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
103 |
char = event.key.unicode |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
104 |
if char == '\x00': |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
105 |
char = None |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
106 |
return ('keypress', keyname, char) |
53
c4263588b716
DriverSDL: Implement cursor, handle window resize.
Radek Brich <radek.brich@devl.cz>
parents:
50
diff
changeset
|
107 |
if event.type == event.RESIZE: |
c4263588b716
DriverSDL: Implement cursor, handle window resize.
Radek Brich <radek.brich@devl.cz>
parents:
50
diff
changeset
|
108 |
return ('resize',) |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
109 |
if event.type == event.QUIT: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
110 |
return ('quit',) |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
111 |
return ('unknown',) |
47
537d7c6b48a2
Add sdlterm prototype: extension module for SDL driver.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
112 |
|
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
113 |
property width: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
114 |
def __get__(self): return self.thisptr.get_width() |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
115 |
property height: |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
116 |
def __get__(self): return self.thisptr.get_height() |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
47
diff
changeset
|
117 |