added read_hotkeys

develop
doomchild 2011-03-15 15:35:00 -05:00
parent 6b467a36b5
commit 2c28d8f3bf
1 changed files with 6 additions and 0 deletions

@ -1,5 +1,8 @@
from ctypes import *
from dftypes import libdfhack
from util import check_pointer_cache
libdfhack.Position_ReadHotkeys.restype = c_void_p
class Position(object):
def __init__(self, ptr):
@ -35,6 +38,9 @@ class Position(object):
cursor_coords = property(get_cursor_coords, set_cursor_coords)
def read_hotkeys(self):
return check_pointer_cache(libdfhack.Position_ReadHotkeys(self._pos_ptr))
@property
def window_size(self):
if libdfhack.Position_getWindowSize(self._pos_ptr, byref(self._ww), byref(self._wh)) > 0: