dfhack/dfhack/include/modules/Position.h

51 lines
1.1 KiB
C++

#ifndef CL_MOD_POSITION
#define CL_MOD_POSITION
/*
* View position and size and cursor position
*/
#include "Export.h"
namespace DFHack
{
#define NUM_HOTKEYS 16
struct t_hotkey
{
char name[10];
int16_t mode;
int32_t x;
int32_t y;
int32_t z;
};
class APIPrivate;
class DFHACK_EXPORT Position
{
public:
Position(APIPrivate * d);
~Position();
/*
* Cursor and window coords
*/
bool getViewCoords (int32_t &x, int32_t &y, int32_t &z);
bool setViewCoords (const int32_t x, const int32_t y, const int32_t z);
bool getCursorCoords (int32_t &x, int32_t &y, int32_t &z);
bool setCursorCoords (const int32_t x, const int32_t y, const int32_t z);
/*
* Hotkeys (DF's zoom locations)
*/
bool ReadHotkeys(t_hotkey hotkeys[]);
/*
* Window size in tiles
*/
bool getWindowSize(int32_t & width, int32_t & height);
private:
struct Private;
Private *d;
};
}
#endif