Go to the documentation of this file.
7 #ifndef __MYGUI_PLATFORM_H__
8 #define __MYGUI_PLATFORM_H__
11 #define MYGUI_PLATFORM_WIN32 1
12 #define MYGUI_PLATFORM_LINUX 2
13 #define MYGUI_PLATFORM_APPLE 3
16 #define MYGUI_COMPILER_MSVC 1
17 #define MYGUI_COMPILER_GNUC 2
21 #if defined (__WIN32__) || defined (_WIN32)
22 # define MYGUI_PLATFORM MYGUI_PLATFORM_WIN32
23 #elif defined (__APPLE_CC__)
24 # define MYGUI_PLATFORM MYGUI_PLATFORM_APPLE
26 # define MYGUI_PLATFORM MYGUI_PLATFORM_LINUX
30 #if defined( _MSC_VER )
31 # define MYGUI_COMPILER MYGUI_COMPILER_MSVC
32 # define MYGUI_COMP_VER _MSC_VER
34 #elif defined( __GNUC__ )
35 # define MYGUI_COMPILER MYGUI_COMPILER_GNUC
36 # define MYGUI_COMP_VER (((__GNUC__)*100) + \
37 (__GNUC_MINOR__*10) + \
40 # pragma error "Unknown compiler! Stop building!!!"
44 #if MYGUI_COMPILER == MYGUI_COMPILER_MSVC
45 # if MYGUI_COMP_VER >= 1200
46 # define MYGUI_FORCEINLINE __forceinline
48 #elif defined(__MINGW32__)
49 # if !defined(MYGUI_FORCEINLINE)
50 # define MYGUI_FORCEINLINE __inline
53 # define MYGUI_FORCEINLINE __inline
58 #if MYGUI_PLATFORM == MYGUI_PLATFORM_WIN32
60 # if defined( MYGUI_STATIC )
62 # elif defined( MYGUI_BUILD )
63 # define MYGUI_EXPORT __declspec( dllexport )
65 # if defined( __MINGW32__ )
68 # define MYGUI_EXPORT __declspec( dllimport )
72 # if defined( MYGUI_STATIC )
73 # define MYGUI_EXPORT_DLL
74 # elif defined( MYGUI_BUILD_DLL )
75 # define MYGUI_EXPORT_DLL __declspec( dllexport )
77 # if defined( __MINGW32__ )
78 # define MYGUI_EXPORT_DLL
80 # define MYGUI_EXPORT_DLL __declspec( dllimport )
84 #// Win32 compilers use _DEBUG for specifying debug builds.
86 # define MYGUI_DEBUG_MODE 1
88 # define MYGUI_DEBUG_MODE 0
94 #if MYGUI_PLATFORM == MYGUI_PLATFORM_LINUX || MYGUI_PLATFORM == MYGUI_PLATFORM_APPLE
100 # define MYGUI_EXPORT __attribute__ ((visibility("default")))
102 # define MYGUI_EXPORT
106 # define MYGUI_EXPORT_DLL __attribute__ ((visibility("default")))
108 # define MYGUI_EXPORT_DLL
116 # define MYGUI_DEBUG_MODE 1
118 # define MYGUI_DEBUG_MODE 0
121 # if MYGUI_PLATFORM == MYGUI_PLATFORM_APPLE
122 # define MYGUI_PLATFORM_LIB "MYGUIPlatform.bundle"
123 # else // if MYGUI_PLATFORM_LINUX
124 # define MYGUI_PLATFORM_LIB "libMYGUIPlatform.so"
130 #endif // __MYGUI_PLATFORM_H__