diff options
author | pixel <pixel> | 2004-11-27 21:44:50 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-11-27 21:44:50 +0000 |
commit | 1ae229afb9bff4a3636c08632032b509e1e80ec4 (patch) | |
tree | 9a78b288fcff587617d5174d8e74b7bdd6d41aa3 /include/engine.h | |
parent | 70b1a3c1c6b7f33b3af777bedaa784e34ef81719 (diff) |
Large dos2unix commit...
Diffstat (limited to 'include/engine.h')
-rw-r--r-- | include/engine.h | 202 |
1 files changed, 101 insertions, 101 deletions
diff --git a/include/engine.h b/include/engine.h index 9d12e95..95b12f7 100644 --- a/include/engine.h +++ b/include/engine.h @@ -1,101 +1,101 @@ -/* - * mogltk - * Copyright (C) 1999-2004 Nicolas "Pixel" Noble - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* $Id: engine.h,v 1.18 2004-07-15 14:21:30 pixel Exp $ */ - -#ifndef __ENGINE_H__ -#define __ENGINE_H__ - -#include <SDL.h> -#include <Handle.h> -#include <Exceptions.h> -#include <base.h> -#include <glbase.h> -#include <widgets.h> - -namespace mogltk { - class engine : public Base { - public: - class keyevent : public Base { - public: - keyevent(); - virtual ~keyevent(); - virtual void down(SDL_keysym) = 0; - virtual void up(SDL_keysym) = 0; - protected: - keyevent * old_handler, * new_handler; - }; - class mouseevent : public Base { - public: - mouseevent(); - virtual ~mouseevent(); - virtual void move(SDL_MouseMotionEvent) = 0; - virtual void action(SDL_MouseButtonEvent) = 0; - protected: - mouseevent * old_handler, * new_handler; - }; - static int setup() throw(GeneralException); - static int postsetup() throw(GeneralException); - static int GetInited(); - static SDL_RWops * RWFromHandle(Handle *) throw (GeneralException); - static void pollevents() throw (GeneralException); - static void setappactive(bool); - 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; - private: - static bool inited; - static bool postsetuped; - static bool appactive; - static bool cursorvisible; - static bool quitrequest; - static int mx; - static int my; - static int mz; - static int mbuttons; - static int frames; - static double curfps; - static Uint32 curticks; - static int locked; - static keyevent * keyevent_h; - static mouseevent * mouseevent_h; - static void updatemouse(); - }; -}; - -#endif +/*
+ * mogltk
+ * Copyright (C) 1999-2004 Nicolas "Pixel" Noble
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* $Id: engine.h,v 1.19 2004-11-27 21:44:50 pixel Exp $ */
+
+#ifndef __ENGINE_H__
+#define __ENGINE_H__
+
+#include <SDL.h>
+#include <Handle.h>
+#include <Exceptions.h>
+#include <base.h>
+#include <glbase.h>
+#include <widgets.h>
+
+namespace mogltk {
+ class engine : public Base {
+ public:
+ class keyevent : public Base {
+ public:
+ keyevent();
+ virtual ~keyevent();
+ virtual void down(SDL_keysym) = 0;
+ virtual void up(SDL_keysym) = 0;
+ protected:
+ keyevent * old_handler, * new_handler;
+ };
+ class mouseevent : public Base {
+ public:
+ mouseevent();
+ virtual ~mouseevent();
+ virtual void move(SDL_MouseMotionEvent) = 0;
+ virtual void action(SDL_MouseButtonEvent) = 0;
+ protected:
+ mouseevent * old_handler, * new_handler;
+ };
+ static int setup() throw(GeneralException);
+ static int postsetup() throw(GeneralException);
+ static int GetInited();
+ static SDL_RWops * RWFromHandle(Handle *) throw (GeneralException);
+ static void pollevents() throw (GeneralException);
+ static void setappactive(bool);
+ 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;
+ private:
+ static bool inited;
+ static bool postsetuped;
+ static bool appactive;
+ static bool cursorvisible;
+ static bool quitrequest;
+ static int mx;
+ static int my;
+ static int mz;
+ static int mbuttons;
+ static int frames;
+ static double curfps;
+ static Uint32 curticks;
+ static int locked;
+ static keyevent * keyevent_h;
+ static mouseevent * mouseevent_h;
+ static void updatemouse();
+ };
+};
+
+#endif
|