Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sgl_windows.h

00001 /*****************************************************************************
00002  * SGL: A Scene Graph Library
00003  *
00004  * Copyright (C) 1997-2001  Scott McMillan   All Rights Reserved.
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public
00017  * License along with this library; if not, write to the Free
00018  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  *****************************************************************************
00020  *     File: sgl_windows.h
00021  *  Project: 16 April 2001
00022  *  Summary: various hacks needed for cross platform compatibility, and an
00023  *           attempt at removing windows.h from most dependencies lists by
00024  *           forward declaring some macros here.
00025  *****************************************************************************/
00026 
00027 #ifndef __SGL_WINDOWS_H
00028 #define __SGL_WINDOWS_H
00029 
00030 #if !defined(WIN32)
00031   #ifndef APIENTRY
00032   #define APIENTRY
00033   #endif
00034 #else
00035 
00036  #pragma warning (disable : 4786 4251 4661)
00037 
00038  #ifdef SGL_INCLUDE_WINDOWS
00039   #include <windows.h>
00040  #else
00041   // the following section gleaned from OSG
00042   // Under windows avoid including <windows.h>
00043   // to avoid name space pollution, but Win32's <GL/gl.h>
00044   // needs APIENTRY and WINGDIAPI defined properly.
00045 
00046   // XXX This is from Win32's <windef.h>
00047   #ifndef APIENTRY
00048   # if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
00049   #  define APIENTRY    __stdcall
00050   # else
00051   #  define APIENTRY
00052   # endif
00053   #endif
00054      // XXX This is from Win32's <winnt.h>
00055   #ifndef CALLBACK
00056   # if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
00057   #  define CALLBACK __stdcall
00058   # else
00059   #  define CALLBACK
00060   # endif
00061   #endif
00062      // XXX This is from Win32's <wingdi.h> and <winnt.h>
00063   #ifndef WINGDIAPI
00064   # define WINGDIAPI __declspec(dllimport)
00065   #endif
00066      // XXX This is from Win32's <ctype.h>
00067   #ifndef _WCHAR_T_DEFINED
00068   typedef unsigned short wchar_t;
00069   # define _WCHAR_T_DEFINED
00070   #endif
00071  #endif /* SGL_INCLUDE_WINDOWS */
00072 #endif
00073 
00074 #endif /* SGL_WINDOWS_H */

Generated at Mon Jul 1 18:00:04 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001