00001 /* 00002 ----------------------------------------------------------------------------- 00003 This source file is part of OpenSpace3D 00004 For the latest info, see http://www.openspace3d.com 00005 00006 Copyright (c) 2010 I-maginer 00007 00008 This program is free software; you can redistribute it and/or modify it under 00009 the terms of the GNU Lesser General Public License as published by the Free Software 00010 Foundation; either version 2 of the License, or (at your option) any later 00011 version. 00012 00013 This program is distributed in the hope that it will be useful, but WITHOUT 00014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00015 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public License along with 00018 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00019 Place - Suite 330, Boston, MA 02111-1307, USA, or go to 00020 http://www.gnu.org/copyleft/lesser.txt 00021 00022 You may alternatively use this source under the terms of a specific version of 00023 the OpenSpace3D Unrestricted License provided you have obtained such a license from 00024 I-maginer. 00025 ----------------------------------------------------------------------------- 00026 */ 00027 00035 #ifndef __SO3_MS_WINDOWS_H__ 00036 #define __SO3_MS_WINDOWS_H__ 00037 00038 // Activate memory leaks detection. 00039 #if defined(_DEBUG) || defined(SO3_DEBUG) 00040 # define _CRTDBG_MAP_ALLOC 00041 # include <stdlib.h> 00042 # include <crtdbg.h> 00043 #endif 00044 00045 #define WIN32_LEAN_AND_MEAN 00046 #define NOMINMAX 00047 #include "windows.h" 00048 00049 // Dll exporting symbols (SO3Engine.dll build), or importing (SO3 plugins)? 00050 #ifdef SO3_STATIC_BUILD 00051 # define _SO3_Export 00052 #else 00053 # ifdef SO3_NON_CLIENT_BUILD 00054 # define _SO3_Export __declspec(dllexport) 00055 # else 00056 # define _SO3_Export __declspec(dllimport) 00057 # endif 00058 #endif 00059 00060 // Ms Windows dynamic library loading and unloading functions. 00061 // see SPlugin class 00062 #define SO3_PLUGIN_INSTANCE hInstance 00063 #define SO3_PLUGIN_LOAD(a) LoadLibrary(a) 00064 #define SO3_PLUGIN_UNLOAD(a) !FreeLibrary(a) 00065 #define SO3_PLUGIN_GET_SYMBOL(a,b) (void*)GetProcAddress(a,b) 00066 #define SO3_PLUGIN_ERROR() "Unknown Error" 00067 struct HINSTANCE__; 00068 typedef struct HINSTANCE__* hInstance; 00069 00070 // define the system type for window handle ("HWND" for MS Windows, "Window" for X11). 00071 # define WindowHandle HWND 00072 00073 #endif
1.6.3