| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
#ifndef _XN_PLATFORM_H_ |
| 22 |
#define _XN_PLATFORM_H_ |
| 23 |
|
| 24 |
#define XN_PLATFORM_WIN32 1 |
| 25 |
#define XN_PLATFORM_XBOX360 2 |
| 26 |
#define XN_PLATFORM_PS3 3 |
| 27 |
#define XN_PLATFORM_WII 4 |
| 28 |
#define XN_PLATFORM_LINUX_X86 5 |
| 29 |
#define XN_PLATFORM_FILES_ONLY 6 |
| 30 |
#define XN_PLATFORM_ARC 6 |
| 31 |
#define XN_PLATFORM_LINUX_ARM 7 |
| 32 |
#define XN_PLATFORM_MACOSX 8 |
| 33 |
#define XN_PLATFORM_ANDROID_ARM 9 |
| •34 |
#define XN_PLATFORM_LINUX_GENERIC 10 |
| 35 |
|
| 36 |
#define XN_PLATFORM_IS_LITTLE_ENDIAN 1 |
| 37 |
#define XN_PLATFORM_IS_BIG_ENDIAN 2 |
| 38 |
|
| 39 |
#define XN_PLATFORM_USE_NO_VAARGS 1 |
| 40 |
#define XN_PLATFORM_USE_WIN32_VAARGS_STYLE 2 |
| 41 |
#define XN_PLATFORM_USE_GCC_VAARGS_STYLE 3 |
| 42 |
#define XN_PLATFORM_USE_ARC_VAARGS_STYLE 4 |
| 43 |
|
| 44 |
#if (defined _WIN32) |
| 45 |
#ifndef RC_INVOKED |
| 46 |
#if _MSC_VER < 1300 |
| 47 |
#error OpenNI Platform Abstraction Layer - Win32 - Microsoft Visual Studio version below 2003 (7.0) are not supported! |
| 48 |
#endif |
| 49 |
#endif |
| 50 |
#include "Win32/XnPlatformWin32.h" |
| 51 |
#elif defined (ANDROID) && defined (__arm__) |
| 52 |
#include "Android-Arm/XnPlatformAndroid-Arm.h" |
| 53 |
#elif (__linux__ && (i386 || __x86_64__)) |
| 54 |
#include "Linux-x86/XnPlatformLinux-x86.h" |
| 55 |
#elif (__linux__ && __arm__) |
| 56 |
#include "Linux-Arm/XnPlatformLinux-Arm.h" |
| •57 |
#elif (__linux__) |
| 58 |
#include "Linux-generic/XnPlatformLinux-generic.h" |
| 59 |
#elif _ARC |
| 60 |
#include "ARC/XnPlaformARC.h" |
| 61 |
#elif (__APPLE__) |
| 62 |
#include "MacOSX/XnPlatformMacOSX.h" |
| 63 |
#else |
| 64 |
#error Xiron Platform Abstraction Layer - Unsupported Platform! |
| 65 |
#endif |
| 66 |
|
| 67 |
#define XN_MAX_OS_NAME_LENGTH 255 |
| 68 |
|
| 69 |
typedef struct xnOSInfo |
| 70 |
{ |
| 71 |
XnChar csOSName[XN_MAX_OS_NAME_LENGTH]; |
| 72 |
XnChar csCPUName[XN_MAX_OS_NAME_LENGTH]; |
| 73 |
XnUInt32 nProcessorsCount; |
| 74 |
XnUInt64 nTotalMemory; |
| 75 |
} xnOSInfo; |
| 76 |
|
| 77 |
#ifdef __cplusplus |
| 78 |
#define XN_C_API_EXPORT extern "C" XN_API_EXPORT |
| 79 |
#define XN_C_API_IMPORT extern "C" XN_API_IMPORT |
| 80 |
#define XN_CPP_API_EXPORT XN_API_EXPORT |
| 81 |
#define XN_CPP_API_IMPORT XN_API_IMPORT |
| 82 |
#define XN_C_API extern "C" |
| 83 |
#define XN_CPP_API |
| 84 |
#else // __cplusplus |
| 85 |
#define XN_C_API_EXPORT XN_API_EXPORT |
| 86 |
#define XN_C_API_IMPORT XN_API_IMPORT |
| 87 |
#define XN_C_API |
| 88 |
#endif |
| 89 |
|
| 90 |
struct XnCallbackHandleImpl; |
| 91 |
typedef struct XnCallbackHandleImpl* XnCallbackHandle; |
| 92 |
typedef int XnStatus; |
| 93 |
|
| 94 |
#ifndef TRUE |
| 95 |
#define TRUE 1 |
| 96 |
#endif |
| 97 |
#ifndef FALSE |
| 98 |
#define FALSE 0 |
| 99 |
#endif |
| 100 |
|
| 101 |
#define XN_MIN(a,b) (((a) < (b)) ? (a) : (b)) |
| 102 |
|
| 103 |
#define XN_MAX(a,b) (((a) > (b)) ? (a) : (b)) |
| 104 |
|
| 105 |
typedef void (*XnFuncPtr)(); |
| 106 |
|
| 107 |
struct XnRegistrationHandleImpl; |
| 108 |
typedef struct XnRegistrationHandleImpl* XnRegistrationHandle; |
| 109 |
|
| 110 |
#endif |