mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-14 21:22:40 +03:00
Removed ugly include files from headers ( windows.h, Xlib, glew ).
Glew is still included by cGL, i'm hesitant about this, i'll think about it.
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#define EE_PLATFORM EE_PLATFORM_LINUX
|
||||
#elif defined( __FreeBSD__ ) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined( __DragonFly__ )
|
||||
#define EE_PLATFORM EE_PLATFORM_BSD
|
||||
#elif defined( __SVR4 )
|
||||
#elif defined( __SVR4 ) || defined( __sun )
|
||||
#define EE_PLATFORM EE_PLATFORM_SOLARIS
|
||||
#elif defined( __HAIKU__ ) || defined( __BEOS__ )
|
||||
#define EE_PLATFORM EE_PLATFORM_HAIKU
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
#if defined ( linux ) || defined( __linux__ ) \
|
||||
|| defined( __FreeBSD__ ) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined( __DragonFly__ ) \
|
||||
|| defined( __SVR4 )
|
||||
|| defined( __SVR4 ) || defined( __sun )
|
||||
|
||||
#if !defined( EE_GLES1 ) && !defined( EE_GLES2 )
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
#endif
|
||||
|
||||
//! Since EE just use basic POSIX stuff, declare as POSIX some OS that are mostly POSIX-compliant
|
||||
#if defined ( linux ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined( __DragonFly__ ) || defined( __SVR4 ) || defined( __APPLE_CC__ ) || defined ( __APPLE__ ) || defined( __HAIKU__ ) || defined( __BEOS__ )
|
||||
#if defined ( linux ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined( __DragonFly__ ) || defined( __SVR4 ) || defined( __sun ) || defined( __APPLE_CC__ ) || defined ( __APPLE__ ) || defined( __HAIKU__ ) || defined( __BEOS__ )
|
||||
#define EE_PLATFORM_POSIX
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,15 +10,22 @@
|
||||
|
||||
#elif defined( EE_X11_PLATFORM )
|
||||
|
||||
#include <eepp/helper/glew/glxew.h>
|
||||
#undef Window
|
||||
#undef Display
|
||||
#undef Cursor
|
||||
#ifdef __sun
|
||||
struct __glXContextRec;
|
||||
typedef struct __glXContextRec *GLXContext;
|
||||
#else
|
||||
struct __GLXcontextRec;
|
||||
typedef struct __GLXcontextRec *GLXContext;
|
||||
#endif
|
||||
|
||||
typedef GLXContext eeWindowContex;
|
||||
|
||||
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
|
||||
#include <AGL/agl.h>
|
||||
struct __AGLContextRec;
|
||||
|
||||
typedef struct __AGLContextRec *AGLContext;
|
||||
|
||||
typedef AGLContext eeWindowContex;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,19 +9,13 @@
|
||||
typedef HWND__* eeWindowHandle;
|
||||
|
||||
#elif defined( EE_X11_PLATFORM )
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xcursor/Xcursor.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#undef Window
|
||||
#undef Display
|
||||
#undef Cursor
|
||||
|
||||
|
||||
typedef unsigned long X11Window;
|
||||
typedef unsigned long X11Cursor;
|
||||
|
||||
typedef Display * eeWindowHandle;
|
||||
struct _XDisplay;
|
||||
typedef struct _XDisplay * eeWindowHandle;
|
||||
|
||||
|
||||
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
typedef void * eeWindowHandle; // NSWindow *
|
||||
#else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by Qt Creator 2.6.0, 2012-12-06T01:52:52. -->
|
||||
<!-- Written by Qt Creator 2.6.0, 2012-12-06T18:15:34. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
@@ -57,7 +57,7 @@
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="GenericProjectManager.GenericMakeStep.BuildTargets"/>
|
||||
<value type="bool" key="GenericProjectManager.GenericMakeStep.Clean">false</value>
|
||||
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j4 -e DEBUGBUILD=yes BACKEND_SDL=yes test</value>
|
||||
<value type="QString" key="GenericProjectManager.GenericMakeStep.MakeArguments">-j4 -e DEBUGBUILD=yes BACKENDS_ALL=yes test</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"></value>
|
||||
|
||||
@@ -569,3 +569,5 @@
|
||||
../../include/eepp/system/filesystem.hpp
|
||||
../../src/eepp/system/filesystem.cpp
|
||||
../../include/eepp/graphics/glhelper.hpp
|
||||
../../include/eepp/window/windowhandle.hpp
|
||||
../../include/eepp/window/windowcontext.hpp
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#include <eepp/window/backend/SDL/cinputsdl.hpp>
|
||||
#include <eepp/window/backend/SDL/cjoystickmanagersdl.hpp>
|
||||
#include <eepp/window/backend/SDL/ccursormanagersdl.hpp>
|
||||
#include <eepp/window/backend/SDL/base.hpp>
|
||||
|
||||
#ifdef EE_BACKEND_SDL_1_2
|
||||
|
||||
@@ -10,6 +8,10 @@
|
||||
#include <SDL/SDL_syswm.h>
|
||||
#endif
|
||||
|
||||
#include <eepp/window/backend/SDL/cinputsdl.hpp>
|
||||
#include <eepp/window/backend/SDL/cjoystickmanagersdl.hpp>
|
||||
#include <eepp/window/backend/SDL/ccursormanagersdl.hpp>
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL {
|
||||
|
||||
cInputSDL::cInputSDL( cWindow * window ) :
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#include <eepp/window/backend/SDL2/base.hpp>
|
||||
|
||||
#ifdef EE_BACKEND_SDL2
|
||||
|
||||
#include <eepp/window/backend/SDL2/cinputsdl2.hpp>
|
||||
#include <eepp/window/backend/SDL2/cjoystickmanagersdl2.hpp>
|
||||
#include <eepp/window/backend/SDL2/ccursormanagersdl2.hpp>
|
||||
#include <eepp/window/backend/SDL2/cwindowsdl2.hpp>
|
||||
|
||||
#ifdef EE_BACKEND_SDL2
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL2 {
|
||||
|
||||
cInputSDL::cInputSDL( cWindow * window ) :
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
#include <eepp/window/backend/SDL2/cwindowsdl2.hpp>
|
||||
#include <eepp/window/backend/SDL2/base.hpp>
|
||||
|
||||
#ifdef EE_BACKEND_SDL2
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM )
|
||||
#include <SDL2/SDL_syswm.h>
|
||||
#endif
|
||||
|
||||
#include <eepp/window/backend/SDL2/cwindowsdl2.hpp>
|
||||
#include <eepp/window/backend/SDL2/cclipboardsdl2.hpp>
|
||||
#include <eepp/window/backend/SDL2/cinputsdl2.hpp>
|
||||
#include <eepp/window/backend/SDL2/ccursormanagersdl2.hpp>
|
||||
@@ -20,7 +25,8 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 {
|
||||
cWindowSDL::cWindowSDL( WindowSettings Settings, ContextSettings Context ) :
|
||||
cWindow( Settings, Context, eeNew( cClipboardSDL, ( this ) ), eeNew( cInputSDL, ( this ) ), eeNew( cCursorManagerSDL, ( this ) ) ),
|
||||
mSDLWindow( NULL ),
|
||||
mGLContext( NULL )
|
||||
mGLContext( NULL ),
|
||||
mWMinfo( eeNew( SDL_SysWMinfo, () ) )
|
||||
{
|
||||
Create( Settings, Context );
|
||||
}
|
||||
@@ -29,6 +35,8 @@ cWindowSDL::~cWindowSDL() {
|
||||
if ( NULL != mGLContext ) {
|
||||
SDL_GL_DeleteContext( mGLContext );
|
||||
}
|
||||
|
||||
eeSAFE_DELETE( mWMinfo );
|
||||
}
|
||||
|
||||
bool cWindowSDL::Create( WindowSettings Settings, ContextSettings Context ) {
|
||||
@@ -172,12 +180,12 @@ std::string cWindowSDL::GetVersion() {
|
||||
void cWindowSDL::CreatePlatform() {
|
||||
eeSAFE_DELETE( mPlatform );
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM )
|
||||
SDL_VERSION( &mWMinfo.version );
|
||||
SDL_GetWindowWMInfo ( mSDLWindow, &mWMinfo );
|
||||
SDL_VERSION( &mWMinfo->version );
|
||||
SDL_GetWindowWMInfo ( mSDLWindow, mWMinfo );
|
||||
#endif
|
||||
|
||||
#if defined( EE_X11_PLATFORM )
|
||||
mPlatform = eeNew( Platform::cX11Impl, ( this, mWMinfo.info.x11.display, mWMinfo.info.x11.window, mWMinfo.info.x11.window, NULL, NULL ) );
|
||||
mPlatform = eeNew( Platform::cX11Impl, ( this, mWMinfo->info.x11.display, mWMinfo->info.x11.window, mWMinfo->info.x11.window, NULL, NULL ) );
|
||||
#elif EE_PLATFORM == EE_PLATFORM_WIN
|
||||
mPlatform = eeNew( Platform::cWinImpl, ( this, GetWindowHandler() ) );
|
||||
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
@@ -382,11 +390,11 @@ void cWindowSDL::SetGamma( eeFloat Red, eeFloat Green, eeFloat Blue ) {
|
||||
|
||||
eeWindowHandle cWindowSDL::GetWindowHandler() {
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN
|
||||
return mWMinfo.info.win.window;
|
||||
return mWMinfo->info.win.window;
|
||||
#elif defined( EE_X11_PLATFORM )
|
||||
return mWMinfo.info.x11.display;
|
||||
return mWMinfo->info.x11.display;
|
||||
#elif EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
return mWMinfo.info.cocoa.window;
|
||||
return mWMinfo->info.cocoa.window;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
|
||||
#include <eepp/window/cwindow.hpp>
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM )
|
||||
#include <SDL2/SDL_syswm.h>
|
||||
#endif
|
||||
class SDL_SysWMinfo;
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace SDL2 {
|
||||
|
||||
@@ -64,7 +62,7 @@ class EE_API cWindowSDL : public cWindow {
|
||||
SDL_GLContext mGLContext;
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM )
|
||||
SDL_SysWMinfo mWMinfo;
|
||||
SDL_SysWMinfo * mWMinfo;
|
||||
#endif
|
||||
|
||||
eeVector2i mWinPos;
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
#ifdef EE_BACKEND_SFML_ACTIVE
|
||||
|
||||
#if defined( EE_X11_PLATFORM )
|
||||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
#undef None
|
||||
|
||||
#include <SFML/Graphics.hpp>
|
||||
|
||||
#include <eepp/window/backend/SFML/cclipboardsfml.hpp>
|
||||
|
||||
@@ -5,16 +5,6 @@
|
||||
#include <eepp/helper/SOIL2/src/SOIL2/stb_image.h>
|
||||
|
||||
#include <eepp/graphics/renderer/cgl.hpp>
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/graphics/cshaderprogrammanager.hpp>
|
||||
#include <eepp/graphics/cvertexbuffermanager.hpp>
|
||||
#include <eepp/graphics/cframebuffermanager.hpp>
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
|
||||
#include <eepp/window/platform/platformimpl.hpp>
|
||||
#include <eepp/window/backend/allegro5/cclipboardal.hpp>
|
||||
#include <eepp/window/backend/allegro5/cinputal.hpp>
|
||||
#include <eepp/window/backend/allegro5/ccursormanageral.hpp>
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN
|
||||
#include <allegro5/allegro_windows.h>
|
||||
@@ -27,6 +17,20 @@
|
||||
#include <allegro5/allegro_opengl.h>
|
||||
#include <allegro5/internal/aintern_system.h>
|
||||
#include <allegro5/internal/aintern_thread.h>
|
||||
#undef Cursor
|
||||
#undef Window
|
||||
|
||||
#include <eepp/window/backend/allegro5/cclipboardal.hpp>
|
||||
#include <eepp/window/backend/allegro5/cinputal.hpp>
|
||||
#include <eepp/window/backend/allegro5/ccursormanageral.hpp>
|
||||
|
||||
#include <eepp/graphics/cglobalbatchrenderer.hpp>
|
||||
#include <eepp/graphics/cshaderprogrammanager.hpp>
|
||||
#include <eepp/graphics/cvertexbuffermanager.hpp>
|
||||
#include <eepp/graphics/cframebuffermanager.hpp>
|
||||
#include <eepp/graphics/ctexturefactory.hpp>
|
||||
|
||||
#include <eepp/window/platform/platformimpl.hpp>
|
||||
|
||||
namespace EE { namespace Window { namespace Backend { namespace Al {
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_MACOSX
|
||||
|
||||
#include <AGL/agl.h>
|
||||
|
||||
namespace EE { namespace Window { namespace Platform {
|
||||
|
||||
cOSXImpl::cOSXImpl( cWindow * window ) :
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
#include <eepp/window/platform/x11/ccursorx11.hpp>
|
||||
#include <eepp/window/platform/x11/cx11impl.hpp>
|
||||
#include <eepp/declares.hpp>
|
||||
|
||||
#if defined( EE_X11_PLATFORM )
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xcursor/Xcursor.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#undef Window
|
||||
#undef Display
|
||||
#undef Cursor
|
||||
|
||||
#include <eepp/window/platform/x11/ccursorx11.hpp>
|
||||
#include <eepp/window/platform/x11/cx11impl.hpp>
|
||||
|
||||
namespace EE { namespace Window { namespace Platform {
|
||||
|
||||
cCursorX11::cCursorX11( cTexture * tex, const eeVector2i& hotspot, const std::string& name, Window::cWindow * window ) :
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
#include <eepp/window/platform/x11/cx11impl.hpp>
|
||||
#include <eepp/window/platform/x11/ccursorx11.hpp>
|
||||
#include <eepp/declares.hpp>
|
||||
|
||||
#if defined( EE_X11_PLATFORM )
|
||||
|
||||
#include <eepp/helper/glew/glxew.h>
|
||||
#include <X11/Xcursor/Xcursor.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#undef Window
|
||||
#undef Display
|
||||
#undef Cursor
|
||||
|
||||
#include <eepp/window/platform/x11/cx11impl.hpp>
|
||||
#include <eepp/window/platform/x11/ccursorx11.hpp>
|
||||
|
||||
using namespace EE::Window::Cursor;
|
||||
|
||||
namespace EE { namespace Window { namespace Platform {
|
||||
|
||||
Reference in New Issue
Block a user