[Orxonox-commit 762] r3290 - in branches/core4/src: core orxonox orxonox/gamestates orxonox/interfaces orxonox/overlays orxonox/overlays/console
rgrieder at orxonox.net
rgrieder at orxonox.net
Tue Jul 14 11:30:05 CEST 2009
Author: rgrieder
Date: 2009-07-14 11:30:05 +0200 (Tue, 14 Jul 2009)
New Revision: 3290
Added:
branches/core4/src/core/WindowEventListener.cc
branches/core4/src/core/WindowEventListener.h
Removed:
branches/core4/src/orxonox/interfaces/WindowEventListener.h
Modified:
branches/core4/src/core/CMakeLists.txt
branches/core4/src/orxonox/GraphicsManager.cc
branches/core4/src/orxonox/gamestates/GSGraphics.h
branches/core4/src/orxonox/interfaces/InterfaceCompilation.cc
branches/core4/src/orxonox/overlays/OrxonoxOverlay.h
branches/core4/src/orxonox/overlays/console/InGameConsole.h
Log:
Moved WindowEventListener to the core to avoid some really ugly hacks in the Mouse.
Modified: branches/core4/src/core/CMakeLists.txt
===================================================================
--- branches/core4/src/core/CMakeLists.txt 2009-07-14 08:09:12 UTC (rev 3289)
+++ branches/core4/src/core/CMakeLists.txt 2009-07-14 09:30:05 UTC (rev 3290)
@@ -30,6 +30,7 @@
LuaBind.cc
ObjectListBase.cc
OrxonoxClass.cc
+ WindowEventListener.cc
# command
ArgumentCompletionFunctions.cc
Added: branches/core4/src/core/WindowEventListener.cc
===================================================================
--- branches/core4/src/core/WindowEventListener.cc (rev 0)
+++ branches/core4/src/core/WindowEventListener.cc 2009-07-14 09:30:05 UTC (rev 3290)
@@ -0,0 +1,38 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Reto Grieder
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "WindowEventListener.h"
+#include "CoreIncludes.h"
+
+namespace orxonox
+{
+ WindowEventListener::WindowEventListener()
+ {
+ RegisterRootObject(WindowEventListener);
+ }
+}
Property changes on: branches/core4/src/core/WindowEventListener.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Copied: branches/core4/src/core/WindowEventListener.h (from rev 3282, branches/core4/src/orxonox/interfaces/WindowEventListener.h)
===================================================================
--- branches/core4/src/core/WindowEventListener.h (rev 0)
+++ branches/core4/src/core/WindowEventListener.h 2009-07-14 09:30:05 UTC (rev 3290)
@@ -0,0 +1,55 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Reto Grieder
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _WindowEventListener_H__
+#define _WindowEventListener_H__
+
+#include "CorePrereqs.h"
+#include "OrxonoxClass.h"
+
+namespace orxonox
+{
+ //! Interface for receiving window events like resize, moved and focusChanged
+ class _CoreExport WindowEventListener : virtual public OrxonoxClass
+ {
+ public:
+ WindowEventListener();
+ virtual ~WindowEventListener() { }
+
+ //! Window has been moved
+ virtual void windowMoved() { }
+
+ //! Window has resized
+ virtual void windowResized(unsigned int newWidth, unsigned int newHeight) { }
+
+ //! Window has lost/gained focus
+ virtual void windowFocusChanged() { }
+ };
+}
+
+#endif /* _WindowEventListener_H__ */
Modified: branches/core4/src/orxonox/GraphicsManager.cc
===================================================================
--- branches/core4/src/orxonox/GraphicsManager.cc 2009-07-14 08:09:12 UTC (rev 3289)
+++ branches/core4/src/orxonox/GraphicsManager.cc 2009-07-14 09:30:05 UTC (rev 3290)
@@ -62,8 +62,8 @@
#include "core/Core.h"
#include "core/Game.h"
#include "core/GameMode.h"
+#include "core/WindowEventListener.h"
#include "tools/ParticleInterface.h"
-#include "interfaces/WindowEventListener.h"
// HACK!
#include "overlays/map/Map.h"
Modified: branches/core4/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- branches/core4/src/orxonox/gamestates/GSGraphics.h 2009-07-14 08:09:12 UTC (rev 3289)
+++ branches/core4/src/orxonox/gamestates/GSGraphics.h 2009-07-14 09:30:05 UTC (rev 3290)
@@ -38,7 +38,7 @@
#include "OrxonoxPrereqs.h"
#include "core/GameState.h"
-#include "interfaces/WindowEventListener.h"
+#include "core/WindowEventListener.h"
namespace orxonox
{
Modified: branches/core4/src/orxonox/interfaces/InterfaceCompilation.cc
===================================================================
--- branches/core4/src/orxonox/interfaces/InterfaceCompilation.cc 2009-07-14 08:09:12 UTC (rev 3289)
+++ branches/core4/src/orxonox/interfaces/InterfaceCompilation.cc 2009-07-14 09:30:05 UTC (rev 3290)
@@ -39,7 +39,6 @@
#include "TeamColourable.h"
#include "Tickable.h"
#include "TimeFactorListener.h"
-#include "WindowEventListener.h"
#include "core/CoreIncludes.h"
@@ -102,17 +101,6 @@
}
//----------------------------
- // WindowEventListener
- //----------------------------
- /**
- @brief Constructor for the WindowEventListener.
- */
- WindowEventListener::WindowEventListener()
- {
- RegisterRootObject(WindowEventListener);
- }
-
- //----------------------------
// Rewardable
//----------------------------
Rewardable::Rewardable()
Deleted: branches/core4/src/orxonox/interfaces/WindowEventListener.h
===================================================================
--- branches/core4/src/orxonox/interfaces/WindowEventListener.h 2009-07-14 08:09:12 UTC (rev 3289)
+++ branches/core4/src/orxonox/interfaces/WindowEventListener.h 2009-07-14 09:30:05 UTC (rev 3290)
@@ -1,57 +0,0 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Reto Grieder
- * Co-authors:
- * ...
- *
- */
-
-#ifndef _WindowEventListener_H__
-#define _WindowEventListener_H__
-
-#include "OrxonoxPrereqs.h"
-#include "core/OrxonoxClass.h"
-
-namespace orxonox
-{
- /**
- @brief Interface for receiving window events.
- */
- class _OrxonoxExport WindowEventListener : virtual public OrxonoxClass
- {
- public:
- WindowEventListener();
- virtual ~WindowEventListener() { }
-
- /** Window has moved position */
- virtual void windowMoved() { }
-
- /** Window has resized */
- virtual void windowResized(unsigned int newWidth, unsigned int newHeight) { }
-
- /** Window has lost/gained focus */
- virtual void windowFocusChanged() { }
- };
-}
-
-#endif /* _WindowEventListener_H__ */
Modified: branches/core4/src/orxonox/overlays/OrxonoxOverlay.h
===================================================================
--- branches/core4/src/orxonox/overlays/OrxonoxOverlay.h 2009-07-14 08:09:12 UTC (rev 3289)
+++ branches/core4/src/orxonox/overlays/OrxonoxOverlay.h 2009-07-14 09:30:05 UTC (rev 3290)
@@ -41,7 +41,7 @@
#include "util/Math.h"
#include "util/OgreForwardRefs.h"
#include "core/BaseObject.h"
-#include "interfaces/WindowEventListener.h"
+#include "core/WindowEventListener.h"
namespace orxonox
{
Modified: branches/core4/src/orxonox/overlays/console/InGameConsole.h
===================================================================
--- branches/core4/src/orxonox/overlays/console/InGameConsole.h 2009-07-14 08:09:12 UTC (rev 3289)
+++ branches/core4/src/orxonox/overlays/console/InGameConsole.h 2009-07-14 09:30:05 UTC (rev 3290)
@@ -35,7 +35,7 @@
#include <string>
#include "util/OgreForwardRefs.h"
#include "core/Shell.h"
-#include "interfaces/WindowEventListener.h"
+#include "core/WindowEventListener.h"
namespace orxonox
{
More information about the Orxonox-commit
mailing list