|
|
|
@ -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:
|
|
|
|
|