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