File: vtkWin32Header.h

package info (click to toggle)
vtk9 9.5.2%2Bdfsg3-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 205,984 kB
  • sloc: cpp: 2,336,570; ansic: 327,116; python: 111,200; yacc: 4,104; java: 3,977; sh: 3,032; xml: 2,771; perl: 2,189; lex: 1,787; makefile: 181; javascript: 165; objc: 153; tcl: 59
file content (119 lines) | stat: -rw-r--r-- 3,779 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
// SPDX-License-Identifier: BSD-3-Clause
/**
 * @class   vtkWin32Header
 * @brief   manage Windows system differences
 *
 * The vtkWin32Header captures some system differences between Unix and
 * Windows operating systems.
 */

#ifndef vtkWin32Header_h
#define vtkWin32Header_h

#ifndef VTK_SYSTEM_INCLUDES_INSIDE
Do_not_include_vtkWin32Header_directly_vtkSystemIncludes_includes_it;
#endif

#include "vtkABI.h"
#include "vtkBuild.h"    // For VTK_BUILD_SHARED_LIBS
#include "vtkPlatform.h" // for VTK_REQUIRE_LARGE_FILE_SUPPORT

/*
 * This is a support for files on the disk that are larger than 2GB.
 * Since this is the first place that any include should happen, do this here.
 */
#ifdef VTK_REQUIRE_LARGE_FILE_SUPPORT
#ifndef _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE
#endif
#ifndef _LARGE_FILES
#define _LARGE_FILES
#endif
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif
#endif

//
// Windows specific stuff------------------------------------------
#if defined(_WIN32)

// Define strict header for Windows (definition as itself ensures that no code breaks)
#ifdef STRICT
#undef STRICT
#endif
#define STRICT STRICT

#ifndef NOMINMAX
#define NOMINMAX
#endif

#endif

#if defined(_WIN32)
// Include the windows header here only if requested by user code.
#if defined(VTK_INCLUDE_WINDOWS_H)
#include <windows.h>
// Define types from the windows header file.
typedef DWORD vtkWindowsDWORD;
typedef PVOID vtkWindowsPVOID;
typedef LPVOID vtkWindowsLPVOID;
typedef HANDLE vtkWindowsHANDLE;
typedef LPTHREAD_START_ROUTINE vtkWindowsLPTHREAD_START_ROUTINE;
#else
// Define types from the windows header file.
typedef unsigned long vtkWindowsDWORD;
typedef void* vtkWindowsPVOID;
typedef vtkWindowsPVOID vtkWindowsLPVOID;
typedef vtkWindowsPVOID vtkWindowsHANDLE;
typedef vtkWindowsDWORD(__stdcall* vtkWindowsLPTHREAD_START_ROUTINE)(vtkWindowsLPVOID);
#endif
// Enable workaround for windows header name mangling.
// See VTK/Utilities/Upgrading/README.WindowsMangling.txt for details.
#if !defined(__VTK_WRAP__) && !defined(__WRAP_GCCXML__)
#define VTK_WORKAROUND_WINDOWS_MANGLE
#endif

#if defined(_MSC_VER) // Visual studio
#pragma warning(disable : 4311)
#pragma warning(disable : 4312)
#endif

#define vtkGetWindowLong GetWindowLongPtr
#define vtkSetWindowLong SetWindowLongPtr
#define vtkLONG LONG_PTR
#define vtkGWL_WNDPROC GWLP_WNDPROC
#define vtkGWL_HINSTANCE GWLP_HINSTANCE
#define vtkGWL_USERDATA GWLP_USERDATA

#endif

#if defined(_MSC_VER)
// Enable MSVC compiler warning messages that are useful but off by default.
#pragma warning(default : 4263) /* no override, call convention differs */
// Disable MSVC compiler warning messages that often occur in valid code.
#if !defined(VTK_DISPLAY_WIN32_WARNINGS)
#pragma warning(disable : 4003) /* not enough actual parameters for macro */
#pragma warning(disable : 4097) /* typedef is synonym for class */
#pragma warning(disable : 4127) /* conditional expression is constant */
#pragma warning(disable : 4244) /* possible loss in conversion */
#pragma warning(disable : 4251) /* missing DLL-interface */
#pragma warning(disable : 4305) /* truncation from type1 to type2 */
#pragma warning(disable : 4309) /* truncation of constant value */
#pragma warning(disable : 4514) /* unreferenced inline function */
#pragma warning(disable : 4706) /* assignment in conditional expression */
#pragma warning(disable : 4710) /* function not inlined */
#pragma warning(disable : 4786) /* identifier truncated in debug info */
#endif
#endif

// Now set up the generic VTK export macro.
#if defined(VTK_BUILD_SHARED_LIBS)
#define VTK_EXPORT VTK_ABI_EXPORT
#else
#define VTK_EXPORT
#endif

#endif
// VTK-HeaderTest-Exclude: vtkWin32Header.h