aboutsummaryrefslogtreecommitdiffstats
path: root/vt100.py
diff options
context:
space:
mode:
Diffstat (limited to 'vt100.py')
-rw-r--r--vt100.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/vt100.py b/vt100.py
index b6ec1a9..97c345d 100644
--- a/vt100.py
+++ b/vt100.py
@@ -50,12 +50,9 @@ class vt100_cell(Structure):
def contents(self):
return self._contents[:self.len].decode('utf-8')
-new_prototype = CFUNCTYPE(c_void_p)
+new_prototype = CFUNCTYPE(c_void_p, c_int, c_int)
vt100_new = new_prototype(("vt100_screen_new", libvt100))
-set_window_size_prototype = CFUNCTYPE(None, c_void_p)
-vt100_set_window_size = set_window_size_prototype(("vt100_screen_set_window_size", libvt100))
-
process_string_prototype = CFUNCTYPE(c_int, c_void_p, c_char_p, c_size_t)
vt100_process_string = process_string_prototype(("vt100_screen_process_string", libvt100))
@@ -66,9 +63,8 @@ delete_prototype = CFUNCTYPE(None, c_void_p)
vt100_delete = delete_prototype(("vt100_screen_delete", libvt100))
class vt100(object):
- def __init__(self):
- self.vt = vt100_new()
- vt100_set_window_size(self.vt)
+ def __init__(self, rows, cols):
+ self.vt = vt100_new(rows, cols)
def __del__(self):
vt100_delete(self.vt)