VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/Core/vtkWin32Header.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkWin32Header.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00022 #ifndef vtkWIN32Header_h
00023 #define vtkWIN32Header_h
00024 
00025 #ifndef __VTK_SYSTEM_INCLUDES__INSIDE
00026 Do_not_include_vtkWin32Header_directly__vtkSystemIncludes_includes_it;
00027 #endif
00028 
00029 #include "vtkConfigure.h"
00030 #include "vtkABI.h"
00031 
00032 /*
00033  * This is a support for files on the disk that are larger than 2GB.
00034  * Since this is the first place that any include should happen, do this here.
00035  */
00036 #ifdef VTK_REQUIRE_LARGE_FILE_SUPPORT
00037 #  ifndef _LARGEFILE_SOURCE
00038 #    define _LARGEFILE_SOURCE
00039 #  endif
00040 #  ifndef _LARGE_FILES
00041 #    define _LARGE_FILES
00042 #  endif
00043 #  ifndef _FILE_OFFSET_BITS
00044 #    define _FILE_OFFSET_BITS 64
00045 #  endif
00046 #endif
00047 
00048 //
00049 // Windows specific stuff------------------------------------------
00050 #if defined(_WIN32) || defined(WIN32)
00051 
00052 // define strict header for windows
00053 #ifndef STRICT
00054 #define STRICT
00055 #endif
00056 
00057 #ifndef NOMINMAX
00058 #define NOMINMAX
00059 #endif
00060 
00061 #endif
00062 
00063 // Never include the windows header here when building VTK itself.
00064 #if defined(VTK_IN_VTK)
00065 # undef VTK_INCLUDE_WINDOWS_H
00066 #endif
00067 
00068 #if defined(_WIN32)
00069   // Include the windows header here only if requested by user code.
00070 # if defined(VTK_INCLUDE_WINDOWS_H)
00071 #  include <windows.h>
00072    // Define types from the windows header file.
00073    typedef DWORD vtkWindowsDWORD;
00074    typedef PVOID vtkWindowsPVOID;
00075    typedef LPVOID vtkWindowsLPVOID;
00076    typedef HANDLE vtkWindowsHANDLE;
00077    typedef LPTHREAD_START_ROUTINE vtkWindowsLPTHREAD_START_ROUTINE;
00078 # else
00079    // Define types from the windows header file.
00080    typedef unsigned long vtkWindowsDWORD;
00081    typedef void* vtkWindowsPVOID;
00082    typedef vtkWindowsPVOID vtkWindowsLPVOID;
00083    typedef vtkWindowsPVOID vtkWindowsHANDLE;
00084    typedef vtkWindowsDWORD (__stdcall *vtkWindowsLPTHREAD_START_ROUTINE)(vtkWindowsLPVOID);
00085 # endif
00086   // Enable workaround for windows header name mangling.
00087   // See VTK/Utilities/Upgrading/README.WindowsMangling.txt for details.
00088 #if !defined(__WRAP__)
00089 # define VTK_WORKAROUND_WINDOWS_MANGLE
00090 #endif
00091 
00092 #if defined(_MSC_VER) // Visual studio
00093 #pragma warning ( disable : 4311 )
00094 #pragma warning ( disable : 4312 )
00095 #endif //
00096 #define vtkGetWindowLong GetWindowLongPtr
00097 #define vtkSetWindowLong SetWindowLongPtr
00098 #define vtkLONG LONG_PTR
00099 #define vtkGWL_WNDPROC GWLP_WNDPROC
00100 #define vtkGWL_HINSTANCE GWLP_HINSTANCE
00101 #define vtkGWL_USERDATA GWLP_USERDATA
00102 
00103 #endif
00104 
00105 #if defined(_MSC_VER)
00106   // Enable MSVC compiler warning messages that are useful but off by default.
00107 # pragma warning ( default : 4263 ) /* no override, call convention differs */
00108   // Disable MSVC compiler warning messages that often occur in valid code.
00109 # if !defined(VTK_DISPLAY_WIN32_WARNINGS)
00110 #  pragma warning ( disable : 4003 ) /* not enough actual parameters for macro */
00111 #  pragma warning ( disable : 4097 ) /* typedef is synonym for class */
00112 #  pragma warning ( disable : 4127 ) /* conditional expression is constant */
00113 #  pragma warning ( disable : 4244 ) /* possible loss in conversion */
00114 #  pragma warning ( disable : 4251 ) /* missing DLL-interface */
00115 #  pragma warning ( disable : 4305 ) /* truncation from type1 to type2 */
00116 #  pragma warning ( disable : 4309 ) /* truncation of constant value */
00117 #  pragma warning ( disable : 4514 ) /* unreferenced inline function */
00118 #  pragma warning ( disable : 4706 ) /* assignment in conditional expression */
00119 #  pragma warning ( disable : 4710 ) /* function not inlined */
00120 #  pragma warning ( disable : 4786 ) /* identifier truncated in debug info */
00121 # endif
00122 #endif
00123 
00124 #if defined(__BORLANDC__)
00125   // Disable Borland compiler warning messages that often occur in valid code.
00126 # if !defined(VTK_DISPLAY_WIN32_WARNINGS)
00127 #  pragma warn -8004 /* assigned a value that is never used */
00128 #  pragma warn -8008 /* condition is always false */
00129 #  pragma warn -8026 /* funcs w/class-by-value args not expanded inline */
00130 #  pragma warn -8027 /* functions w/ do/for/while not expanded inline */
00131 #  pragma warn -8060 /* possibly incorrect assignment */
00132 #  pragma warn -8066 /* unreachable code */
00133 #  pragma warn -8072 /* suspicious pointer arithmetic */
00134 # endif
00135 #endif
00136 
00137 // Now set up the generic VTK export macro.
00138 #if defined(VTK_BUILD_SHARED_LIBS)
00139 # define VTK_EXPORT VTK_ABI_EXPORT
00140 #else
00141 # define VTK_EXPORT
00142 #endif
00143 
00144 // this is exclusively for the tcl Init functions
00145 #define VTK_TK_EXPORT VTK_ABI_EXPORT
00146 
00147 #endif
00148 // VTK-HeaderTest-Exclude: vtkWin32Header.h