From bf452e7f6a3fa0e41964fc8e2c57e1e577cd1682 Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 20 Jun 2004 23:51:59 +0000 Subject: Put some modifications in the overall. Font to texture doesn't work though. --- include/engine.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include/engine.h') diff --git a/include/engine.h b/include/engine.h index 8634f6a..6a88154 100644 --- a/include/engine.h +++ b/include/engine.h @@ -13,9 +13,24 @@ namespace mogltk { public: class keyevent : public Base { public: + keyevent(); + virtual ~keyevent(); virtual void down(SDL_keysym); virtual void up(SDL_keysym); + protected: + void passdown(SDL_keysym); + keyevent * old_handler, * new_handler; }; + class mouseevent : public Base { + public: + mouseevent(); + virtual ~mouseevent(); + virtual void move(SDL_MouseMotionEvent); + virtual void action(SDL_MouseButtonEvent); + protected: + void passdown(SDL_MouseMotionEvent); + mouseevent * old_handler, * new_handler; + }; static int setup() throw(GeneralException); static int postsetup() throw(GeneralException); static int GetInited(); @@ -25,15 +40,22 @@ namespace mogltk { static bool getappactive(); static void setcursorvisible(bool); static bool getcursorvisible(); + static void quit(); static bool quitrequested(); static int mouseX(); static int mouseY(); static int mouseZ(); + static void setmouseX(int); + static void setmouseY(int); + static void setmouseZ(int); static int mousebuttons(); static double FPS(); static void lockmouse(); static void unlockmouse(); static void setkeyevent(keyevent *); + static void setmouseevent(mouseevent *); + static keyevent * getkeyevent(); + static mouseevent * getmouseevent(); static glbase * glbase_o; static base * base_o; static widget * root; @@ -52,6 +74,7 @@ namespace mogltk { static Uint32 curticks; static int locked; static keyevent * keyevent_h; + static mouseevent * mouseevent_h; static void updatemouse(); }; }; -- cgit v1.2.3