![]() |
OpenNI 1.5.7
|
00001 /***************************************************************************** 00002 * * 00003 * OpenNI 1.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 __XN_PLATFORM_H__ 00022 #define __XN_PLATFORM_H__ 00023 00024 //--------------------------------------------------------------------------- 00025 // Platform Defines 00026 //--------------------------------------------------------------------------- 00027 #define XN_PLATFORM_WIN32 1 00028 #define XN_PLATFORM_XBOX360 2 00029 #define XN_PLATFORM_PS3 3 00030 #define XN_PLATFORM_WII 4 00031 #define XN_PLATFORM_LINUX_X86 5 00032 #define XN_PLATFORM_FILES_ONLY 6 00033 #define XN_PLATFORM_ARC 6 00034 #define XN_PLATFORM_LINUX_ARM 7 00035 #define XN_PLATFORM_MACOSX 8 00036 #define XN_PLATFORM_ANDROID_ARM 9 00037 00038 #define XN_PLATFORM_IS_LITTLE_ENDIAN 1 00039 #define XN_PLATFORM_IS_BIG_ENDIAN 2 00040 00041 #define XN_PLATFORM_USE_NO_VAARGS 1 00042 #define XN_PLATFORM_USE_WIN32_VAARGS_STYLE 2 00043 #define XN_PLATFORM_USE_GCC_VAARGS_STYLE 3 00044 #define XN_PLATFORM_USE_ARC_VAARGS_STYLE 4 00045 00046 //--------------------------------------------------------------------------- 00047 // Platform Identifier 00048 //--------------------------------------------------------------------------- 00049 00050 #if defined(_WIN32) // Microsoft Visual Studio 00051 #ifndef RC_INVOKED 00052 #if _MSC_VER < 1300 // Before MSVC7 (2003) 00053 #error Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions below 2003 (7.0) are not supported! 00054 #endif 00055 00056 #if _MSC_VER > 1600 // After MSVC8 (2010) 00057 #error Xiron Platform Abstraction Layer - Win32 - Microsoft Visual Studio versions above 2010 (10.0) are not supported! 00058 #endif 00059 #endif 00060 00061 #include "Win32/XnPlatformWin32.h" 00062 #elif defined(ANDROID) && defined(__arm__) 00063 #include "Android-Arm/XnPlatformAndroid-Arm.h" 00064 #elif (linux && (i386 || __x86_64__)) 00065 #include "Linux-x86/XnPlatformLinux-x86.h" 00066 #elif (linux && __arm__) 00067 #include "Linux-Arm/XnPlatformLinux-Arm.h" 00068 #elif _ARC 00069 #include "ARC/XnPlatformARC.h" 00070 #elif (__APPLE__) 00071 #include "MacOSX/XnPlatformMacOSX.h" 00072 #else 00073 #if defined __INTEL_COMPILER 00074 #include "Linux/XnPlatformLinux.h" 00075 #else 00076 #error OpenNI Platform Abstraction Layer - Unsupported Platform! 00077 #endif 00078 #endif 00079 00080 00081 //--------------------------------------------------------------------------- 00082 // Basic Common Macros 00083 //--------------------------------------------------------------------------- 00084 #ifndef TRUE 00085 #define TRUE 1 00086 #endif 00087 00088 #ifndef FALSE 00089 #define FALSE 0 00090 #endif 00091 00092 #define XN_MIN(a,b) (((a) < (b)) ? (a) : (b)) 00093 00094 #define XN_MAX(a,b) (((a) > (b)) ? (a) : (b)) 00095 00096 typedef void (*XnFuncPtr)(); 00097 00098 #define XN_COMPILER_ASSERT(x) typedef int compileAssert[x ? 1 : -1] 00099 00100 struct XnRegistrationHandleImpl; 00101 typedef struct XnRegistrationHandleImpl* XnRegistrationHandle; 00102 00103 //--------------------------------------------------------------------------- 00104 // API Export/Import Macros 00105 //--------------------------------------------------------------------------- 00106 00107 #ifdef __cplusplus 00108 #define XN_C_API_EXPORT extern "C" XN_API_EXPORT 00109 #define XN_C_API_IMPORT extern "C" XN_API_IMPORT 00110 #define XN_CPP_API_EXPORT XN_API_EXPORT 00111 #define XN_CPP_API_IMPORT XN_API_IMPORT 00112 #else 00113 #define XN_C_API_EXPORT XN_API_EXPORT 00114 #define XN_C_API_IMPORT XN_API_IMPORT 00115 #endif 00116 00117 #ifdef XN_EXPORTS 00118 #define XN_C_API XN_C_API_EXPORT 00119 #define XN_CPP_API XN_CPP_API_EXPORT 00120 #else 00121 #define XN_C_API XN_C_API_IMPORT 00122 #define XN_CPP_API XN_CPP_API_IMPORT 00123 #endif 00124 00125 #endif //__XN_PLATFORM_H__ 00126
1.7.6.1