mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-11 17:17:42 +03:00
Renamed cWindow to Window in EE::Window... Window, Window Window.
I don't like it but i don't other option.
This commit is contained in:
Binary file not shown.
@@ -36,7 +36,7 @@ class EE_API cMap {
|
||||
|
||||
virtual ~cMap();
|
||||
|
||||
virtual void Create( Sizei Size, Uint32 MaxLayers, Sizei TileSize, Uint32 Flags = 0, Sizei viewSize = Sizei( 800, 600 ), Window::cWindow * Window = NULL );
|
||||
virtual void Create( Sizei Size, Uint32 MaxLayers, Sizei TileSize, Uint32 Flags = 0, Sizei viewSize = Sizei( 800, 600 ), EE::Window::Window * Window = NULL );
|
||||
|
||||
virtual cLayer * AddLayer( Uint32 Type, Uint32 flags, std::string name );
|
||||
|
||||
@@ -245,7 +245,7 @@ class EE_API cMap {
|
||||
|
||||
typedef std::map<Uint32, cGameObjectPolyData> PolyObjMap;
|
||||
|
||||
Window::cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
cLayer** mLayers;
|
||||
Uint32 mFlags;
|
||||
Uint32 mMaxLayers;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <eepp/graphics/cfont.hpp>
|
||||
#include <deque>
|
||||
|
||||
namespace EE { namespace Window { class cWindow; class InputTextBuffer; class InputEvent; } }
|
||||
namespace EE { namespace Window { class Window; class InputTextBuffer; class InputEvent; } }
|
||||
|
||||
using namespace EE::Window;
|
||||
|
||||
@@ -19,10 +19,10 @@ class EE_API cConsole : protected LogReaderInterface {
|
||||
typedef cb::Callback1<void, const std::vector < String >& > ConsoleCallback;
|
||||
|
||||
/** Instances the console but doesn't create it, you must call Create to initialize the console. */
|
||||
cConsole( Window::cWindow * window = NULL );
|
||||
cConsole( EE::Window::Window * window = NULL );
|
||||
|
||||
/** Creates the console */
|
||||
cConsole( cFont* Font, const bool& MakeDefaultCommands = true, const bool& AttachToLog = true, const unsigned int& MaxLogLines = 1024, const Uint32& TextureId = 0, Window::cWindow * window = NULL );
|
||||
cConsole( cFont* Font, const bool& MakeDefaultCommands = true, const bool& AttachToLog = true, const unsigned int& MaxLogLines = 1024, const Uint32& TextureId = 0, EE::Window::Window * window = NULL );
|
||||
|
||||
~cConsole();
|
||||
|
||||
@@ -126,7 +126,7 @@ class EE_API cConsole : protected LogReaderInterface {
|
||||
std::deque < String > mCmdLog;
|
||||
std::deque < String > mLastCommands;
|
||||
|
||||
Window::cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
|
||||
ColorA mConColor;
|
||||
ColorA mConLineColor;
|
||||
@@ -243,7 +243,7 @@ class EE_API cConsole : protected LogReaderInterface {
|
||||
|
||||
void PrintCommandsStartingWith( const String& start );
|
||||
|
||||
void PrivVideoResize( cWindow * win );
|
||||
void PrivVideoResize( EE::Window::Window * win );
|
||||
|
||||
void WriteLog( const std::string& Text );
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <eepp/graphics/ctexture.hpp>
|
||||
#include <eepp/window/cview.hpp>
|
||||
|
||||
namespace EE { namespace Window { class cWindow; } }
|
||||
namespace EE { namespace Window { class Window; } }
|
||||
|
||||
using namespace EE::Window;
|
||||
|
||||
@@ -20,7 +20,7 @@ class EE_API cFrameBuffer {
|
||||
** @param DepthBuffer Indicates if a depth buffer is used
|
||||
** @param window In case that the application is using more than one window, the user can indicate which one to use ( by default uses the current active window )
|
||||
*/
|
||||
static cFrameBuffer * New( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, Window::cWindow * window = NULL );
|
||||
static cFrameBuffer * New( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, EE::Window::Window * window = NULL );
|
||||
|
||||
virtual ~cFrameBuffer();
|
||||
|
||||
@@ -62,7 +62,7 @@ class EE_API cFrameBuffer {
|
||||
/** @return True if the frame buffer has a depth buffer. */
|
||||
const bool& HasDepthBuffer() const;
|
||||
protected:
|
||||
Window::cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
Int32 mWidth;
|
||||
Int32 mHeight;
|
||||
bool mHasDepthBuffer;
|
||||
@@ -71,7 +71,7 @@ class EE_API cFrameBuffer {
|
||||
View mPrevView;
|
||||
float mProjMat[16];
|
||||
|
||||
cFrameBuffer( Window::cWindow * window );
|
||||
cFrameBuffer( EE::Window::Window * window );
|
||||
|
||||
virtual bool Create( const Uint32& Width, const Uint32& Height ) = 0;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class EE_API cUIManager {
|
||||
|
||||
void OverControl( cUIControl * Ctrl );
|
||||
|
||||
void Init( Uint32 Flags = 0, Window::cWindow * window = NULL );
|
||||
void Init( Uint32 Flags = 0, EE::Window::Window * window = NULL );
|
||||
|
||||
void Shutdown();
|
||||
|
||||
@@ -35,7 +35,7 @@ class EE_API cUIManager {
|
||||
|
||||
const Time& Elapsed() const;
|
||||
|
||||
void ResizeControl( cWindow * win );
|
||||
void ResizeControl( EE::Window::Window * win );
|
||||
|
||||
void SendMsg( cUIControl * Ctrl, const Uint32& Msg, const Uint32& Flags = 0 );
|
||||
|
||||
@@ -77,7 +77,7 @@ class EE_API cUIManager {
|
||||
|
||||
void SendMouseDown( cUIControl * ToCtrl, const Vector2i& Pos, const Uint32 Flags );
|
||||
|
||||
Window::cWindow * GetWindow() const;
|
||||
EE::Window::Window * GetWindow() const;
|
||||
|
||||
/** Control where the mouse click started to be down */
|
||||
cUIControl * DownControl() const;
|
||||
@@ -103,7 +103,7 @@ class EE_API cUIManager {
|
||||
friend class cUIControl;
|
||||
friend class cUIWindow;
|
||||
|
||||
Window::cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
Input * mKM;
|
||||
cUIWindow * mControl;
|
||||
cUIControl * mFocusControl;
|
||||
|
||||
@@ -19,16 +19,16 @@ class EE_API Clipboard {
|
||||
virtual void SetText( const std::string& Text ) = 0;
|
||||
|
||||
/** @return The parent window of the clipboard */
|
||||
Window::cWindow * GetWindow() const;
|
||||
EE::Window::Window * GetWindow() const;
|
||||
protected:
|
||||
friend class cWindow;
|
||||
friend class Window;
|
||||
|
||||
Clipboard( Window::cWindow * window );
|
||||
Clipboard( EE::Window::Window * window );
|
||||
|
||||
/** Initialize the clipboard manager. This is needed because the backends first create the instance of the clipboard and then initialize the window context. */
|
||||
virtual void Init() = 0;
|
||||
|
||||
Window::cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -11,7 +11,7 @@ using namespace EE::Graphics;
|
||||
|
||||
namespace EE { namespace Window {
|
||||
|
||||
class cWindow;
|
||||
class Window;
|
||||
|
||||
class EE_API Cursor {
|
||||
public:
|
||||
@@ -35,13 +35,13 @@ class EE_API Cursor {
|
||||
std::string mName;
|
||||
cImage * mImage;
|
||||
Vector2i mHotSpot;
|
||||
cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
|
||||
Cursor( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
Cursor( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
Cursor( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
Cursor( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
Cursor( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
Cursor( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
virtual void Create() = 0;
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace EE { namespace Window {
|
||||
|
||||
class EE_API CursorManager {
|
||||
public:
|
||||
CursorManager( Window::cWindow * window );
|
||||
CursorManager( EE::Window::Window * window );
|
||||
|
||||
virtual ~CursorManager();
|
||||
|
||||
@@ -137,7 +137,7 @@ class EE_API CursorManager {
|
||||
Cursor * Cur;
|
||||
};
|
||||
GlobalCursor mGlobalCursors[ EE_CURSOR_COUNT ];
|
||||
cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
Cursor * mCurrent;
|
||||
EE_SYSTEM_CURSOR mSysCursor;
|
||||
CursorsList mCursors;
|
||||
|
||||
@@ -20,18 +20,18 @@ class EE_API Engine {
|
||||
/** Creates a new window.
|
||||
* SDL2, SFML backends support more than one window creation, SDL 1.2 backend only 1 window.
|
||||
*/
|
||||
Window::cWindow * CreateWindow( WindowSettings Settings, ContextSettings Context = ContextSettings() );
|
||||
EE::Window::Window * CreateWindow( WindowSettings Settings, ContextSettings Context = ContextSettings() );
|
||||
|
||||
/** Destroy the window instance, and set as current other window running ( if any ).
|
||||
* This function is only useful for multi-window environment. Avoid using it with one window context.
|
||||
*/
|
||||
void DestroyWindow( Window::cWindow * window );
|
||||
void DestroyWindow( EE::Window::Window * window );
|
||||
|
||||
/** @return The current Window context. */
|
||||
Window::cWindow * GetCurrentWindow() const;
|
||||
EE::Window::Window * GetCurrentWindow() const;
|
||||
|
||||
/** Set the window as the current. */
|
||||
void SetCurrentWindow( Window::cWindow * window );
|
||||
void SetCurrentWindow( EE::Window::Window * window );
|
||||
|
||||
/** @return The number of windows created. */
|
||||
Uint32 GetWindowCount() const;
|
||||
@@ -49,7 +49,7 @@ class EE_API Engine {
|
||||
const Uint32& GetHeight() const;
|
||||
|
||||
/** @return If the window instance is inside the window list. */
|
||||
bool ExistsWindow( Window::cWindow * window );
|
||||
bool ExistsWindow( EE::Window::Window * window );
|
||||
|
||||
/** Constructs WindowSettings from an ini file
|
||||
It will search for the following properties:
|
||||
@@ -126,11 +126,11 @@ class EE_API Engine {
|
||||
/** @return The id of the thread that was used to initialize the OpenGL Context. */
|
||||
Uint32 GetMainThreadId();
|
||||
protected:
|
||||
friend class cWindow;
|
||||
friend class Window;
|
||||
|
||||
Backend::WindowBackend * mBackend;
|
||||
std::list<cWindow*> mWindows;
|
||||
cWindow * mWindow;
|
||||
std::list<Window*> mWindows;
|
||||
EE::Window::Window * mWindow;
|
||||
bool mSharedGLContext;
|
||||
Uint32 mMainThreadId;
|
||||
|
||||
@@ -144,13 +144,13 @@ class EE_API Engine {
|
||||
|
||||
Backend::WindowBackend * CreateSFMLBackend( const WindowSettings& Settings );
|
||||
|
||||
cWindow * CreateSDLWindow( const WindowSettings& Settings, const ContextSettings& Context );
|
||||
EE::Window::Window * CreateSDLWindow( const WindowSettings& Settings, const ContextSettings& Context );
|
||||
|
||||
cWindow * CreateSDL2Window( const WindowSettings& Settings, const ContextSettings& Context );
|
||||
EE::Window::Window * CreateSDL2Window( const WindowSettings& Settings, const ContextSettings& Context );
|
||||
|
||||
cWindow * CreateSFMLWindow( const WindowSettings& Settings, const ContextSettings& Context );
|
||||
EE::Window::Window * CreateSFMLWindow( const WindowSettings& Settings, const ContextSettings& Context );
|
||||
|
||||
cWindow * CreateDefaultWindow( const WindowSettings& Settings, const ContextSettings& Context );
|
||||
EE::Window::Window * CreateDefaultWindow( const WindowSettings& Settings, const ContextSettings& Context );
|
||||
|
||||
Uint32 GetDefaultBackend() const;
|
||||
};
|
||||
|
||||
@@ -180,13 +180,13 @@ class EE_API Input {
|
||||
/** @return A list of the input finders that were down in the last update */
|
||||
std::list<InputFinger *> GetFingersWasDown();
|
||||
protected:
|
||||
friend class cWindow;
|
||||
friend class Window;
|
||||
|
||||
Input( Window::cWindow * window, JoystickManager * joystickmanager );
|
||||
Input( EE::Window::Window * window, JoystickManager * joystickmanager );
|
||||
|
||||
virtual void Init() = 0;
|
||||
|
||||
cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
JoystickManager * mJoystickManager;
|
||||
Uint8 mKeysDown [EE_KEYS_SPACE];
|
||||
Uint8 mKeysUp [EE_KEYS_SPACE];
|
||||
|
||||
@@ -26,9 +26,9 @@ class EE_API InputTextBuffer {
|
||||
public:
|
||||
typedef cb::Callback0<void> EnterCallback;
|
||||
|
||||
InputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, Window::cWindow * window = NULL, const Uint32& maxLength = INPUT_LENGHT_MAX );
|
||||
InputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, EE::Window::Window * window = NULL, const Uint32& maxLength = INPUT_LENGHT_MAX );
|
||||
|
||||
InputTextBuffer( Window::cWindow * window = NULL );
|
||||
InputTextBuffer( EE::Window::Window * window = NULL );
|
||||
|
||||
~InputTextBuffer();
|
||||
|
||||
@@ -131,7 +131,7 @@ class EE_API InputTextBuffer {
|
||||
/** @return The selection cursor final position */
|
||||
const Int32& SelCurEnd() const;
|
||||
protected:
|
||||
cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
String mText;
|
||||
Uint32 mFlags;
|
||||
Uint32 mCallback;
|
||||
|
||||
@@ -18,7 +18,7 @@ class cImage;
|
||||
}
|
||||
|
||||
namespace Window {
|
||||
class cWindow;
|
||||
class Window;
|
||||
class Cursor;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ using namespace EE::Graphics;
|
||||
*/
|
||||
class PlatformImpl {
|
||||
public:
|
||||
PlatformImpl( Window::cWindow * window );
|
||||
PlatformImpl( EE::Window::Window * window );
|
||||
|
||||
virtual ~PlatformImpl();
|
||||
|
||||
@@ -107,7 +107,7 @@ class PlatformImpl {
|
||||
|
||||
virtual eeWindowContex GetWindowContext() = 0;
|
||||
protected:
|
||||
cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
@@ -46,7 +46,7 @@ class EE_API View {
|
||||
/** Creates a new view */
|
||||
void SetView( const int& X, const int& Y, const int& Width, const int& Height );
|
||||
private:
|
||||
friend class cWindow;
|
||||
friend class Window;
|
||||
|
||||
bool mNeedUpdate;
|
||||
Recti mView;
|
||||
|
||||
@@ -146,13 +146,13 @@ class DisplayMode {
|
||||
#define EE_ANDROID_EXTERNAL_STORAGE_READ 0x01
|
||||
#define EE_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
|
||||
|
||||
class EE_API cWindow {
|
||||
class EE_API Window {
|
||||
public:
|
||||
typedef cb::Callback1<void, cWindow*> WindowResizeCallback;
|
||||
typedef cb::Callback1<void, Window*> WindowResizeCallback;
|
||||
|
||||
cWindow( WindowSettings Settings, ContextSettings Context, Clipboard * Clipboard, Input * Input, CursorManager * CursorManager );
|
||||
Window( WindowSettings Settings, ContextSettings Context, Clipboard * Clipboard, Input * Input, CursorManager * CursorManager );
|
||||
|
||||
virtual ~cWindow();
|
||||
virtual ~Window();
|
||||
|
||||
/** Creates a new window and GL context */
|
||||
virtual bool Create( WindowSettings Settings, ContextSettings Context ) = 0;
|
||||
@@ -461,7 +461,7 @@ class EE_API cWindow {
|
||||
Uint32 mNumCallBacks;
|
||||
std::map<Uint32, WindowResizeCallback> mCallbacks;
|
||||
|
||||
class cFrameData {
|
||||
class FrameData {
|
||||
public:
|
||||
class cFPSData {
|
||||
public:
|
||||
@@ -484,12 +484,12 @@ class EE_API cWindow {
|
||||
Clock * FrameElapsed;
|
||||
System::Time ElapsedTime;
|
||||
|
||||
cFrameData();
|
||||
FrameData();
|
||||
|
||||
~cFrameData();
|
||||
~FrameData();
|
||||
};
|
||||
|
||||
cFrameData mFrameData;
|
||||
FrameData mFrameData;
|
||||
|
||||
/** Set the flag state to be the current window */
|
||||
virtual void SetCurrent();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 3.0.0, 2014-06-01T21:32:45. -->
|
||||
<!-- Written by QtCreator 3.0.0, 2014-06-16T00:04:43. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
@@ -54,7 +54,7 @@
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{388e5431-b31b-42b3-b9ad-9002d279d75d}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">10</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
@@ -161,7 +161,7 @@
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
|
||||
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
|
||||
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j4</value>
|
||||
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j8</value>
|
||||
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeCommand">make</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
|
||||
@@ -84,7 +84,7 @@ void cMap::DeleteLayers() {
|
||||
mLayerCount = 0;
|
||||
}
|
||||
|
||||
void cMap::Create( Sizei Size, Uint32 MaxLayers, Sizei TileSize, Uint32 Flags, Sizei viewSize, Window::cWindow * Window ) {
|
||||
void cMap::Create( Sizei Size, Uint32 MaxLayers, Sizei TileSize, Uint32 Flags, Sizei viewSize, EE::Window::Window * Window ) {
|
||||
Reset();
|
||||
|
||||
mWindow = Window;
|
||||
|
||||
@@ -12,7 +12,7 @@ using namespace EE::Window;
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
cConsole::cConsole( Window::cWindow * window ) :
|
||||
cConsole::cConsole( EE::Window::Window * window ) :
|
||||
mWindow( window ),
|
||||
mConColor(35, 47, 73, 230),
|
||||
mConLineColor(55, 67, 93, 230),
|
||||
@@ -46,7 +46,7 @@ cConsole::cConsole( Window::cWindow * window ) :
|
||||
}
|
||||
}
|
||||
|
||||
cConsole::cConsole( cFont* Font, const bool& MakeDefaultCommands, const bool& AttachToLog, const unsigned int& MaxLogLines, const Uint32& TextureId, Window::cWindow * window ) :
|
||||
cConsole::cConsole( cFont* Font, const bool& MakeDefaultCommands, const bool& AttachToLog, const unsigned int& MaxLogLines, const Uint32& TextureId, EE::Window::Window * window ) :
|
||||
mWindow( window ),
|
||||
mConColor(35, 47, 73, 230),
|
||||
mConLineColor(55, 67, 93, 230),
|
||||
@@ -440,7 +440,7 @@ void cConsole::PrintCommandsStartingWith( const String& start ) {
|
||||
}
|
||||
}
|
||||
|
||||
void cConsole::PrivVideoResize( cWindow * win ) {
|
||||
void cConsole::PrivVideoResize( EE::Window::Window * win ) {
|
||||
mWidth = (Float) mWindow->GetWidth();
|
||||
mHeight = (Float) mWindow->GetHeight();
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@ using namespace EE::Graphics::Private;
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
cFrameBuffer * cFrameBuffer::New( const Uint32& Width, const Uint32& Height, bool DepthBuffer, Window::cWindow * window ) {
|
||||
cFrameBuffer * cFrameBuffer::New( const Uint32& Width, const Uint32& Height, bool DepthBuffer, EE::Window::Window * window ) {
|
||||
if ( cFrameBufferFBO::IsSupported() )
|
||||
return eeNew( cFrameBufferFBO, ( Width, Height, DepthBuffer, window ) );
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cFrameBuffer::cFrameBuffer( Window::cWindow * window ) :
|
||||
cFrameBuffer::cFrameBuffer( EE::Window::Window * window ) :
|
||||
mWindow( window ),
|
||||
mWidth(0),
|
||||
mHeight(0),
|
||||
|
||||
@@ -11,7 +11,7 @@ bool cFrameBufferFBO::IsSupported() {
|
||||
return 0 != GLi->IsExtension( EEGL_EXT_framebuffer_object );
|
||||
}
|
||||
|
||||
cFrameBufferFBO::cFrameBufferFBO( Window::cWindow * window ) :
|
||||
cFrameBufferFBO::cFrameBufferFBO( EE::Window::Window * window ) :
|
||||
cFrameBuffer( window ),
|
||||
mFrameBuffer(0),
|
||||
mDepthBuffer(0),
|
||||
@@ -19,7 +19,7 @@ cFrameBufferFBO::cFrameBufferFBO( Window::cWindow * window ) :
|
||||
mLastRB(0)
|
||||
{}
|
||||
|
||||
cFrameBufferFBO::cFrameBufferFBO( const Uint32& Width, const Uint32& Height, bool DepthBuffer, Window::cWindow * window ) :
|
||||
cFrameBufferFBO::cFrameBufferFBO( const Uint32& Width, const Uint32& Height, bool DepthBuffer, EE::Window::Window * window ) :
|
||||
cFrameBuffer( window ),
|
||||
mFrameBuffer(0),
|
||||
mDepthBuffer(0),
|
||||
|
||||
@@ -9,11 +9,11 @@ namespace EE { namespace Graphics {
|
||||
|
||||
class EE_API cFrameBufferFBO : public cFrameBuffer {
|
||||
public:
|
||||
cFrameBufferFBO( Window::cWindow * window = NULL );
|
||||
cFrameBufferFBO( EE::Window::Window * window = NULL );
|
||||
|
||||
~cFrameBufferFBO();
|
||||
|
||||
cFrameBufferFBO( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, Window::cWindow * window = NULL );
|
||||
cFrameBufferFBO( const Uint32& Width, const Uint32& Height, bool DepthBuffer = false, EE::Window::Window * window = NULL );
|
||||
|
||||
void Bind();
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ cUIManager::~cUIManager() {
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
void cUIManager::Init( Uint32 Flags, Window::cWindow * window ) {
|
||||
void cUIManager::Init( Uint32 Flags, EE::Window::Window * window ) {
|
||||
if ( mInit )
|
||||
Shutdown();
|
||||
|
||||
@@ -110,7 +110,7 @@ void cUIManager::InputCallback( InputEvent * Event ) {
|
||||
}
|
||||
}
|
||||
|
||||
void cUIManager::ResizeControl( cWindow * win ) {
|
||||
void cUIManager::ResizeControl( EE::Window::Window * win ) {
|
||||
mControl->Size( mWindow->GetWidth(), mWindow->GetHeight() );
|
||||
SendMsg( mControl, cUIMessage::MsgWindowResize );
|
||||
|
||||
@@ -351,7 +351,7 @@ void cUIManager::SendMouseDown( cUIControl * ToCtrl, const Vector2i& Pos, const
|
||||
ToCtrl->OnMouseDown( Pos, Flags );
|
||||
}
|
||||
|
||||
Window::cWindow * cUIManager::GetWindow() const {
|
||||
EE::Window::Window * cUIManager::GetWindow() const {
|
||||
return mWindow;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ static int clipboard_filter( const SDL_Event *event ) {
|
||||
}
|
||||
#endif
|
||||
|
||||
ClipboardSDL::ClipboardSDL( cWindow * window ) :
|
||||
ClipboardSDL::ClipboardSDL( EE::Window::Window * window ) :
|
||||
Clipboard( window ),
|
||||
mInfo( NULL )
|
||||
{
|
||||
@@ -115,7 +115,7 @@ void ClipboardSDL::Init() {
|
||||
#endif
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM )
|
||||
mInfo = reinterpret_cast<cWindowSDL*> ( mWindow )->mWMinfo;
|
||||
mInfo = reinterpret_cast<WindowSDL*> ( mWindow )->mWMinfo;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ class EE_API ClipboardSDL : public Clipboard {
|
||||
|
||||
void SetText( const std::string& Text );
|
||||
protected:
|
||||
friend class cWindowSDL;
|
||||
friend class WindowSDL;
|
||||
|
||||
ClipboardSDL( Window::cWindow * window );
|
||||
ClipboardSDL( EE::Window::Window * window );
|
||||
|
||||
void Init();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL {
|
||||
|
||||
CursorManagerSDL::CursorManagerSDL( cWindow * window ) :
|
||||
CursorManagerSDL::CursorManagerSDL( EE::Window::Window * window ) :
|
||||
CursorManager( window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace EE { namespace Window { namespace Backend { namespace SDL {
|
||||
|
||||
class CursorManagerSDL : public CursorManager {
|
||||
public:
|
||||
CursorManagerSDL( Window::cWindow * window );
|
||||
CursorManagerSDL( EE::Window::Window * window );
|
||||
|
||||
Cursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name );
|
||||
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL {
|
||||
|
||||
CursorSDL::CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorSDL::CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( tex, hotspot, name, window )
|
||||
{
|
||||
}
|
||||
|
||||
CursorSDL::CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorSDL::CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( img, hotspot, name, window )
|
||||
{
|
||||
}
|
||||
|
||||
CursorSDL::CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorSDL::CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( path, hotspot, name, window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@ class CursorSDL : public Cursor {
|
||||
protected:
|
||||
friend class CursorManagerSDL;
|
||||
|
||||
CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
void Create();
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL {
|
||||
|
||||
InputSDL::InputSDL( cWindow * window ) :
|
||||
InputSDL::InputSDL( EE::Window::Window * window ) :
|
||||
Input( window, eeNew( JoystickManagerSDL, () ) )
|
||||
{
|
||||
#if defined( EE_X11_PLATFORM )
|
||||
|
||||
@@ -22,9 +22,9 @@ class EE_API InputSDL : public Input {
|
||||
|
||||
void InjectMousePos( const Uint16& x, const Uint16& y );
|
||||
protected:
|
||||
friend class cWindowSDL;
|
||||
friend class WindowSDL;
|
||||
|
||||
InputSDL( Window::cWindow * window );
|
||||
InputSDL( EE::Window::Window * window );
|
||||
|
||||
virtual void Init();
|
||||
};
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL {
|
||||
|
||||
cWindowSDL::cWindowSDL( WindowSettings Settings, ContextSettings Context ) :
|
||||
cWindow( Settings, Context, eeNew( ClipboardSDL, ( this ) ), eeNew( InputSDL, ( this ) ), eeNew( CursorManagerSDL, ( this ) ) ),
|
||||
WindowSDL::WindowSDL( WindowSettings Settings, ContextSettings Context ) :
|
||||
Window( Settings, Context, eeNew( ClipboardSDL, ( this ) ), eeNew( InputSDL, ( this ) ), eeNew( CursorManagerSDL, ( this ) ) ),
|
||||
mSurface( NULL )
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM )
|
||||
,
|
||||
@@ -43,13 +43,13 @@ cWindowSDL::cWindowSDL( WindowSettings Settings, ContextSettings Context ) :
|
||||
Create( Settings, Context );
|
||||
}
|
||||
|
||||
cWindowSDL::~cWindowSDL() {
|
||||
WindowSDL::~WindowSDL() {
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM )
|
||||
eeSAFE_DELETE( mWMinfo );
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
bool WindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
if ( mWindow.Created )
|
||||
return false;
|
||||
|
||||
@@ -59,7 +59,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
if ( SDL_Init( SDL_INIT_VIDEO ) != 0 ) {
|
||||
eePRINTL( "Unable to initialize SDL: %s", SDL_GetError() );
|
||||
|
||||
LogFailureInit( "cWindowSDL", GetVersion() );
|
||||
LogFailureInit( "WindowSDL", GetVersion() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
} else {
|
||||
eePRINTL( "Video Mode Unsopported for this videocard: " );
|
||||
|
||||
LogFailureInit( "cWindowSDL", GetVersion() );
|
||||
LogFailureInit( "WindowSDL", GetVersion() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
if ( NULL == mSurface ) {
|
||||
eePRINTL( "Unable to set video mode: %s", SDL_GetError() );
|
||||
|
||||
LogFailureInit( "cWindowSDL", GetVersion() );
|
||||
LogFailureInit( "WindowSDL", GetVersion() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string cWindowSDL::GetVersion() {
|
||||
std::string WindowSDL::GetVersion() {
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM )
|
||||
SDL_version ver = mWMinfo->version;
|
||||
|
||||
@@ -169,7 +169,7 @@ std::string cWindowSDL::GetVersion() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindowSDL::CreatePlatform() {
|
||||
void WindowSDL::CreatePlatform() {
|
||||
eeSAFE_DELETE( mPlatform );
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM )
|
||||
SDL_VERSION( &mWMinfo->version );
|
||||
@@ -184,11 +184,11 @@ void cWindowSDL::CreatePlatform() {
|
||||
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
mPlatform = eeNew( Platform::cOSXImpl, ( this ) );
|
||||
#else
|
||||
cWindow::CreatePlatform();
|
||||
Window::CreatePlatform();
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindowSDL::SetGLConfig() {
|
||||
void WindowSDL::SetGLConfig() {
|
||||
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE , mWindow.ContextConfig.DepthBufferSize ); // Depth
|
||||
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, ( mWindow.ContextConfig.DoubleBuffering ? 1 : 0 ) ); // Double Buffering
|
||||
SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, mWindow.ContextConfig.StencilBufferSize );
|
||||
@@ -198,7 +198,7 @@ void cWindowSDL::SetGLConfig() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindowSDL::ToggleFullscreen() {
|
||||
void WindowSDL::ToggleFullscreen() {
|
||||
bool WasMaximized = mWindow.Maximized;
|
||||
|
||||
if ( Windowed() ) {
|
||||
@@ -214,13 +214,13 @@ void cWindowSDL::ToggleFullscreen() {
|
||||
GetCursorManager()->Reload();
|
||||
}
|
||||
|
||||
void cWindowSDL::Caption( const std::string& Caption ) {
|
||||
void WindowSDL::Caption( const std::string& Caption ) {
|
||||
mWindow.WindowConfig.Caption = Caption;
|
||||
|
||||
SDL_WM_SetCaption( Caption.c_str(), NULL );
|
||||
}
|
||||
|
||||
bool cWindowSDL::Icon( const std::string& Path ) {
|
||||
bool WindowSDL::Icon( const std::string& Path ) {
|
||||
int x, y, c;
|
||||
|
||||
if ( !mWindow.Created ) {
|
||||
@@ -277,15 +277,15 @@ bool cWindowSDL::Icon( const std::string& Path ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cWindowSDL::Active() {
|
||||
bool WindowSDL::Active() {
|
||||
return 0 != ( SDL_GetAppState() & SDL_APPINPUTFOCUS );
|
||||
}
|
||||
|
||||
bool cWindowSDL::Visible() {
|
||||
bool WindowSDL::Visible() {
|
||||
return 0 != ( SDL_GetAppState() & SDL_APPACTIVE );
|
||||
}
|
||||
|
||||
void cWindowSDL::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
void WindowSDL::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
if ( ( !Width || !Height ) ) {
|
||||
Width = mWindow.DesktopResolution.Width();
|
||||
Height = mWindow.DesktopResolution.Height();
|
||||
@@ -363,11 +363,11 @@ void cWindowSDL::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
}
|
||||
}
|
||||
|
||||
void cWindowSDL::SwapBuffers() {
|
||||
void WindowSDL::SwapBuffers() {
|
||||
SDL_GL_SwapBuffers();
|
||||
}
|
||||
|
||||
std::vector<DisplayMode> cWindowSDL::GetDisplayModes() const {
|
||||
std::vector<DisplayMode> WindowSDL::GetDisplayModes() const {
|
||||
SDL_Rect **modes = SDL_ListModes( NULL, SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL | SDL_FULLSCREEN );
|
||||
|
||||
if(modes == (SDL_Rect **)0)
|
||||
@@ -381,14 +381,14 @@ std::vector<DisplayMode> cWindowSDL::GetDisplayModes() const {
|
||||
return result;
|
||||
}
|
||||
|
||||
void cWindowSDL::SetGamma( Float Red, Float Green, Float Blue ) {
|
||||
void WindowSDL::SetGamma( Float Red, Float Green, Float Blue ) {
|
||||
eeclamp<Float>( &Red , 0.1f, 10.0f );
|
||||
eeclamp<Float>( &Green , 0.1f, 10.0f );
|
||||
eeclamp<Float>( &Blue , 0.1f, 10.0f );
|
||||
SDL_SetGamma( Red, Green, Blue );
|
||||
}
|
||||
|
||||
eeWindowHandle cWindowSDL::GetWindowHandler() {
|
||||
eeWindowHandle WindowSDL::GetWindowHandler() {
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN
|
||||
return mWMinfo->window;
|
||||
#elif defined( EE_X11_PLATFORM )
|
||||
|
||||
@@ -13,11 +13,11 @@ struct SDL_SysWMinfo;
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL {
|
||||
|
||||
class EE_API cWindowSDL : public cWindow {
|
||||
class EE_API WindowSDL : public Window {
|
||||
public:
|
||||
cWindowSDL( WindowSettings Settings, ContextSettings Context );
|
||||
WindowSDL( WindowSettings Settings, ContextSettings Context );
|
||||
|
||||
virtual ~cWindowSDL();
|
||||
virtual ~WindowSDL();
|
||||
|
||||
bool Create( WindowSettings Settings, ContextSettings Context );
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL2 {
|
||||
|
||||
ClipboardSDL::ClipboardSDL( cWindow * window ) :
|
||||
ClipboardSDL::ClipboardSDL( EE::Window::Window * window ) :
|
||||
Clipboard( window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ class EE_API ClipboardSDL : public Clipboard {
|
||||
|
||||
void SetText( const std::string& Text );
|
||||
protected:
|
||||
friend class cWindowSDL;
|
||||
friend class WindowSDL;
|
||||
|
||||
ClipboardSDL( Window::cWindow * window );
|
||||
ClipboardSDL( EE::Window::Window * window );
|
||||
|
||||
void Init();
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ static SDL_Cursor * GetLoadCursor( const EE_SYSTEM_CURSOR& cursor ) {
|
||||
return SDL_SYS_CURSORS[ cursor ];
|
||||
}
|
||||
|
||||
CursorManagerSDL::CursorManagerSDL( cWindow * window ) :
|
||||
CursorManagerSDL::CursorManagerSDL( EE::Window::Window * window ) :
|
||||
CursorManager( window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 {
|
||||
|
||||
class CursorManagerSDL : public CursorManager {
|
||||
public:
|
||||
CursorManagerSDL( Window::cWindow * window );
|
||||
CursorManagerSDL( EE::Window::Window * window );
|
||||
|
||||
Cursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name );
|
||||
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL2 {
|
||||
|
||||
CursorSDL::CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorSDL::CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( tex, hotspot, name, window ),
|
||||
mCursor( NULL )
|
||||
{
|
||||
Create();
|
||||
}
|
||||
|
||||
CursorSDL::CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorSDL::CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( img, hotspot, name, window ),
|
||||
mCursor( NULL )
|
||||
{
|
||||
Create();
|
||||
}
|
||||
|
||||
CursorSDL::CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorSDL::CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( path, hotspot, name, window ),
|
||||
mCursor( NULL )
|
||||
{
|
||||
|
||||
@@ -18,11 +18,11 @@ class CursorSDL : public Cursor {
|
||||
|
||||
SDL_Cursor * mCursor;
|
||||
|
||||
CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorSDL( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorSDL( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorSDL( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
virtual ~CursorSDL();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 {
|
||||
static Uint32 KeyCodesTable[ SDL_NUM_SCANCODES ];
|
||||
static bool KeyCodesTableInit = false;
|
||||
|
||||
InputSDL::InputSDL( cWindow * window ) :
|
||||
InputSDL::InputSDL( EE::Window::Window * window ) :
|
||||
Input( window, eeNew( JoystickManagerSDL, () ) )
|
||||
{
|
||||
#if defined( EE_X11_PLATFORM )
|
||||
@@ -310,15 +310,15 @@ void InputSDL::Update() {
|
||||
}
|
||||
|
||||
bool InputSDL::GrabInput() {
|
||||
return ( SDL_GetWindowGrab( reinterpret_cast<cWindowSDL*> ( mWindow )->GetSDLWindow() ) == SDL_TRUE ) ? true : false;
|
||||
return ( SDL_GetWindowGrab( reinterpret_cast<WindowSDL*> ( mWindow )->GetSDLWindow() ) == SDL_TRUE ) ? true : false;
|
||||
}
|
||||
|
||||
void InputSDL::GrabInput( const bool& Grab ) {
|
||||
SDL_SetWindowGrab( reinterpret_cast<cWindowSDL*> ( mWindow )->GetSDLWindow(), Grab ? SDL_TRUE : SDL_FALSE );
|
||||
SDL_SetWindowGrab( reinterpret_cast<WindowSDL*> ( mWindow )->GetSDLWindow(), Grab ? SDL_TRUE : SDL_FALSE );
|
||||
}
|
||||
|
||||
void InputSDL::InjectMousePos( const Uint16& x, const Uint16& y ) {
|
||||
SDL_WarpMouseInWindow( reinterpret_cast<cWindowSDL*>( mWindow )->GetSDLWindow(), x, y );
|
||||
SDL_WarpMouseInWindow( reinterpret_cast<WindowSDL*>( mWindow )->GetSDLWindow(), x, y );
|
||||
}
|
||||
|
||||
void InputSDL::Init() {
|
||||
|
||||
@@ -22,9 +22,9 @@ class EE_API InputSDL : public Input {
|
||||
|
||||
void InjectMousePos( const Uint16& x, const Uint16& y );
|
||||
protected:
|
||||
friend class cWindowSDL;
|
||||
friend class WindowSDL;
|
||||
|
||||
InputSDL( Window::cWindow * window );
|
||||
InputSDL( EE::Window::Window * window );
|
||||
|
||||
virtual void Init();
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ static std::string SDL_AndroidGetApkPath() {
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL2 {
|
||||
|
||||
cWindowSDL::cWindowSDL( WindowSettings Settings, ContextSettings Context ) :
|
||||
cWindow( Settings, Context, eeNew( ClipboardSDL, ( this ) ), eeNew( InputSDL, ( this ) ), eeNew( CursorManagerSDL, ( this ) ) ),
|
||||
WindowSDL::WindowSDL( WindowSettings Settings, ContextSettings Context ) :
|
||||
Window( Settings, Context, eeNew( ClipboardSDL, ( this ) ), eeNew( InputSDL, ( this ) ), eeNew( CursorManagerSDL, ( this ) ) ),
|
||||
mSDLWindow( NULL ),
|
||||
mGLContext( NULL ),
|
||||
mGLContextThread( NULL ),
|
||||
@@ -75,7 +75,7 @@ cWindowSDL::cWindowSDL( WindowSettings Settings, ContextSettings Context ) :
|
||||
Create( Settings, Context );
|
||||
}
|
||||
|
||||
cWindowSDL::~cWindowSDL() {
|
||||
WindowSDL::~WindowSDL() {
|
||||
if ( NULL != mGLContext ) {
|
||||
SDL_GL_DeleteContext( mGLContext );
|
||||
}
|
||||
@@ -97,7 +97,7 @@ cWindowSDL::~cWindowSDL() {
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
bool WindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
if ( mWindow.Created )
|
||||
return false;
|
||||
|
||||
@@ -107,7 +107,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
if ( SDL_Init( SDL_INIT_VIDEO ) != 0 ) {
|
||||
eePRINTL( "Unable to initialize SDL: %s", SDL_GetError() );
|
||||
|
||||
LogFailureInit( "cWindowSDL", GetVersion() );
|
||||
LogFailureInit( "WindowSDL", GetVersion() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
if ( NULL == mSDLWindow ) {
|
||||
eePRINTL( "Unable to create window: %s", SDL_GetError() );
|
||||
|
||||
LogFailureInit( "cWindowSDL", GetVersion() );
|
||||
LogFailureInit( "WindowSDL", GetVersion() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
{
|
||||
eePRINTL( "Unable to create context: %s", SDL_GetError() );
|
||||
|
||||
LogFailureInit( "cWindowSDL", GetVersion() );
|
||||
LogFailureInit( "WindowSDL", GetVersion() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cWindowSDL::IsThreadedGLContext() {
|
||||
bool WindowSDL::IsThreadedGLContext() {
|
||||
#ifdef SDL2_THREADED_GLCONTEXT
|
||||
return true;
|
||||
#else
|
||||
@@ -282,15 +282,15 @@ bool cWindowSDL::IsThreadedGLContext() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindowSDL::SetGLContextThread() {
|
||||
void WindowSDL::SetGLContextThread() {
|
||||
SDL_GL_MakeCurrent( mSDLWindow, mGLContextThread );
|
||||
}
|
||||
|
||||
void cWindowSDL::UnsetGLContextThread() {
|
||||
void WindowSDL::UnsetGLContextThread() {
|
||||
SDL_GL_MakeCurrent( mSDLWindow, NULL );
|
||||
}
|
||||
|
||||
std::string cWindowSDL::GetVersion() {
|
||||
std::string WindowSDL::GetVersion() {
|
||||
SDL_version ver;
|
||||
|
||||
SDL_GetVersion( &ver );
|
||||
@@ -298,7 +298,7 @@ std::string cWindowSDL::GetVersion() {
|
||||
return String::StrFormated( "SDL %d.%d.%d", ver.major, ver.minor, ver.patch );
|
||||
}
|
||||
|
||||
void cWindowSDL::CreatePlatform() {
|
||||
void WindowSDL::CreatePlatform() {
|
||||
eeSAFE_DELETE( mPlatform );
|
||||
|
||||
#ifdef EE_USE_WMINFO
|
||||
@@ -312,11 +312,11 @@ void cWindowSDL::CreatePlatform() {
|
||||
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
mPlatform = eeNew( Platform::cOSXImpl, ( this ) );
|
||||
#else
|
||||
cWindow::CreatePlatform();
|
||||
Window::CreatePlatform();
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindowSDL::SetGLConfig() {
|
||||
void WindowSDL::SetGLConfig() {
|
||||
if ( mWindow.ContextConfig.DepthBufferSize ) SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE , mWindow.ContextConfig.DepthBufferSize ); // Depth
|
||||
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, ( mWindow.ContextConfig.DoubleBuffering ? 1 : 0 ) ); // Double Buffering
|
||||
if ( mWindow.ContextConfig.StencilBufferSize ) SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, mWindow.ContextConfig.StencilBufferSize );
|
||||
@@ -334,7 +334,7 @@ void cWindowSDL::SetGLConfig() {
|
||||
}
|
||||
}
|
||||
|
||||
void cWindowSDL::ToggleFullscreen() {
|
||||
void WindowSDL::ToggleFullscreen() {
|
||||
bool WasMaximized = mWindow.Maximized;
|
||||
|
||||
if ( Windowed() ) {
|
||||
@@ -350,13 +350,13 @@ void cWindowSDL::ToggleFullscreen() {
|
||||
GetCursorManager()->Reload();
|
||||
}
|
||||
|
||||
void cWindowSDL::Caption( const std::string& Caption ) {
|
||||
void WindowSDL::Caption( const std::string& Caption ) {
|
||||
mWindow.WindowConfig.Caption = Caption;
|
||||
|
||||
SDL_SetWindowTitle( mSDLWindow, Caption.c_str() );
|
||||
}
|
||||
|
||||
bool cWindowSDL::Active() {
|
||||
bool WindowSDL::Active() {
|
||||
Uint32 flags = 0;
|
||||
|
||||
flags = SDL_GetWindowFlags( mSDLWindow );
|
||||
@@ -364,7 +364,7 @@ bool cWindowSDL::Active() {
|
||||
return 0 != ( ( flags & SDL_WINDOW_INPUT_FOCUS ) && ( flags & SDL_WINDOW_MOUSE_FOCUS ) );
|
||||
}
|
||||
|
||||
bool cWindowSDL::Visible() {
|
||||
bool WindowSDL::Visible() {
|
||||
Uint32 flags = 0;
|
||||
|
||||
flags = SDL_GetWindowFlags( mSDLWindow );
|
||||
@@ -372,7 +372,7 @@ bool cWindowSDL::Visible() {
|
||||
return 0 != ( ( flags & SDL_WINDOW_SHOWN ) && !( flags & SDL_WINDOW_MINIMIZED ) );
|
||||
}
|
||||
|
||||
void cWindowSDL::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
void WindowSDL::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
if ( ( !Width || !Height ) ) {
|
||||
Width = mWindow.DesktopResolution.Width();
|
||||
Height = mWindow.DesktopResolution.Height();
|
||||
@@ -430,11 +430,11 @@ void cWindowSDL::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
SendVideoResizeCb();
|
||||
}
|
||||
|
||||
void cWindowSDL::SwapBuffers() {
|
||||
void WindowSDL::SwapBuffers() {
|
||||
SDL_GL_SwapWindow( mSDLWindow );
|
||||
}
|
||||
|
||||
std::vector<DisplayMode> cWindowSDL::GetDisplayModes() const {
|
||||
std::vector<DisplayMode> WindowSDL::GetDisplayModes() const {
|
||||
std::vector<DisplayMode> result;
|
||||
|
||||
int displays = SDL_GetNumVideoDisplays();
|
||||
@@ -453,7 +453,7 @@ std::vector<DisplayMode> cWindowSDL::GetDisplayModes() const {
|
||||
return result;
|
||||
}
|
||||
|
||||
void cWindowSDL::SetGamma( Float Red, Float Green, Float Blue ) {
|
||||
void WindowSDL::SetGamma( Float Red, Float Green, Float Blue ) {
|
||||
eeclamp( &Red , (Float)0.1f, (Float)10.0f );
|
||||
eeclamp( &Green , (Float)0.1f, (Float)10.0f );
|
||||
eeclamp( &Blue , (Float)0.1f, (Float)10.0f );
|
||||
@@ -481,7 +481,7 @@ void cWindowSDL::SetGamma( Float Red, Float Green, Float Blue ) {
|
||||
SDL_SetWindowGammaRamp( mSDLWindow, red_ramp, green_ramp, blue_ramp );
|
||||
}
|
||||
|
||||
eeWindowHandle cWindowSDL::GetWindowHandler() {
|
||||
eeWindowHandle WindowSDL::GetWindowHandler() {
|
||||
if ( NULL != mWMinfo ) {
|
||||
return mWMinfo->GetWindowHandler();
|
||||
}
|
||||
@@ -489,7 +489,7 @@ eeWindowHandle cWindowSDL::GetWindowHandler() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool cWindowSDL::Icon( const std::string& Path ) {
|
||||
bool WindowSDL::Icon( const std::string& Path ) {
|
||||
int x, y, c;
|
||||
|
||||
if ( !mWindow.Created ) {
|
||||
@@ -546,31 +546,31 @@ bool cWindowSDL::Icon( const std::string& Path ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void cWindowSDL::Minimize() {
|
||||
void WindowSDL::Minimize() {
|
||||
SDL_MinimizeWindow( mSDLWindow );
|
||||
}
|
||||
|
||||
void cWindowSDL::Maximize() {
|
||||
void WindowSDL::Maximize() {
|
||||
SDL_MaximizeWindow( mSDLWindow );
|
||||
}
|
||||
|
||||
void cWindowSDL::Hide() {
|
||||
void WindowSDL::Hide() {
|
||||
SDL_HideWindow( mSDLWindow );
|
||||
}
|
||||
|
||||
void cWindowSDL::Raise() {
|
||||
void WindowSDL::Raise() {
|
||||
SDL_RaiseWindow( mSDLWindow );
|
||||
}
|
||||
|
||||
void cWindowSDL::Show() {
|
||||
void WindowSDL::Show() {
|
||||
SDL_ShowWindow( mSDLWindow );
|
||||
}
|
||||
|
||||
void cWindowSDL::Position( Int16 Left, Int16 Top ) {
|
||||
void WindowSDL::Position( Int16 Left, Int16 Top ) {
|
||||
SDL_SetWindowPosition( mSDLWindow, Left, Top );
|
||||
}
|
||||
|
||||
Vector2i cWindowSDL::Position() {
|
||||
Vector2i WindowSDL::Position() {
|
||||
Vector2i p;
|
||||
|
||||
SDL_GetWindowPosition( mSDLWindow, &p.x, &p.y );
|
||||
@@ -578,35 +578,35 @@ Vector2i cWindowSDL::Position() {
|
||||
return p;
|
||||
}
|
||||
|
||||
void cWindowSDL::UpdateDesktopResolution() {
|
||||
void WindowSDL::UpdateDesktopResolution() {
|
||||
SDL_DisplayMode dpm;
|
||||
SDL_GetDesktopDisplayMode( SDL_GetWindowDisplayIndex( mSDLWindow ), &dpm );
|
||||
|
||||
mWindow.DesktopResolution = Sizei( dpm.w, dpm.h );
|
||||
}
|
||||
|
||||
const Sizei& cWindowSDL::GetDesktopResolution() {
|
||||
const Sizei& WindowSDL::GetDesktopResolution() {
|
||||
UpdateDesktopResolution();
|
||||
return cWindow::GetDesktopResolution();
|
||||
return Window::GetDesktopResolution();
|
||||
}
|
||||
|
||||
SDL_Window * cWindowSDL::GetSDLWindow() const {
|
||||
SDL_Window * WindowSDL::GetSDLWindow() const {
|
||||
return mSDLWindow;
|
||||
}
|
||||
|
||||
void cWindowSDL::StartTextInput() {
|
||||
void WindowSDL::StartTextInput() {
|
||||
SDL_StartTextInput();
|
||||
}
|
||||
|
||||
bool cWindowSDL::IsTextInputActive() {
|
||||
bool WindowSDL::IsTextInputActive() {
|
||||
return SDL_TRUE == SDL_IsTextInputActive();
|
||||
}
|
||||
|
||||
void cWindowSDL::StopTextInput() {
|
||||
void WindowSDL::StopTextInput() {
|
||||
SDL_StopTextInput();
|
||||
}
|
||||
|
||||
void cWindowSDL::SetTextInputRect( Recti& rect ) {
|
||||
void WindowSDL::SetTextInputRect( Recti& rect ) {
|
||||
SDL_Rect r;
|
||||
|
||||
r.x = rect.Left;
|
||||
@@ -622,36 +622,36 @@ void cWindowSDL::SetTextInputRect( Recti& rect ) {
|
||||
rect.Bottom = rect.Top + r.h;
|
||||
}
|
||||
|
||||
bool cWindowSDL::HasScreenKeyboardSupport() {
|
||||
bool WindowSDL::HasScreenKeyboardSupport() {
|
||||
return SDL_TRUE == SDL_HasScreenKeyboardSupport();
|
||||
}
|
||||
|
||||
bool cWindowSDL::IsScreenKeyboardShown() {
|
||||
bool WindowSDL::IsScreenKeyboardShown() {
|
||||
return SDL_TRUE == SDL_IsScreenKeyboardShown( mSDLWindow );
|
||||
}
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
void * cWindowSDL::GetJNIEnv() {
|
||||
void * WindowSDL::GetJNIEnv() {
|
||||
return SDL_AndroidGetJNIEnv();
|
||||
}
|
||||
|
||||
void * cWindowSDL::GetActivity() {
|
||||
void * WindowSDL::GetActivity() {
|
||||
return SDL_AndroidGetActivity();
|
||||
}
|
||||
|
||||
int cWindowSDL::GetExternalStorageState() {
|
||||
int WindowSDL::GetExternalStorageState() {
|
||||
return SDL_AndroidGetExternalStorageState();
|
||||
}
|
||||
|
||||
std::string cWindowSDL::GetInternalStoragePath() {
|
||||
std::string WindowSDL::GetInternalStoragePath() {
|
||||
return std::string( SDL_AndroidGetInternalStoragePath() );
|
||||
}
|
||||
|
||||
std::string cWindowSDL::GetExternalStoragePath() {
|
||||
std::string WindowSDL::GetExternalStoragePath() {
|
||||
return std::string( SDL_AndroidGetExternalStoragePath() );
|
||||
}
|
||||
|
||||
std::string cWindowSDL::GetApkPath() {
|
||||
std::string WindowSDL::GetApkPath() {
|
||||
return SDL_AndroidGetApkPath();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -17,11 +17,11 @@ namespace EE { namespace System { class Zip; } }
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL2 {
|
||||
|
||||
class EE_API cWindowSDL : public cWindow {
|
||||
class EE_API WindowSDL : public Window {
|
||||
public:
|
||||
cWindowSDL( WindowSettings Settings, ContextSettings Context );
|
||||
WindowSDL( WindowSettings Settings, ContextSettings Context );
|
||||
|
||||
virtual ~cWindowSDL();
|
||||
virtual ~WindowSDL();
|
||||
|
||||
bool Create( WindowSettings Settings, ContextSettings Context );
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SFML {
|
||||
|
||||
ClipboardSFML::ClipboardSFML( cWindow * window ) :
|
||||
ClipboardSFML::ClipboardSFML( EE::Window::Window * window ) :
|
||||
Clipboard( window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ class EE_API ClipboardSFML : public Clipboard {
|
||||
|
||||
void SetText( const std::string& Text );
|
||||
protected:
|
||||
friend class cWindowSFML;
|
||||
friend class WindowSFML;
|
||||
|
||||
ClipboardSFML( Window::cWindow * window );
|
||||
ClipboardSFML( EE::Window::Window * window );
|
||||
|
||||
void Init();
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SFML {
|
||||
|
||||
CursorManagerSFML::CursorManagerSFML( cWindow * window ) :
|
||||
CursorManagerSFML::CursorManagerSFML( EE::Window::Window * window ) :
|
||||
CursorManager( window )
|
||||
{
|
||||
}
|
||||
@@ -59,13 +59,13 @@ void CursorManagerSFML::Hide() {
|
||||
|
||||
void CursorManagerSFML::Visible( bool visible ) {
|
||||
if ( visible ) {
|
||||
reinterpret_cast<cWindowSFML*>(mWindow)->GetSFMLWindow()->setMouseCursorVisible( true );
|
||||
reinterpret_cast<WindowSFML*>(mWindow)->GetSFMLWindow()->setMouseCursorVisible( true );
|
||||
|
||||
mWindow->GetPlatform()->ShowMouseCursor();
|
||||
|
||||
mVisible = true;
|
||||
} else {
|
||||
reinterpret_cast<cWindowSFML*>(mWindow)->GetSFMLWindow()->setMouseCursorVisible( false );
|
||||
reinterpret_cast<WindowSFML*>(mWindow)->GetSFMLWindow()->setMouseCursorVisible( false );
|
||||
|
||||
mWindow->GetPlatform()->HideMouseCursor();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace EE { namespace Window { namespace Backend { namespace SFML {
|
||||
|
||||
class CursorManagerSFML : public CursorManager {
|
||||
public:
|
||||
CursorManagerSFML( Window::cWindow * window );
|
||||
CursorManagerSFML( EE::Window::Window * window );
|
||||
|
||||
Cursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name );
|
||||
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SFML {
|
||||
|
||||
CursorSFML::CursorSFML( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorSFML::CursorSFML( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( tex, hotspot, name, window )
|
||||
{
|
||||
}
|
||||
|
||||
CursorSFML::CursorSFML( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorSFML::CursorSFML( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( img, hotspot, name, window )
|
||||
{
|
||||
}
|
||||
|
||||
CursorSFML::CursorSFML( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorSFML::CursorSFML( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( path, hotspot, name, window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -13,11 +13,11 @@ class CursorSFML : public Cursor {
|
||||
protected:
|
||||
friend class CursorManagerSFML;
|
||||
|
||||
CursorSFML( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorSFML( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorSFML( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorSFML( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorSFML( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorSFML( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
void Create();
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace EE { namespace Window { namespace Backend { namespace SFML {
|
||||
static Uint32 KeyCodesTable[ sf::Keyboard::KeyCount ];
|
||||
static bool KeyCodesTableInit = false;
|
||||
|
||||
InputSFML::InputSFML( cWindow * window ) :
|
||||
InputSFML::InputSFML( EE::Window::Window * window ) :
|
||||
Input( window, eeNew( JoystickManagerSFML, () ) ),
|
||||
mWinActive( true )
|
||||
{
|
||||
@@ -24,7 +24,7 @@ void InputSFML::Update() {
|
||||
sf::Event event;
|
||||
InputEvent EEEvent;
|
||||
|
||||
cWindowSFML * win = reinterpret_cast<cWindowSFML*>( mWindow );
|
||||
WindowSFML * win = reinterpret_cast<WindowSFML*>( mWindow );
|
||||
sf::Window * window = win->GetSFMLWindow();
|
||||
|
||||
CleanStates();
|
||||
@@ -197,7 +197,7 @@ void InputSFML::GrabInput( const bool& Grab ) {
|
||||
}
|
||||
|
||||
void InputSFML::InjectMousePos( const Uint16& x, const Uint16& y ) {
|
||||
cWindowSFML * win = reinterpret_cast<cWindowSFML*>( mWindow );
|
||||
WindowSFML * win = reinterpret_cast<WindowSFML*>( mWindow );
|
||||
sf::Window * window = win->GetSFMLWindow();
|
||||
sf::Mouse::setPosition( sf::Vector2i( x, y ), *window );
|
||||
}
|
||||
|
||||
@@ -23,11 +23,11 @@ class EE_API InputSFML : public Input {
|
||||
|
||||
void InjectMousePos( const Uint16& x, const Uint16& y );
|
||||
protected:
|
||||
friend class cWindowSFML;
|
||||
friend class WindowSFML;
|
||||
|
||||
bool mWinActive;
|
||||
|
||||
InputSFML( Window::cWindow * window );
|
||||
InputSFML( EE::Window::Window * window );
|
||||
|
||||
virtual void Init();
|
||||
|
||||
|
||||
@@ -18,18 +18,18 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SFML {
|
||||
|
||||
cWindowSFML::cWindowSFML( WindowSettings Settings, ContextSettings Context ) :
|
||||
cWindow( Settings, Context, eeNew( ClipboardSFML, ( this ) ), eeNew( InputSFML, ( this ) ), eeNew( CursorManagerSFML, ( this ) ) ),
|
||||
WindowSFML::WindowSFML( WindowSettings Settings, ContextSettings Context ) :
|
||||
Window( Settings, Context, eeNew( ClipboardSFML, ( this ) ), eeNew( InputSFML, ( this ) ), eeNew( CursorManagerSFML, ( this ) ) ),
|
||||
mWinHandler( 0 ),
|
||||
mVisible( false )
|
||||
{
|
||||
Create( Settings, Context );
|
||||
}
|
||||
|
||||
cWindowSFML::~cWindowSFML() {
|
||||
WindowSFML::~WindowSFML() {
|
||||
}
|
||||
|
||||
bool cWindowSFML::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
bool WindowSFML::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
if ( mWindow.Created )
|
||||
return false;
|
||||
|
||||
@@ -92,36 +92,36 @@ bool cWindowSFML::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string cWindowSFML::GetVersion() {
|
||||
std::string WindowSFML::GetVersion() {
|
||||
return std::string( "SFML 2" );
|
||||
}
|
||||
|
||||
void cWindowSFML::CreatePlatform() {
|
||||
void WindowSFML::CreatePlatform() {
|
||||
#if defined( EE_X11_PLATFORM )
|
||||
if ( 0 != GetWindowHandler() ) {
|
||||
mPlatform = eeNew( Platform::cX11Impl, ( this, GetWindowHandler(), mSFMLWindow.getSystemHandle(), mSFMLWindow.getSystemHandle(), NULL, NULL ) );
|
||||
} else {
|
||||
cWindow::CreatePlatform();
|
||||
Window::CreatePlatform();
|
||||
}
|
||||
#elif EE_PLATFORM == EE_PLATFORM_WIN
|
||||
mPlatform = eeNew( Platform::cWinImpl, ( this, GetWindowHandler() ) );
|
||||
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
mPlatform = eeNew( Platform::cOSXImpl, ( this ) );
|
||||
#else
|
||||
cWindow::CreatePlatform();
|
||||
Window::CreatePlatform();
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindowSFML::ToggleFullscreen() {
|
||||
void WindowSFML::ToggleFullscreen() {
|
||||
}
|
||||
|
||||
void cWindowSFML::Caption( const std::string& Caption ) {
|
||||
void WindowSFML::Caption( const std::string& Caption ) {
|
||||
mWindow.WindowConfig.Caption = Caption;
|
||||
|
||||
mSFMLWindow.setTitle( Caption );
|
||||
}
|
||||
|
||||
bool cWindowSFML::Icon( const std::string& Path ) {
|
||||
bool WindowSFML::Icon( const std::string& Path ) {
|
||||
mWindow.WindowConfig.Icon = Path;
|
||||
|
||||
cImage Img( Path );
|
||||
@@ -131,34 +131,34 @@ bool cWindowSFML::Icon( const std::string& Path ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void cWindowSFML::Hide() {
|
||||
void WindowSFML::Hide() {
|
||||
mSFMLWindow.setVisible( false );
|
||||
mVisible = false;
|
||||
}
|
||||
|
||||
void cWindowSFML::Show() {
|
||||
void WindowSFML::Show() {
|
||||
mSFMLWindow.setVisible( true );
|
||||
mVisible = true;
|
||||
}
|
||||
|
||||
void cWindowSFML::Position( Int16 Left, Int16 Top ) {
|
||||
void WindowSFML::Position( Int16 Left, Int16 Top ) {
|
||||
mSFMLWindow.setPosition( sf::Vector2i( Left, Top ) );
|
||||
}
|
||||
|
||||
bool cWindowSFML::Active() {
|
||||
bool WindowSFML::Active() {
|
||||
return reinterpret_cast<InputSFML*> ( mInput )->mWinActive;
|
||||
}
|
||||
|
||||
bool cWindowSFML::Visible() {
|
||||
bool WindowSFML::Visible() {
|
||||
return mVisible;
|
||||
}
|
||||
|
||||
Vector2i cWindowSFML::Position() {
|
||||
Vector2i WindowSFML::Position() {
|
||||
sf::Vector2i v( mSFMLWindow.getPosition() );
|
||||
return Vector2i( v.x, v.y );
|
||||
}
|
||||
|
||||
void cWindowSFML::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
void WindowSFML::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
if ( ( !Width || !Height ) ) {
|
||||
Width = mWindow.DesktopResolution.Width();
|
||||
Height = mWindow.DesktopResolution.Height();
|
||||
@@ -172,7 +172,7 @@ void cWindowSFML::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
mSFMLWindow.setSize( v );
|
||||
}
|
||||
|
||||
void cWindowSFML::VideoResize( Uint32 Width, Uint32 Height ) {
|
||||
void WindowSFML::VideoResize( Uint32 Width, Uint32 Height ) {
|
||||
mWindow.WindowConfig.Width = Width;
|
||||
mWindow.WindowConfig.Height = Height;
|
||||
|
||||
@@ -185,11 +185,11 @@ void cWindowSFML::VideoResize( Uint32 Width, Uint32 Height ) {
|
||||
SendVideoResizeCb();
|
||||
}
|
||||
|
||||
void cWindowSFML::SwapBuffers() {
|
||||
void WindowSFML::SwapBuffers() {
|
||||
mSFMLWindow.display();
|
||||
}
|
||||
|
||||
std::vector<DisplayMode> cWindowSFML::GetDisplayModes() const {
|
||||
std::vector<DisplayMode> WindowSFML::GetDisplayModes() const {
|
||||
std::vector<DisplayMode> result;
|
||||
|
||||
std::vector<sf::VideoMode> modes = sf::VideoMode::getFullscreenModes();
|
||||
@@ -203,17 +203,17 @@ std::vector<DisplayMode> cWindowSFML::GetDisplayModes() const {
|
||||
return result;
|
||||
}
|
||||
|
||||
void cWindowSFML::SetGamma( Float Red, Float Green, Float Blue ) {
|
||||
void WindowSFML::SetGamma( Float Red, Float Green, Float Blue ) {
|
||||
}
|
||||
|
||||
eeWindowContex cWindowSFML::GetContext() const {
|
||||
eeWindowContex WindowSFML::GetContext() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cWindowSFML::GetMainContext() {
|
||||
void WindowSFML::GetMainContext() {
|
||||
}
|
||||
|
||||
eeWindowHandle cWindowSFML::GetWindowHandler() {
|
||||
eeWindowHandle WindowSFML::GetWindowHandler() {
|
||||
#if defined( EE_X11_PLATFORM )
|
||||
if ( 0 == mWinHandler ) {
|
||||
#ifdef EE_SUPPORT_EXCEPTIONS
|
||||
@@ -237,10 +237,10 @@ eeWindowHandle cWindowSFML::GetWindowHandler() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindowSFML::SetDefaultContext() {
|
||||
void WindowSFML::SetDefaultContext() {
|
||||
}
|
||||
|
||||
sf::Window * cWindowSFML::GetSFMLWindow() {
|
||||
sf::Window * WindowSFML::GetSFMLWindow() {
|
||||
return &mSFMLWindow;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SFML {
|
||||
|
||||
class EE_API cWindowSFML : public cWindow {
|
||||
class EE_API WindowSFML : public Window {
|
||||
public:
|
||||
cWindowSFML( WindowSettings Settings, ContextSettings Context );
|
||||
WindowSFML( WindowSettings Settings, ContextSettings Context );
|
||||
|
||||
virtual ~cWindowSFML();
|
||||
virtual ~WindowSFML();
|
||||
|
||||
bool Create( WindowSettings Settings, ContextSettings Context );
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace Null {
|
||||
|
||||
ClipboardNull::ClipboardNull( cWindow * window ) :
|
||||
ClipboardNull::ClipboardNull( EE::Window::Window * window ) :
|
||||
Clipboard( window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@ class EE_API ClipboardNull : public Clipboard {
|
||||
|
||||
void SetText( const std::string& Text );
|
||||
protected:
|
||||
friend class cWindowNull;
|
||||
friend class WindowNull;
|
||||
|
||||
ClipboardNull( Window::cWindow * window );
|
||||
ClipboardNull( EE::Window::Window * window );
|
||||
|
||||
void Init();
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace Null {
|
||||
|
||||
CursorManagerNull::CursorManagerNull( cWindow * window ) :
|
||||
CursorManagerNull::CursorManagerNull( EE::Window::Window * window ) :
|
||||
CursorManager( window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace EE { namespace Window { namespace Backend { namespace Null {
|
||||
|
||||
class CursorManagerNull : public CursorManager {
|
||||
public:
|
||||
CursorManagerNull( Window::cWindow * window );
|
||||
CursorManagerNull( EE::Window::Window * window );
|
||||
|
||||
Cursor * Create( cTexture * tex, const Vector2i& hotspot, const std::string& name );
|
||||
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace Null {
|
||||
|
||||
CursorNull::CursorNull( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorNull::CursorNull( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( tex, hotspot, name, window )
|
||||
{
|
||||
}
|
||||
|
||||
CursorNull::CursorNull( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorNull::CursorNull( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( img, hotspot, name, window )
|
||||
{
|
||||
}
|
||||
|
||||
CursorNull::CursorNull( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorNull::CursorNull( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( path, hotspot, name, window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@ class CursorNull : public Cursor {
|
||||
protected:
|
||||
friend class CursorManagerNull;
|
||||
|
||||
CursorNull( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorNull( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorNull( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorNull( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorNull( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorNull( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
void Create();
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace Null {
|
||||
|
||||
InputNull::InputNull( cWindow * window ) :
|
||||
InputNull::InputNull( EE::Window::Window * window ) :
|
||||
Input( window, eeNew( JoystickManagerNull, () ) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ class EE_API InputNull : public Input {
|
||||
|
||||
void InjectMousePos( const Uint16& x, const Uint16& y );
|
||||
protected:
|
||||
friend class cWindowNull;
|
||||
friend class WindowNull;
|
||||
|
||||
InputNull( Window::cWindow * window );
|
||||
InputNull( EE::Window::Window * window );
|
||||
|
||||
virtual void Init();
|
||||
};
|
||||
|
||||
@@ -5,88 +5,88 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace Null {
|
||||
|
||||
cWindowNull::cWindowNull( WindowSettings Settings, ContextSettings Context ) :
|
||||
cWindow( Settings, Context, eeNew( ClipboardNull, ( this ) ), eeNew( InputNull, ( this ) ), eeNew( CursorManagerNull, ( this ) ) )
|
||||
WindowNull::WindowNull( WindowSettings Settings, ContextSettings Context ) :
|
||||
Window( Settings, Context, eeNew( ClipboardNull, ( this ) ), eeNew( InputNull, ( this ) ), eeNew( CursorManagerNull, ( this ) ) )
|
||||
{
|
||||
Create( Settings, Context );
|
||||
}
|
||||
|
||||
cWindowNull::~cWindowNull() {
|
||||
WindowNull::~WindowNull() {
|
||||
}
|
||||
|
||||
bool cWindowNull::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
bool WindowNull::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void cWindowNull::ToggleFullscreen() {
|
||||
void WindowNull::ToggleFullscreen() {
|
||||
}
|
||||
|
||||
void cWindowNull::Caption( const std::string& Caption ) {
|
||||
void WindowNull::Caption( const std::string& Caption ) {
|
||||
}
|
||||
|
||||
std::string cWindowNull::Caption() {
|
||||
std::string WindowNull::Caption() {
|
||||
return std::string();
|
||||
}
|
||||
|
||||
bool cWindowNull::Icon( const std::string& Path ) {
|
||||
bool WindowNull::Icon( const std::string& Path ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void cWindowNull::Minimize() {
|
||||
void WindowNull::Minimize() {
|
||||
}
|
||||
|
||||
void cWindowNull::Maximize() {
|
||||
void WindowNull::Maximize() {
|
||||
}
|
||||
|
||||
void cWindowNull::Hide() {
|
||||
void WindowNull::Hide() {
|
||||
}
|
||||
|
||||
void cWindowNull::Raise() {
|
||||
void WindowNull::Raise() {
|
||||
}
|
||||
|
||||
void cWindowNull::Show() {
|
||||
void WindowNull::Show() {
|
||||
}
|
||||
|
||||
void cWindowNull::Position( Int16 Left, Int16 Top ) {
|
||||
void WindowNull::Position( Int16 Left, Int16 Top ) {
|
||||
}
|
||||
|
||||
bool cWindowNull::Active() {
|
||||
bool WindowNull::Active() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cWindowNull::Visible() {
|
||||
bool WindowNull::Visible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
Vector2i cWindowNull::Position() {
|
||||
Vector2i WindowNull::Position() {
|
||||
return Vector2i();
|
||||
}
|
||||
|
||||
void cWindowNull::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
void WindowNull::Size( Uint32 Width, Uint32 Height, bool Windowed ) {
|
||||
}
|
||||
|
||||
void cWindowNull::SwapBuffers() {
|
||||
void WindowNull::SwapBuffers() {
|
||||
}
|
||||
|
||||
std::vector<DisplayMode> cWindowNull::GetDisplayModes() const {
|
||||
std::vector<DisplayMode> WindowNull::GetDisplayModes() const {
|
||||
return std::vector<DisplayMode>();
|
||||
}
|
||||
|
||||
void cWindowNull::SetGamma( Float Red, Float Green, Float Blue ) {
|
||||
void WindowNull::SetGamma( Float Red, Float Green, Float Blue ) {
|
||||
}
|
||||
|
||||
eeWindowContex cWindowNull::GetContext() const {
|
||||
eeWindowContex WindowNull::GetContext() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cWindowNull::GetMainContext() {
|
||||
void WindowNull::GetMainContext() {
|
||||
}
|
||||
|
||||
eeWindowHandle cWindowNull::GetWindowHandler() {
|
||||
eeWindowHandle WindowNull::GetWindowHandler() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cWindowNull::SetDefaultContext() {
|
||||
void WindowNull::SetDefaultContext() {
|
||||
}
|
||||
|
||||
}}}}
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace Null {
|
||||
|
||||
class EE_API cWindowNull : public cWindow {
|
||||
class EE_API WindowNull : public Window {
|
||||
public:
|
||||
cWindowNull( WindowSettings Settings, ContextSettings Context );
|
||||
WindowNull( WindowSettings Settings, ContextSettings Context );
|
||||
|
||||
virtual ~cWindowNull();
|
||||
virtual ~WindowNull();
|
||||
|
||||
bool Create( WindowSettings Settings, ContextSettings Context );
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
namespace EE { namespace Window {
|
||||
|
||||
Clipboard::Clipboard( cWindow * window ) :
|
||||
Clipboard::Clipboard( EE::Window::Window * window ) :
|
||||
mWindow( window )
|
||||
{}
|
||||
|
||||
Clipboard::~Clipboard() {}
|
||||
|
||||
cWindow * Clipboard::GetWindow() const {
|
||||
EE::Window::Window * Clipboard::GetWindow() const {
|
||||
return mWindow;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace EE { namespace Window {
|
||||
|
||||
Cursor::Cursor( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
Cursor::Cursor( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
mId( String::Hash( name ) ),
|
||||
mName( name ),
|
||||
mImage( NULL ),
|
||||
@@ -18,7 +18,7 @@ Cursor::Cursor( cTexture * tex, const Vector2i& hotspot, const std::string& name
|
||||
}
|
||||
}
|
||||
|
||||
Cursor::Cursor( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
Cursor::Cursor( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
mId( String::Hash( name ) ),
|
||||
mName( name ),
|
||||
mImage( NULL ),
|
||||
@@ -32,7 +32,7 @@ Cursor::Cursor( cImage * img, const Vector2i& hotspot, const std::string& name,
|
||||
}
|
||||
}
|
||||
|
||||
Cursor::Cursor( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
Cursor::Cursor( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
mId( String::Hash( name ) ),
|
||||
mName( name ),
|
||||
mImage( NULL ),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace EE { namespace Window {
|
||||
|
||||
CursorManager::CursorManager( cWindow * window ) :
|
||||
CursorManager::CursorManager( EE::Window::Window * window ) :
|
||||
mWindow( window ),
|
||||
mCurrent( NULL ),
|
||||
mSysCursor( SYS_CURSOR_NONE ),
|
||||
|
||||
@@ -85,7 +85,7 @@ Engine::~Engine() {
|
||||
}
|
||||
|
||||
void Engine::Destroy() {
|
||||
std::list<cWindow*>::iterator it;
|
||||
std::list<Window*>::iterator it;
|
||||
|
||||
for ( it = mWindows.begin(); it != mWindows.end(); it++ ) {
|
||||
eeSAFE_DELETE( *it );
|
||||
@@ -118,44 +118,44 @@ Backend::WindowBackend * Engine::CreateSFMLBackend( const WindowSettings &Settin
|
||||
#endif
|
||||
}
|
||||
|
||||
cWindow * Engine::CreateSDLWindow( const WindowSettings& Settings, const ContextSettings& Context ) {
|
||||
EE::Window::Window * Engine::CreateSDLWindow( const WindowSettings& Settings, const ContextSettings& Context ) {
|
||||
#if defined( EE_SDL_VERSION_1_2 )
|
||||
if ( NULL == mBackend ) {
|
||||
mBackend = CreateSDLBackend( Settings );
|
||||
}
|
||||
|
||||
return eeNew( Backend::SDL::cWindowSDL, ( Settings, Context ) );
|
||||
return eeNew( Backend::SDL::WindowSDL, ( Settings, Context ) );
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
cWindow * Engine::CreateSDL2Window( const WindowSettings& Settings, const ContextSettings& Context ) {
|
||||
EE::Window::Window * Engine::CreateSDL2Window( const WindowSettings& Settings, const ContextSettings& Context ) {
|
||||
#if defined( EE_SDL_VERSION_2 )
|
||||
if ( NULL == mBackend ) {
|
||||
mBackend = CreateSDL2Backend( Settings );
|
||||
}
|
||||
|
||||
return eeNew( Backend::SDL2::cWindowSDL, ( Settings, Context ) );
|
||||
return eeNew( Backend::SDL2::WindowSDL, ( Settings, Context ) );
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
cWindow * Engine::CreateSFMLWindow( const WindowSettings& Settings, const ContextSettings& Context ) {
|
||||
EE::Window::Window * Engine::CreateSFMLWindow( const WindowSettings& Settings, const ContextSettings& Context ) {
|
||||
#if defined( EE_BACKEND_SFML_ACTIVE )
|
||||
|
||||
if ( NULL == mBackend ) {
|
||||
mBackend = CreateSFMLBackend( Settings );
|
||||
}
|
||||
|
||||
return eeNew( Backend::SFML::cWindowSFML, ( Settings, Context ) );
|
||||
return eeNew( Backend::SFML::WindowSFML, ( Settings, Context ) );
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
cWindow * Engine::CreateDefaultWindow( const WindowSettings& Settings, const ContextSettings& Context ) {
|
||||
EE::Window::Window * Engine::CreateDefaultWindow( const WindowSettings& Settings, const ContextSettings& Context ) {
|
||||
#if DEFAULT_BACKEND == BACKEND_SDL
|
||||
return CreateSDLWindow( Settings, Context );
|
||||
#elif DEFAULT_BACKEND == BACKEND_SDL2
|
||||
@@ -165,8 +165,8 @@ cWindow * Engine::CreateDefaultWindow( const WindowSettings& Settings, const Con
|
||||
#endif
|
||||
}
|
||||
|
||||
cWindow * Engine::CreateWindow( WindowSettings Settings, ContextSettings Context ) {
|
||||
cWindow * window = NULL;
|
||||
EE::Window::Window * Engine::CreateWindow( WindowSettings Settings, ContextSettings Context ) {
|
||||
EE::Window::Window * window = NULL;
|
||||
|
||||
if ( NULL != mWindow ) {
|
||||
Settings.Backend = mWindow->GetWindowInfo()->WindowConfig.Backend;
|
||||
@@ -195,7 +195,7 @@ cWindow * Engine::CreateWindow( WindowSettings Settings, ContextSettings Context
|
||||
return window;
|
||||
}
|
||||
|
||||
void Engine::DestroyWindow( cWindow * window ) {
|
||||
void Engine::DestroyWindow( EE::Window::Window * window ) {
|
||||
mWindows.remove( window );
|
||||
|
||||
if ( window == mWindow ) {
|
||||
@@ -209,8 +209,8 @@ void Engine::DestroyWindow( cWindow * window ) {
|
||||
eeSAFE_DELETE( window );
|
||||
}
|
||||
|
||||
bool Engine::ExistsWindow( cWindow * window ) {
|
||||
std::list<cWindow*>::iterator it;
|
||||
bool Engine::ExistsWindow( EE::Window::Window * window ) {
|
||||
std::list<Window*>::iterator it;
|
||||
|
||||
for ( it = mWindows.begin(); it != mWindows.end(); it++ ) {
|
||||
if ( (*it) == window )
|
||||
@@ -220,11 +220,11 @@ bool Engine::ExistsWindow( cWindow * window ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
cWindow * Engine::GetCurrentWindow() const {
|
||||
EE::Window::Window * Engine::GetCurrentWindow() const {
|
||||
return mWindow;
|
||||
}
|
||||
|
||||
void Engine::SetCurrentWindow( cWindow * window ) {
|
||||
void Engine::SetCurrentWindow( EE::Window::Window * window ) {
|
||||
if ( NULL != window && window != mWindow ) {
|
||||
mWindow = window;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
namespace EE { namespace Window {
|
||||
|
||||
Input::Input( cWindow * window, JoystickManager * joystickmanager ) :
|
||||
Input::Input( EE::Window::Window * window, JoystickManager * joystickmanager ) :
|
||||
mWindow( window ),
|
||||
mJoystickManager( joystickmanager ),
|
||||
mPressTrigger(0), mReleaseTrigger(0), mLastPressTrigger(0), mClickTrigger(0), mDoubleClickTrigger(0), mInputMod(0),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
namespace EE { namespace Window {
|
||||
|
||||
InputTextBuffer::InputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, Window::cWindow * window, const Uint32& maxLength ) :
|
||||
InputTextBuffer::InputTextBuffer( const bool& active, const bool& supportNewLine, const bool& supportFreeEditing, EE::Window::Window * window, const Uint32& maxLength ) :
|
||||
mWindow( window ),
|
||||
mFlags(0),
|
||||
mCallback(0),
|
||||
@@ -30,7 +30,7 @@ InputTextBuffer::InputTextBuffer( const bool& active, const bool& supportNewLine
|
||||
mMaxLength = maxLength;
|
||||
}
|
||||
|
||||
InputTextBuffer::InputTextBuffer( cWindow * window ) :
|
||||
InputTextBuffer::InputTextBuffer( EE::Window::Window * window ) :
|
||||
mWindow( window ),
|
||||
mFlags(0),
|
||||
mCallback(0),
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Platform {
|
||||
|
||||
PlatformImpl::PlatformImpl( cWindow * window ) :
|
||||
PlatformImpl::PlatformImpl( EE::Window::Window * window ) :
|
||||
mWindow( window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -34,17 +34,17 @@
|
||||
|
||||
namespace EE { namespace Window {
|
||||
|
||||
cWindow::cFrameData::cFrameData() :
|
||||
Window::FrameData::FrameData() :
|
||||
FrameElapsed(NULL),
|
||||
ElapsedTime()
|
||||
{}
|
||||
|
||||
cWindow::cFrameData::~cFrameData()
|
||||
Window::FrameData::~FrameData()
|
||||
{
|
||||
eeSAFE_DELETE( FrameElapsed );
|
||||
}
|
||||
|
||||
cWindow::cWindow( WindowSettings Settings, ContextSettings Context, Clipboard * Clipboard, Input * Input, CursorManager * CursorManager ) :
|
||||
Window::Window( WindowSettings Settings, ContextSettings Context, Clipboard * Clipboard, Input * Input, CursorManager * CursorManager ) :
|
||||
mClipboard( Clipboard ),
|
||||
mInput( Input ),
|
||||
mCursorManager( CursorManager ),
|
||||
@@ -55,42 +55,42 @@ cWindow::cWindow( WindowSettings Settings, ContextSettings Context, Clipboard *
|
||||
mWindow.ContextConfig = Context;
|
||||
}
|
||||
|
||||
cWindow::~cWindow() {
|
||||
Window::~Window() {
|
||||
eeSAFE_DELETE( mClipboard );
|
||||
eeSAFE_DELETE( mInput );
|
||||
eeSAFE_DELETE( mCursorManager );
|
||||
eeSAFE_DELETE( mPlatform );
|
||||
}
|
||||
|
||||
Sizei cWindow::Size() {
|
||||
Sizei Window::Size() {
|
||||
return Sizei( mWindow.WindowConfig.Width, mWindow.WindowConfig.Height );
|
||||
}
|
||||
|
||||
const Uint32& cWindow::GetWidth() const {
|
||||
const Uint32& Window::GetWidth() const {
|
||||
return mWindow.WindowConfig.Width;
|
||||
}
|
||||
|
||||
const Uint32& cWindow::GetHeight() const {
|
||||
const Uint32& Window::GetHeight() const {
|
||||
return mWindow.WindowConfig.Height;
|
||||
}
|
||||
|
||||
const Sizei& cWindow::GetDesktopResolution() {
|
||||
const Sizei& Window::GetDesktopResolution() {
|
||||
return mWindow.DesktopResolution;
|
||||
}
|
||||
|
||||
void cWindow::Size( Uint32 Width, Uint32 Height ) {
|
||||
void Window::Size( Uint32 Width, Uint32 Height ) {
|
||||
Size( Width, Height, Windowed() );
|
||||
}
|
||||
|
||||
bool cWindow::Windowed() const {
|
||||
bool Window::Windowed() const {
|
||||
return 0 != !( mWindow.WindowConfig.Style & WindowStyle::Fullscreen );
|
||||
}
|
||||
|
||||
bool cWindow::Resizeable() const {
|
||||
bool Window::Resizeable() const {
|
||||
return 0 != ( mWindow.WindowConfig.Style & WindowStyle::Resize );
|
||||
}
|
||||
|
||||
void cWindow::Set2DProjection( const Uint32& Width, const Uint32& Height ) {
|
||||
void Window::Set2DProjection( const Uint32& Width, const Uint32& Height ) {
|
||||
GLi->MatrixMode( GL_PROJECTION );
|
||||
GLi->LoadIdentity();
|
||||
|
||||
@@ -100,7 +100,7 @@ void cWindow::Set2DProjection( const Uint32& Width, const Uint32& Height ) {
|
||||
GLi->LoadIdentity();
|
||||
}
|
||||
|
||||
void cWindow::SetViewport( const Int32& x, const Int32& y, const Uint32& Width, const Uint32& Height, const bool& UpdateProjectionMatrix ) {
|
||||
void Window::SetViewport( const Int32& x, const Int32& y, const Uint32& Width, const Uint32& Height, const bool& UpdateProjectionMatrix ) {
|
||||
GLi->Viewport( x, GetHeight() - ( y + Height ), Width, Height );
|
||||
|
||||
if ( UpdateProjectionMatrix ) {
|
||||
@@ -108,27 +108,27 @@ void cWindow::SetViewport( const Int32& x, const Int32& y, const Uint32& Width,
|
||||
}
|
||||
}
|
||||
|
||||
void cWindow::SetView( const View& View ) {
|
||||
void Window::SetView( const View& View ) {
|
||||
mCurrentView = &View;
|
||||
|
||||
Recti RView = mCurrentView->GetView();
|
||||
SetViewport( RView.Left, RView.Top, RView.Right, RView.Bottom );
|
||||
}
|
||||
|
||||
const View& cWindow::GetDefaultView() const {
|
||||
const View& Window::GetDefaultView() const {
|
||||
return mDefaultView;
|
||||
}
|
||||
|
||||
const View& cWindow::GetView() const {
|
||||
const View& Window::GetView() const {
|
||||
return *mCurrentView;
|
||||
}
|
||||
|
||||
void cWindow::CreateView() {
|
||||
void Window::CreateView() {
|
||||
mDefaultView.SetView( 0, 0, mWindow.WindowConfig.Width, mWindow.WindowConfig.Height );
|
||||
mCurrentView = &mDefaultView;
|
||||
}
|
||||
|
||||
void cWindow::Setup2D( const bool& KeepView ) {
|
||||
void Window::Setup2D( const bool& KeepView ) {
|
||||
GLi->PixelStorei( GL_UNPACK_ALIGNMENT, 1 );
|
||||
GLi->PixelStorei( GL_PACK_ALIGNMENT, 1 );
|
||||
|
||||
@@ -165,20 +165,20 @@ void cWindow::Setup2D( const bool& KeepView ) {
|
||||
}
|
||||
}
|
||||
|
||||
const WindowInfo * cWindow::GetWindowInfo() const {
|
||||
const WindowInfo * Window::GetWindowInfo() const {
|
||||
return &mWindow;
|
||||
}
|
||||
|
||||
void cWindow::BackColor( const RGB& Color ) {
|
||||
void Window::BackColor( const RGB& Color ) {
|
||||
mWindow.BackgroundColor = Color;
|
||||
GLi->ClearColor( static_cast<Float>( mWindow.BackgroundColor.R() ) / 255.0f, static_cast<Float>( mWindow.BackgroundColor.G() ) / 255.0f, static_cast<Float>( mWindow.BackgroundColor.B() ) / 255.0f, 255.0f );
|
||||
}
|
||||
|
||||
const RGB& cWindow::BackColor() const {
|
||||
const RGB& Window::BackColor() const {
|
||||
return mWindow.BackgroundColor;
|
||||
}
|
||||
|
||||
bool cWindow::TakeScreenshot( std::string filepath, const EE_SAVE_TYPE& Format ) {
|
||||
bool Window::TakeScreenshot( std::string filepath, const EE_SAVE_TYPE& Format ) {
|
||||
cGlobalBatchRenderer::instance()->Draw();
|
||||
|
||||
bool CreateNewFile = false;
|
||||
@@ -228,35 +228,35 @@ bool cWindow::TakeScreenshot( std::string filepath, const EE_SAVE_TYPE& Format )
|
||||
}
|
||||
}
|
||||
|
||||
bool cWindow::Running() const {
|
||||
bool Window::Running() const {
|
||||
return mWindow.Created;
|
||||
}
|
||||
|
||||
bool cWindow::Created() const {
|
||||
bool Window::Created() const {
|
||||
return mWindow.Created;
|
||||
}
|
||||
|
||||
void cWindow::Close() {
|
||||
void Window::Close() {
|
||||
mWindow.Created = false;
|
||||
}
|
||||
|
||||
void cWindow::FrameRateLimit( const Uint32& FrameRateLimit ) {
|
||||
void Window::FrameRateLimit( const Uint32& FrameRateLimit ) {
|
||||
mFrameData.FPS.Limit = (Float)FrameRateLimit;
|
||||
}
|
||||
|
||||
Uint32 cWindow::FrameRateLimit() {
|
||||
Uint32 Window::FrameRateLimit() {
|
||||
return static_cast<Uint32>( mFrameData.FPS.Limit );
|
||||
}
|
||||
|
||||
Uint32 cWindow::FPS() const {
|
||||
Uint32 Window::FPS() const {
|
||||
return mFrameData.FPS.Current;
|
||||
}
|
||||
|
||||
Time cWindow::Elapsed() const {
|
||||
Time Window::Elapsed() const {
|
||||
return mFrameData.ElapsedTime;
|
||||
}
|
||||
|
||||
void cWindow::GetElapsedTime() {
|
||||
void Window::GetElapsedTime() {
|
||||
if ( NULL == mFrameData.FrameElapsed ) {
|
||||
mFrameData.FrameElapsed = eeNew( Clock, () );
|
||||
}
|
||||
@@ -264,7 +264,7 @@ void cWindow::GetElapsedTime() {
|
||||
mFrameData.ElapsedTime = mFrameData.FrameElapsed->Elapsed();
|
||||
}
|
||||
|
||||
void cWindow::CalculateFps() {
|
||||
void Window::CalculateFps() {
|
||||
if ( Sys::GetTicks() - mFrameData.FPS.LastCheck >= 1000 ) {
|
||||
mFrameData.FPS.Current = mFrameData.FPS.Count;
|
||||
mFrameData.FPS.Count = 0;
|
||||
@@ -274,7 +274,7 @@ void cWindow::CalculateFps() {
|
||||
mFrameData.FPS.Count++;
|
||||
}
|
||||
|
||||
void cWindow::LimitFps() {
|
||||
void Window::LimitFps() {
|
||||
if ( mFrameData.FPS.Limit > 0 ) {
|
||||
mFrameData.FPS.Error = 0;
|
||||
double RemainT = 1000.0 / mFrameData.FPS.Limit - ( mFrameData.ElapsedTime.AsMilliseconds() * 0.1f );
|
||||
@@ -296,17 +296,17 @@ void cWindow::LimitFps() {
|
||||
}
|
||||
}
|
||||
|
||||
void cWindow::ViewCheckUpdate() {
|
||||
void Window::ViewCheckUpdate() {
|
||||
if ( mCurrentView->NeedUpdate() ) {
|
||||
SetView( *mCurrentView );
|
||||
}
|
||||
}
|
||||
|
||||
void cWindow::Clear() {
|
||||
void Window::Clear() {
|
||||
GLi->Clear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
|
||||
}
|
||||
|
||||
void cWindow::Display( bool clear ) {
|
||||
void Window::Display( bool clear ) {
|
||||
cGlobalBatchRenderer::instance()->Draw();
|
||||
|
||||
if ( mCurrentView->NeedUpdate() )
|
||||
@@ -326,57 +326,57 @@ void cWindow::Display( bool clear ) {
|
||||
LimitFps();
|
||||
}
|
||||
|
||||
void cWindow::ClipEnable( const Int32& x, const Int32& y, const Uint32& Width, const Uint32& Height ) {
|
||||
void Window::ClipEnable( const Int32& x, const Int32& y, const Uint32& Width, const Uint32& Height ) {
|
||||
cGlobalBatchRenderer::instance()->Draw();
|
||||
GLi->Scissor( x, GetHeight() - ( y + Height ), Width, Height );
|
||||
GLi->Enable( GL_SCISSOR_TEST );
|
||||
}
|
||||
|
||||
void cWindow::ClipDisable() {
|
||||
void Window::ClipDisable() {
|
||||
cGlobalBatchRenderer::instance()->Draw();
|
||||
GLi->Disable( GL_SCISSOR_TEST );
|
||||
}
|
||||
|
||||
void cWindow::ClipPlaneEnable( const Int32& x, const Int32& y, const Int32& Width, const Int32& Height ) {
|
||||
void Window::ClipPlaneEnable( const Int32& x, const Int32& y, const Int32& Width, const Int32& Height ) {
|
||||
cGlobalBatchRenderer::instance()->Draw();
|
||||
GLi->Clip2DPlaneEnable( x, y, Width, Height );
|
||||
}
|
||||
|
||||
void cWindow::ClipPlaneDisable() {
|
||||
void Window::ClipPlaneDisable() {
|
||||
cGlobalBatchRenderer::instance()->Draw();
|
||||
GLi->Clip2DPlaneDisable();
|
||||
}
|
||||
|
||||
Clipboard * cWindow::GetClipboard() const {
|
||||
Clipboard * Window::GetClipboard() const {
|
||||
return mClipboard;
|
||||
}
|
||||
|
||||
Input * cWindow::GetInput() const {
|
||||
Input * Window::GetInput() const {
|
||||
return mInput;
|
||||
}
|
||||
|
||||
CursorManager * cWindow::GetCursorManager() const {
|
||||
CursorManager * Window::GetCursorManager() const {
|
||||
return mCursorManager;
|
||||
}
|
||||
|
||||
Uint32 cWindow::PushResizeCallback( const WindowResizeCallback& cb ) {
|
||||
Uint32 Window::PushResizeCallback( const WindowResizeCallback& cb ) {
|
||||
mNumCallBacks++;
|
||||
mCallbacks[ mNumCallBacks ] = cb;
|
||||
return mNumCallBacks;
|
||||
}
|
||||
|
||||
void cWindow::PopResizeCallback( const Uint32& CallbackId ) {
|
||||
void Window::PopResizeCallback( const Uint32& CallbackId ) {
|
||||
mCallbacks[ CallbackId ] = 0;
|
||||
mCallbacks.erase( mCallbacks.find(CallbackId) );
|
||||
}
|
||||
|
||||
void cWindow::SendVideoResizeCb() {
|
||||
void Window::SendVideoResizeCb() {
|
||||
for ( std::map<Uint32, WindowResizeCallback>::iterator i = mCallbacks.begin(); i != mCallbacks.end(); i++ ) {
|
||||
i->second( this );
|
||||
}
|
||||
}
|
||||
|
||||
void cWindow::LogSuccessfulInit(const std::string& BackendName , const std::string&ProcessPath ) {
|
||||
void Window::LogSuccessfulInit(const std::string& BackendName , const std::string&ProcessPath ) {
|
||||
std::string msg( "Engine Initialized Succesfully.\n\tVersion: " + Version::GetVersionName() + " (codename: \"" + Version::GetCodename() + "\")" +
|
||||
"\n\tOS: " + Sys::GetOSName() +
|
||||
"\n\tArch: " + Sys::GetOSArchitecture() +
|
||||
@@ -400,15 +400,15 @@ void cWindow::LogSuccessfulInit(const std::string& BackendName , const std::stri
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindow::LogFailureInit( const std::string& ClassName, const std::string& BackendName ) {
|
||||
void Window::LogFailureInit( const std::string& ClassName, const std::string& BackendName ) {
|
||||
eePRINTL( "Error on %s::Init. Backend %s failed to start.", ClassName.c_str(), BackendName.c_str() );
|
||||
}
|
||||
|
||||
std::string cWindow::Caption() {
|
||||
std::string Window::Caption() {
|
||||
return mWindow.WindowConfig.Caption;
|
||||
}
|
||||
|
||||
eeWindowContex cWindow::GetContext() const {
|
||||
eeWindowContex Window::GetContext() const {
|
||||
#if defined( EE_GLEW_AVAILABLE ) && ( EE_PLATFORM == EE_PLATFORM_WIN || defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_MACOSX )
|
||||
return mWindow.Context;
|
||||
#else
|
||||
@@ -416,119 +416,119 @@ eeWindowContex cWindow::GetContext() const {
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindow::GetMainContext() {
|
||||
void Window::GetMainContext() {
|
||||
#ifdef EE_GLEW_AVAILABLE
|
||||
if ( NULL != mPlatform )
|
||||
mWindow.Context = mPlatform->GetWindowContext();
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindow::SetDefaultContext() {
|
||||
void Window::SetDefaultContext() {
|
||||
#if defined( EE_GLEW_AVAILABLE ) && ( EE_PLATFORM == EE_PLATFORM_WIN || defined( EE_X11_PLATFORM ) )
|
||||
SetCurrentContext( mWindow.Context );
|
||||
#endif
|
||||
}
|
||||
|
||||
void cWindow::Minimize() {
|
||||
void Window::Minimize() {
|
||||
if ( NULL != mPlatform )
|
||||
mPlatform->MinimizeWindow();
|
||||
}
|
||||
|
||||
void cWindow::Maximize() {
|
||||
void Window::Maximize() {
|
||||
if ( NULL != mPlatform )
|
||||
mPlatform->MaximizeWindow();
|
||||
}
|
||||
|
||||
bool cWindow::IsMaximized() {
|
||||
bool Window::IsMaximized() {
|
||||
if ( NULL != mPlatform )
|
||||
return mPlatform->IsWindowMaximized();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void cWindow::Hide() {
|
||||
void Window::Hide() {
|
||||
if ( NULL != mPlatform )
|
||||
mPlatform->HideWindow();
|
||||
}
|
||||
|
||||
void cWindow::Raise() {
|
||||
void Window::Raise() {
|
||||
if ( NULL != mPlatform )
|
||||
mPlatform->RaiseWindow();
|
||||
}
|
||||
|
||||
void cWindow::Show() {
|
||||
void Window::Show() {
|
||||
if ( NULL != mPlatform )
|
||||
mPlatform->ShowWindow();
|
||||
}
|
||||
|
||||
void cWindow::Position( Int16 Left, Int16 Top ) {
|
||||
void Window::Position( Int16 Left, Int16 Top ) {
|
||||
if ( NULL != mPlatform )
|
||||
mPlatform->MoveWindow( Left, Top );
|
||||
}
|
||||
|
||||
Vector2i cWindow::Position() {
|
||||
Vector2i Window::Position() {
|
||||
if ( NULL != mPlatform )
|
||||
return mPlatform->Position();
|
||||
|
||||
return Vector2i();
|
||||
}
|
||||
|
||||
void cWindow::SetCurrentContext( eeWindowContex Context ) {
|
||||
void Window::SetCurrentContext( eeWindowContex Context ) {
|
||||
if ( NULL != mPlatform )
|
||||
mPlatform->SetContext( Context );
|
||||
}
|
||||
|
||||
void cWindow::CreatePlatform() {
|
||||
void Window::CreatePlatform() {
|
||||
eeSAFE_DELETE( mPlatform );
|
||||
mPlatform = eeNew( Platform::cNullImpl, ( this ) );
|
||||
}
|
||||
|
||||
void cWindow::SetCurrent() {
|
||||
void Window::SetCurrent() {
|
||||
}
|
||||
|
||||
void cWindow::Center() {
|
||||
void Window::Center() {
|
||||
if ( Windowed() ) {
|
||||
Position( mWindow.DesktopResolution.Width() / 2 - mWindow.WindowConfig.Width / 2, mWindow.DesktopResolution.Height() / 2 - mWindow.WindowConfig.Height / 2 );
|
||||
}
|
||||
}
|
||||
|
||||
Platform::PlatformImpl * cWindow::GetPlatform() const {
|
||||
Platform::PlatformImpl * Window::GetPlatform() const {
|
||||
return mPlatform;
|
||||
}
|
||||
|
||||
void cWindow::StartTextInput() {
|
||||
void Window::StartTextInput() {
|
||||
}
|
||||
|
||||
bool cWindow::IsTextInputActive() {
|
||||
bool Window::IsTextInputActive() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void cWindow::StopTextInput() {
|
||||
void Window::StopTextInput() {
|
||||
}
|
||||
|
||||
void cWindow::SetTextInputRect( Recti& rect ) {
|
||||
void Window::SetTextInputRect( Recti& rect ) {
|
||||
}
|
||||
|
||||
bool cWindow::HasScreenKeyboardSupport()
|
||||
bool Window::HasScreenKeyboardSupport()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cWindow::IsScreenKeyboardShown() {
|
||||
bool Window::IsScreenKeyboardShown() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cWindow::IsThreadedGLContext() {
|
||||
bool Window::IsThreadedGLContext() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void cWindow::SetGLContextThread() {
|
||||
void Window::SetGLContextThread() {
|
||||
}
|
||||
|
||||
void cWindow::UnsetGLContextThread() {
|
||||
void Window::UnsetGLContextThread() {
|
||||
}
|
||||
|
||||
void cWindow::RunMainLoop( void (*func)(), int fps ) {
|
||||
void Window::RunMainLoop( void (*func)(), int fps ) {
|
||||
#if EE_PLATFORM == EE_PLATFORM_EMSCRIPTEN
|
||||
emscripten_set_main_loop(func, fps, 1);
|
||||
#else
|
||||
@@ -541,27 +541,27 @@ void cWindow::RunMainLoop( void (*func)(), int fps ) {
|
||||
}
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_ANDROID
|
||||
void * cWindow::GetJNIEnv() {
|
||||
void * Window::GetJNIEnv() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void * cWindow::GetActivity() {
|
||||
void * Window::GetActivity() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int cWindow::GetExternalStorageState() {
|
||||
int Window::GetExternalStorageState() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string cWindow::GetInternalStoragePath() {
|
||||
std::string Window::GetInternalStoragePath() {
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::string cWindow::GetExternalStoragePath() {
|
||||
std::string Window::GetExternalStoragePath() {
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
std::string cWindow::GetApkPath() {
|
||||
std::string Window::GetApkPath() {
|
||||
return std::string("");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Platform {
|
||||
|
||||
cNullImpl::cNullImpl( cWindow * window ) :
|
||||
cNullImpl::cNullImpl( EE::Window::Window * window ) :
|
||||
PlatformImpl( window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ using namespace EE::Window;
|
||||
|
||||
class cNullImpl : public PlatformImpl {
|
||||
public:
|
||||
cNullImpl( Window::cWindow * window );
|
||||
cNullImpl( EE::Window::Window * window );
|
||||
|
||||
~cNullImpl();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Platform {
|
||||
|
||||
cOSXImpl::cOSXImpl( cWindow * window ) :
|
||||
cOSXImpl::cOSXImpl( EE::Window::Window * window ) :
|
||||
PlatformImpl( window )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ using namespace EE::Window;
|
||||
|
||||
class cOSXImpl : public PlatformImpl {
|
||||
public:
|
||||
cOSXImpl( Window::cWindow * window );
|
||||
cOSXImpl( EE::Window::Window * window );
|
||||
|
||||
~cOSXImpl();
|
||||
|
||||
|
||||
@@ -14,19 +14,19 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Platform {
|
||||
|
||||
CursorWin::CursorWin( cTexture * tex, const Vector2i& hotspot, const std::string& name, cWindow * window ) :
|
||||
CursorWin::CursorWin( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( tex, hotspot, name, window )
|
||||
{
|
||||
Create();
|
||||
}
|
||||
|
||||
CursorWin::CursorWin( cImage * img, const Vector2i& hotspot, const std::string& name, cWindow * window ) :
|
||||
CursorWin::CursorWin( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( img, hotspot, name, window )
|
||||
{
|
||||
Create();
|
||||
}
|
||||
|
||||
CursorWin::CursorWin( const std::string& path, const Vector2i& hotspot, const std::string& name, cWindow * window ) :
|
||||
CursorWin::CursorWin( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( path, hotspot, name, window )
|
||||
{
|
||||
Create();
|
||||
|
||||
@@ -19,11 +19,11 @@ class CursorWin : public Cursor {
|
||||
|
||||
void * mCursor;
|
||||
|
||||
CursorWin( cTexture * tex, const Vector2i& hotspot, const std::string& name, cWindow * window );
|
||||
CursorWin( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorWin( cImage * img, const Vector2i& hotspot, const std::string& name, cWindow * window );
|
||||
CursorWin( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorWin( const std::string& path, const Vector2i& hotspot, const std::string& name, cWindow * window );
|
||||
CursorWin( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
~CursorWin();
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ static HCURSOR GetLoadCursor( const EE_SYSTEM_CURSOR& cursor, LPCSTR syscur ) {
|
||||
return SYS_CURSORS[ cursor ];
|
||||
}
|
||||
|
||||
cWinImpl::cWinImpl( cWindow * window, eeWindowHandle handler ) :
|
||||
cWinImpl::cWinImpl( EE::Window::Window * window, eeWindowHandle handler ) :
|
||||
PlatformImpl( window ),
|
||||
mHandler( handler ),
|
||||
mCursorCurrent( NULL ),
|
||||
|
||||
@@ -13,7 +13,7 @@ using namespace EE::Window;
|
||||
|
||||
class cWinImpl : public PlatformImpl {
|
||||
public:
|
||||
cWinImpl( Window::cWindow * window, eeWindowHandle handler );
|
||||
cWinImpl( EE::Window::Window * window, eeWindowHandle handler );
|
||||
|
||||
~cWinImpl();
|
||||
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Platform {
|
||||
|
||||
CursorX11::CursorX11( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorX11::CursorX11( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( tex, hotspot, name, window ),
|
||||
mCursor( None )
|
||||
{
|
||||
Create();
|
||||
}
|
||||
|
||||
CursorX11::CursorX11( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorX11::CursorX11( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( img, hotspot, name, window ),
|
||||
mCursor( None )
|
||||
{
|
||||
Create();
|
||||
}
|
||||
|
||||
CursorX11::CursorX11( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
CursorX11::CursorX11( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window ) :
|
||||
Cursor( path, hotspot, name, window ),
|
||||
mCursor( None )
|
||||
{
|
||||
|
||||
@@ -19,11 +19,11 @@ class CursorX11 : public Cursor {
|
||||
|
||||
X11Cursor mCursor;
|
||||
|
||||
CursorX11( cTexture * tex, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorX11( cTexture * tex, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorX11( cImage * img, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorX11( cImage * img, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
CursorX11( const std::string& path, const Vector2i& hotspot, const std::string& name, Window::cWindow * window );
|
||||
CursorX11( const std::string& path, const Vector2i& hotspot, const std::string& name, EE::Window::Window * window );
|
||||
|
||||
~CursorX11();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
namespace EE { namespace Window { namespace Platform {
|
||||
|
||||
cX11Impl::cX11Impl( cWindow * window, eeWindowHandle display, X11Window xwindow, X11Window mainwindow, LockFunc lock, UnlockFunc unlock ) :
|
||||
cX11Impl::cX11Impl( EE::Window::Window * window, eeWindowHandle display, X11Window xwindow, X11Window mainwindow, LockFunc lock, UnlockFunc unlock ) :
|
||||
PlatformImpl( window ),
|
||||
mDisplay( display ),
|
||||
mX11Window( xwindow ),
|
||||
|
||||
@@ -16,7 +16,7 @@ class cX11Impl : public PlatformImpl {
|
||||
typedef void (*LockFunc)(void);
|
||||
typedef void (*UnlockFunc)(void);
|
||||
|
||||
cX11Impl( Window::cWindow * window, eeWindowHandle display, X11Window xwindow, X11Window mainwindow, LockFunc lock, UnlockFunc unlock );
|
||||
cX11Impl( EE::Window::Window * window, eeWindowHandle display, X11Window xwindow, X11Window mainwindow, LockFunc lock, UnlockFunc unlock );
|
||||
|
||||
~cX11Impl();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <eepp/ee.hpp>
|
||||
|
||||
cWindow * win = NULL;
|
||||
EE::Window::Window * win = NULL;
|
||||
|
||||
void MainLoop()
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ static Float sqrt_aprox[20001];
|
||||
|
||||
Uint32 ParticlesNum = 30000;
|
||||
|
||||
cWindow * win = NULL;
|
||||
EE::Window::Window * win = NULL;
|
||||
Input * imp = NULL;
|
||||
cShaderProgram * ShaderProgram = NULL;
|
||||
bool ShadersSupported = false;
|
||||
@@ -21,7 +21,7 @@ Vector3ff * vertices = eeNewArray( Vector3ff, ParticlesNum );
|
||||
Vector3ff * velocities = eeNewArray( Vector3ff, ParticlesNum );
|
||||
ColorAf * colors = eeNewArray( ColorAf, ParticlesNum );
|
||||
|
||||
void videoResize( cWindow * w ) {
|
||||
void videoResize( EE::Window::Window * w ) {
|
||||
/// Video Resize event will re-setup the 2D projection and states, so we must rebuild them.
|
||||
aspectRatio = (Float)win->GetWidth() / (Float)win->GetHeight();
|
||||
tw = (Float)win->GetWidth() / 2;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <eepp/ee.hpp>
|
||||
|
||||
cWindow * win = NULL;
|
||||
EE::Window::Window * win = NULL;
|
||||
cTTFFont * TTF = NULL;
|
||||
cTTFFont * TTFO = NULL;
|
||||
cTTFFont * TTF2 = NULL;
|
||||
|
||||
@@ -30,7 +30,7 @@ void CreateJointAndBody() {
|
||||
mMouseBody = eeNew( cBody, ( INFINITY, INFINITY ) );
|
||||
}
|
||||
|
||||
cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
Input * KM;
|
||||
|
||||
void DefaultDrawOptions() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <eepp/ee.hpp>
|
||||
|
||||
cWindow * win = NULL;
|
||||
EE::Window::Window * win = NULL;
|
||||
|
||||
// Define a interpolation to control the Rock sprite angle
|
||||
Interpolation RockAngle;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <eepp/ee.hpp>
|
||||
|
||||
cWindow * win = NULL;
|
||||
EE::Window::Window * win = NULL;
|
||||
cVertexBuffer * VBO = NULL;
|
||||
cVertexBuffer * VBO2 = NULL;
|
||||
cFrameBuffer * FBO = NULL;
|
||||
|
||||
@@ -243,7 +243,7 @@ void cEETest::OnShowMenu( const cUIEvent * Event ) {
|
||||
}
|
||||
}
|
||||
|
||||
void cEETest::OnWindowResize(cWindow * win) {
|
||||
void cEETest::OnWindowResize(EE::Window::Window * win) {
|
||||
Map.ViewSize( win->Size() );
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ class cEETest : private Thread {
|
||||
Time PSElapsed;
|
||||
private:
|
||||
Engine * EE;
|
||||
Window::cWindow * mWindow;
|
||||
EE::Window::Window * mWindow;
|
||||
cTextureFactory* TF;
|
||||
System::Log* Log;
|
||||
Window::Input* KM;
|
||||
@@ -296,7 +296,7 @@ class cEETest : private Thread {
|
||||
|
||||
void OnShowMenu( const cUIEvent * Event );
|
||||
|
||||
void OnWindowResize( cWindow * win );
|
||||
void OnWindowResize( EE::Window::Window * win );
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user