XnOSWin32.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002 *                                                                            *
00003 *  OpenNI 1.0 Alpha                                                          *
00004 *  Copyright (C) 2010 PrimeSense Ltd.                                        *
00005 *                                                                            *
00006 *  This file is part of OpenNI.                                              *
00007 *                                                                            *
00008 *  OpenNI is free software: you can redistribute it and/or modify            *
00009 *  it under the terms of the GNU Lesser General Public License as published  *
00010 *  by the Free Software Foundation, either version 3 of the License, or      *
00011 *  (at your option) any later version.                                       *
00012 *                                                                            *
00013 *  OpenNI is distributed in the hope that it will be useful,                 *
00014 *  but WITHOUT ANY WARRANTY; without even the implied warranty of            *
00015 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the              *
00016 *  GNU Lesser General Public License for more details.                       *
00017 *                                                                            *
00018 *  You should have received a copy of the GNU Lesser General Public License  *
00019 *  along with OpenNI. If not, see <http://www.gnu.org/licenses/>.            *
00020 *                                                                            *
00021 *****************************************************************************/
00022 
00023 
00024 
00025 
00026 #ifndef __XN_OS_WIN32_H__
00027 #define __XN_OS_WIN32_H__
00028 
00029 //---------------------------------------------------------------------------
00030 // Prerequisites
00031 //---------------------------------------------------------------------------
00032 #ifndef WINVER                                          // Allow use of features specific to Windows XP or later
00033 #define WINVER 0x0501
00034 #endif
00035 #ifndef _WIN32_WINNT                            // Allow use of features specific to Windows XP or later
00036 #define _WIN32_WINNT 0x0501
00037 #endif                                          
00038 #ifndef _WIN32_WINDOWS                          // Allow use of features specific to Windows 98 or later
00039 #define _WIN32_WINDOWS 0x0410
00040 #endif
00041 #ifndef _WIN32_IE                                       // Allow use of features specific to IE 6.0 or later
00042 #define _WIN32_IE 0x0600
00043 #endif
00044 #define WIN32_LEAN_AND_MEAN                     // Exclude rarely-used stuff from Windows headers
00045 
00046 #define _CRT_SECURE_NO_DEPRECATE 1      // Undeprecate CRT functions
00047 
00048 //---------------------------------------------------------------------------
00049 // Includes
00050 //---------------------------------------------------------------------------
00051 #include <windows.h>
00052 #include <time.h>
00053 #include <stdlib.h>
00054 #include <stdio.h>
00055 #include <malloc.h>
00056 #include <io.h>
00057 #include <assert.h>
00058 #include <float.h>
00059 #include <crtdbg.h>
00060 
00061 //---------------------------------------------------------------------------
00062 // Files
00063 //---------------------------------------------------------------------------
00065 typedef HANDLE  XN_HANDLE;
00066 
00068 typedef HANDLE  XN_FILE_HANDLE;
00069 
00071 static const XN_FILE_HANDLE XN_INVALID_FILE_HANDLE = INVALID_HANDLE_VALUE;
00072 
00074 #define XN_FILE_LOCAL_DIR ".\\"
00075 
00077 #define XN_FILE_DIR_SEP "\\"
00078 
00080 #define XN_FILE_EXT_SEP "."
00081 
00083 #define XN_FILE_ALL_WILDCARD "*"
00084 
00086 #define XN_NEW_LINE_SEP "\r\n"
00087 
00088 //---------------------------------------------------------------------------
00089 // INI Files
00090 //---------------------------------------------------------------------------
00092 #define XN_INI_FILE_EXT "ini"
00093 
00095 // Note: This must always be big enough to contain a 32-bit number!
00096 #define XN_INI_MAX_LEN 256
00097 
00098 //---------------------------------------------------------------------------
00099 // Shared Libraries
00100 //---------------------------------------------------------------------------
00102 typedef HMODULE XN_LIB_HANDLE;
00103 
00105 #define XN_SHARED_LIBRARY_PREFIX ""
00106 
00108 #define XN_SHARED_LIBRARY_POSTFIX ".dll"
00109 
00110 //---------------------------------------------------------------------------
00111 // Threads
00112 //---------------------------------------------------------------------------
00114 typedef HANDLE XN_THREAD_HANDLE;
00115 
00117 typedef DWORD XN_THREAD_ID;
00118 
00120 typedef DWORD XN_PROCESS_ID;
00121 
00123 typedef LPTHREAD_START_ROUTINE XN_THREAD_PROC_PROTO;
00124 
00126 #define XN_THREAD_PROC DWORD WINAPI
00127 
00129 #define XN_THREAD_PROC_RETURN(ret) return(ret)
00130 
00132 typedef LPVOID XN_THREAD_PARAM;
00133 
00134 //---------------------------------------------------------------------------
00135 // Time Outs
00136 //---------------------------------------------------------------------------
00138 #define XN_WAIT_INFINITE INFINITE
00139 
00140 //---------------------------------------------------------------------------
00141 // Mutex
00142 //---------------------------------------------------------------------------
00144 typedef HANDLE XN_MUTEX_HANDLE;
00145 
00146 //---------------------------------------------------------------------------
00147 // Critical Sections
00148 //---------------------------------------------------------------------------
00150 typedef CRITICAL_SECTION* XN_CRITICAL_SECTION_HANDLE;
00151 
00152 //---------------------------------------------------------------------------
00153 // Events
00154 //---------------------------------------------------------------------------
00156 typedef HANDLE XN_EVENT_HANDLE;
00157 
00158 //---------------------------------------------------------------------------
00159 // Timer
00160 //---------------------------------------------------------------------------
00162 typedef struct XnOSTimer
00163 {
00164         XnDouble dTicksPerTimeUnit;
00165         LARGE_INTEGER nStartTick;
00166 } XnOSTimer;
00167 
00168 //---------------------------------------------------------------------------
00169 // Network
00170 //---------------------------------------------------------------------------
00172 #define XN_NETWORK_HOST_PORT_SEP ":"
00173 
00174 //---------------------------------------------------------------------------
00175 // Swaps
00176 //---------------------------------------------------------------------------
00177 #define XN_PREPARE_VAR16_IN_BUFFER(var) (var)
00178 #define XN_PREPARE_VAR32_IN_BUFFER(var) (var)
00179 #define XN_PREPARE_VAR64_IN_BUFFER(var) (var)
00180 #define XN_PREPARE_VAR_FLOAT_IN_BUFFER(var) (var)
00181 
00182 #endif //__XN_OS_WIN32_H__


nao_openni
Author(s): Bener SUAY
autogenerated on Mon Jan 6 2014 11:27:51