OniPlatformWin32.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002 *                                                                            *
00003 *  OpenNI 2.x Alpha                                                          *
00004 *  Copyright (C) 2012 PrimeSense Ltd.                                        *
00005 *                                                                            *
00006 *  This file is part of OpenNI.                                              *
00007 *                                                                            *
00008 *  Licensed under the Apache License, Version 2.0 (the "License");           *
00009 *  you may not use this file except in compliance with the License.          *
00010 *  You may obtain a copy of the License at                                   *
00011 *                                                                            *
00012 *      http://www.apache.org/licenses/LICENSE-2.0                            *
00013 *                                                                            *
00014 *  Unless required by applicable law or agreed to in writing, software       *
00015 *  distributed under the License is distributed on an "AS IS" BASIS,         *
00016 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  *
00017 *  See the License for the specific language governing permissions and       *
00018 *  limitations under the License.                                            *
00019 *                                                                            *
00020 *****************************************************************************/
00021 #ifndef ONIPLATFORMWIN32_H
00022 #define ONIPLATFORMWIN32_H
00023 
00024 //---------------------------------------------------------------------------
00025 // Prerequisites
00026 //---------------------------------------------------------------------------
00027 #ifndef WINVER                                          // Allow use of features specific to Windows XP or later
00028         #define WINVER 0x0501
00029 #endif
00030 #ifndef _WIN32_WINNT                            // Allow use of features specific to Windows XP or later
00031         #define _WIN32_WINNT 0x0501
00032 #endif                                          
00033 #ifndef _WIN32_WINDOWS                          // Allow use of features specific to Windows 98 or later
00034         #define _WIN32_WINDOWS 0x0410
00035 #endif
00036 #ifndef _WIN32_IE                                       // Allow use of features specific to IE 6.0 or later
00037         #define _WIN32_IE 0x0600
00038 #endif
00039 #define WIN32_LEAN_AND_MEAN                     // Exclude rarely-used stuff from Windows headers
00040 
00041 // Undeprecate CRT functions
00042 #ifndef _CRT_SECURE_NO_DEPRECATE 
00043         #define _CRT_SECURE_NO_DEPRECATE 1
00044 #endif
00045 
00046 //---------------------------------------------------------------------------
00047 // Includes
00048 //---------------------------------------------------------------------------
00049 #include <windows.h>
00050 #include <stdlib.h>
00051 #include <stdio.h>
00052 #include <malloc.h>
00053 #include <io.h>
00054 #include <time.h>
00055 #include <assert.h>
00056 #include <float.h>
00057 #include <crtdbg.h>
00058 
00059 #if _MSC_VER < 1600 // Visual Studio 2008 and older doesn't have stdint.h...
00060 typedef signed char int8_t;
00061 typedef short int16_t;
00062 typedef int int32_t;
00063 typedef __int64 int64_t;
00064 
00065 typedef unsigned char uint8_t;
00066 typedef unsigned short uint16_t;
00067 typedef unsigned int uint32_t;
00068 typedef unsigned __int64 uint64_t;
00069 #else
00070 #include <stdint.h>
00071 #endif
00072 
00073 //---------------------------------------------------------------------------
00074 // Platform Basic Definition
00075 //---------------------------------------------------------------------------
00076 #define ONI_PLATFORM ONI_PLATFORM_WIN32
00077 #define ONI_PLATFORM_STRING "Win32"
00078 
00079 //---------------------------------------------------------------------------
00080 // Platform Capabilities
00081 //---------------------------------------------------------------------------
00082 #define ONI_PLATFORM_ENDIAN_TYPE ONI_PLATFORM_IS_LITTLE_ENDIAN
00083 
00084 #define ONI_PLATFORM_SUPPORTS_DYNAMIC_LIBS 1
00085 
00086 //---------------------------------------------------------------------------
00087 // Memory
00088 //---------------------------------------------------------------------------
00090 #define ONI_DEFAULT_MEM_ALIGN 16
00091 
00093 #define ONI_THREAD_STATIC __declspec(thread)
00094 
00095 //---------------------------------------------------------------------------
00096 // Files
00097 //---------------------------------------------------------------------------
00099 #define ONI_FILE_MAX_PATH MAX_PATH
00100 
00101 //---------------------------------------------------------------------------
00102 // Call backs
00103 //---------------------------------------------------------------------------
00105 #define ONI_STDCALL __stdcall
00106 
00108 #define ONI_CALLBACK_TYPE ONI_STDCALL
00109 
00111 #define ONI_C_DECL __cdecl
00112 
00113 //---------------------------------------------------------------------------
00114 // Macros
00115 //---------------------------------------------------------------------------
00117 #define ONI_TIMESTAMP __DATE__ " " __TIME__
00118 
00120 #define ONI_STRINGIFY(n) ONI_STRINGIFY_HELPER(n)
00121 #define ONI_STRINGIFY_HELPER(n) #n
00122 
00123 //---------------------------------------------------------------------------
00124 // API Export/Import Macros
00125 //---------------------------------------------------------------------------
00127 #define ONI_API_EXPORT __declspec(dllexport)
00128 
00130 #define ONI_API_IMPORT __declspec(dllimport)
00131 
00133 #if _MSC_VER < 1400 // Before VS2005 there was no support for declspec deprecated...
00134         #define ONI_API_DEPRECATED(msg)
00135 #else
00136         #define ONI_API_DEPRECATED(msg) __declspec(deprecated(msg))
00137 #endif
00138 
00139 #endif // ONIPLATFORMWIN32_H


astra_camera
Author(s): Tim Liu
autogenerated on Wed Jul 10 2019 03:18:54