OniPlatformWin32.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * *
3 * OpenNI 2.x Alpha *
4 * Copyright (C) 2012 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * Licensed under the Apache License, Version 2.0 (the "License"); *
9 * you may not use this file except in compliance with the License. *
10 * You may obtain a copy of the License at *
11 * *
12 * http://www.apache.org/licenses/LICENSE-2.0 *
13 * *
14 * Unless required by applicable law or agreed to in writing, software *
15 * distributed under the License is distributed on an "AS IS" BASIS, *
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
17 * See the License for the specific language governing permissions and *
18 * limitations under the License. *
19 * *
20 *****************************************************************************/
21 #ifndef _ONI_PLATFORM_WIN32_H_
22 #define _ONI_PLATFORM_WIN32_H_
23 
24 //---------------------------------------------------------------------------
25 // Prerequisites
26 //---------------------------------------------------------------------------
27 #ifndef WINVER // Allow use of features specific to Windows XP or later
28  #define WINVER 0x0501
29 #endif
30 #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later
31  #define _WIN32_WINNT 0x0501
32 #endif
33 #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later
34  #define _WIN32_WINDOWS 0x0410
35 #endif
36 #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later
37  #define _WIN32_IE 0x0600
38 #endif
39 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
40 
41 // Undeprecate CRT functions
42 #ifndef _CRT_SECURE_NO_DEPRECATE
43  #define _CRT_SECURE_NO_DEPRECATE 1
44 #endif
45 
46 //---------------------------------------------------------------------------
47 // Includes
48 //---------------------------------------------------------------------------
49 #include <windows.h>
50 #include <stdlib.h>
51 #include <stdio.h>
52 #include <malloc.h>
53 #include <io.h>
54 #include <time.h>
55 #include <assert.h>
56 #include <float.h>
57 #include <crtdbg.h>
58 
59 #if _MSC_VER < 1600 // Visual Studio 2008 and older doesn't have stdint.h...
60 typedef signed char int8_t;
61 typedef short int16_t;
62 typedef int int32_t;
63 typedef __int64 int64_t;
64 
65 typedef unsigned char uint8_t;
66 typedef unsigned short uint16_t;
67 typedef unsigned int uint32_t;
68 typedef unsigned __int64 uint64_t;
69 #else
70 #include <stdint.h>
71 #endif
72 
73 //---------------------------------------------------------------------------
74 // Platform Basic Definition
75 //---------------------------------------------------------------------------
76 #define ONI_PLATFORM ONI_PLATFORM_WIN32
77 #define ONI_PLATFORM_STRING "Win32"
78 
79 //---------------------------------------------------------------------------
80 // Platform Capabilities
81 //---------------------------------------------------------------------------
82 #define ONI_PLATFORM_ENDIAN_TYPE ONI_PLATFORM_IS_LITTLE_ENDIAN
83 
84 #define ONI_PLATFORM_SUPPORTS_DYNAMIC_LIBS 1
85 
86 //---------------------------------------------------------------------------
87 // Memory
88 //---------------------------------------------------------------------------
90 #define ONI_DEFAULT_MEM_ALIGN 16
91 
93 #define ONI_THREAD_STATIC __declspec(thread)
94 
95 //---------------------------------------------------------------------------
96 // Files
97 //---------------------------------------------------------------------------
99 #define ONI_FILE_MAX_PATH MAX_PATH
100 
101 //---------------------------------------------------------------------------
102 // Call backs
103 //---------------------------------------------------------------------------
105 #define ONI_STDCALL __stdcall
106 
108 #define ONI_CALLBACK_TYPE ONI_STDCALL
109 
111 #define ONI_C_DECL __cdecl
112 
113 //---------------------------------------------------------------------------
114 // Macros
115 //---------------------------------------------------------------------------
117 #define ONI_TIMESTAMP __DATE__ " " __TIME__
118 
120 #define ONI_STRINGIFY(n) ONI_STRINGIFY_HELPER(n)
121 #define ONI_STRINGIFY_HELPER(n) #n
122 
123 //---------------------------------------------------------------------------
124 // API Export/Import Macros
125 //---------------------------------------------------------------------------
127 #define ONI_API_EXPORT __declspec(dllexport)
128 
130 #define ONI_API_IMPORT __declspec(dllimport)
131 
133 #if _MSC_VER < 1400 // Before VS2005 there was no support for declspec deprecated...
134  #define ONI_API_DEPRECATED(msg)
135 #else
136  #define ONI_API_DEPRECATED(msg) __declspec(deprecated(msg))
137 #endif
138 
139 #endif //_ONI_PLATFORM_WIN32_H_
short int16_t
unsigned short uint16_t
unsigned __int64 uint64_t
signed char int8_t
unsigned char uint8_t
__int64 int64_t
int int32_t
unsigned int uint32_t


libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Thu Jun 6 2019 19:25:38