windows.i 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /* -----------------------------------------------------------------------------
  2. * windows.i
  3. *
  4. * SWIG library file to support types found in windows.h as well as Microsoft
  5. * integral type extensions. The types are set for 32 bit Windows.
  6. * ----------------------------------------------------------------------------- */
  7. // Support for non ISO (Windows) integral types
  8. %apply unsigned char { unsigned __int8 };
  9. %apply const unsigned char& { const unsigned __int8& };
  10. %apply signed char { __int8 };
  11. %apply const signed char& { const __int8& };
  12. %apply unsigned short { unsigned __int16 };
  13. %apply const unsigned short& { const unsigned __int16& };
  14. %apply short { __int16 };
  15. %apply const short& { const __int16& };
  16. %apply unsigned int { unsigned __int32 };
  17. %apply const unsigned int& { const unsigned __int32& };
  18. %apply int { __int32 };
  19. %apply const int& { const __int32& };
  20. %apply unsigned long long { unsigned __int64 };
  21. %apply const unsigned long long& { const unsigned __int64& };
  22. %apply long long { __int64 };
  23. %apply const long long& { const __int64& };
  24. // Workaround Microsoft calling conventions
  25. #define __cdecl
  26. #define __fastcall
  27. #define __far
  28. #define __forceinline
  29. #define __fortran
  30. #define __inline
  31. #define __pascal
  32. #define __stdcall
  33. #define __syscall
  34. #define _cdecl
  35. #define _fastcall
  36. #define _inline
  37. #define _pascal
  38. #define _stdcall
  39. #define WINAPI
  40. #define __declspec(WINDOWS_EXTENDED_ATTRIBUTE)
  41. #define __w64
  42. // Types from windef.h
  43. typedef unsigned long ULONG;
  44. typedef ULONG *PULONG;
  45. typedef unsigned short USHORT;
  46. typedef USHORT *PUSHORT;
  47. typedef unsigned char UCHAR;
  48. typedef UCHAR *PUCHAR;
  49. typedef char *PSZ;
  50. typedef unsigned long DWORD;
  51. typedef int BOOL;
  52. typedef unsigned char BYTE;
  53. typedef unsigned short WORD;
  54. typedef float FLOAT;
  55. typedef FLOAT *PFLOAT;
  56. typedef BOOL *PBOOL;
  57. typedef BOOL *LPBOOL;
  58. typedef BYTE *PBYTE;
  59. typedef BYTE *LPBYTE;
  60. typedef int *PINT;
  61. typedef int *LPINT;
  62. typedef WORD *PWORD;
  63. typedef WORD *LPWORD;
  64. typedef long *LPLONG;
  65. typedef DWORD *PDWORD;
  66. typedef DWORD *LPDWORD;
  67. typedef void *LPVOID;
  68. typedef const void *LPCVOID;
  69. typedef int INT;
  70. typedef unsigned int UINT;
  71. typedef unsigned int *PUINT;
  72. // Types from basetsd.h
  73. typedef signed char INT8, *PINT8;
  74. typedef signed short INT16, *PINT16;
  75. typedef signed int INT32, *PINT32;
  76. typedef signed __int64 INT64, *PINT64;
  77. typedef unsigned char UINT8, *PUINT8;
  78. typedef unsigned short UINT16, *PUINT16;
  79. typedef unsigned int UINT32, *PUINT32;
  80. typedef unsigned __int64 UINT64, *PUINT64;
  81. typedef signed int LONG32, *PLONG32;
  82. typedef unsigned int ULONG32, *PULONG32;
  83. typedef unsigned int DWORD32, *PDWORD32;
  84. typedef __w64 int INT_PTR, *PINT_PTR;
  85. typedef __w64 unsigned int UINT_PTR, *PUINT_PTR;
  86. typedef __w64 long LONG_PTR, *PLONG_PTR;
  87. typedef __w64 unsigned long ULONG_PTR, *PULONG_PTR;
  88. typedef unsigned short UHALF_PTR, *PUHALF_PTR;
  89. typedef short HALF_PTR, *PHALF_PTR;
  90. typedef __w64 long SHANDLE_PTR;
  91. typedef __w64 unsigned long HANDLE_PTR;
  92. typedef ULONG_PTR SIZE_T, *PSIZE_T;
  93. typedef LONG_PTR SSIZE_T, *PSSIZE_T;
  94. typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
  95. typedef __int64 LONG64, *PLONG64;
  96. typedef unsigned __int64 ULONG64, *PULONG64;
  97. typedef unsigned __int64 DWORD64, *PDWORD64;
  98. // Types from winnt.h
  99. typedef void *PVOID;
  100. typedef void *PVOID64;
  101. typedef char CHAR;
  102. typedef short SHORT;
  103. typedef long LONG;
  104. typedef CHAR *PCHAR;
  105. typedef CHAR *LPCH, *PCH;
  106. typedef const CHAR *LPCCH, *PCCH;
  107. typedef CHAR *NPSTR;
  108. typedef CHAR *LPSTR, *PSTR;
  109. typedef const CHAR *LPCSTR, *PCSTR;
  110. typedef char TCHAR, *PTCHAR;
  111. typedef unsigned char TBYTE , *PTBYTE ;
  112. typedef LPSTR LPTCH, PTCH;
  113. typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR;
  114. typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR;
  115. typedef SHORT *PSHORT;
  116. typedef LONG *PLONG;
  117. typedef void *HANDLE;
  118. typedef HANDLE *PHANDLE;
  119. typedef BYTE FCHAR;
  120. typedef WORD FSHORT;
  121. typedef DWORD FLONG;
  122. typedef LONG HRESULT;
  123. typedef char CCHAR;
  124. typedef DWORD LCID;
  125. typedef PDWORD PLCID;
  126. typedef WORD LANGID;
  127. typedef __int64 LONGLONG;
  128. typedef unsigned __int64 ULONGLONG;
  129. typedef LONGLONG *PLONGLONG;
  130. typedef ULONGLONG *PULONGLONG;
  131. typedef ULONGLONG DWORDLONG;
  132. typedef DWORDLONG *PDWORDLONG;
  133. typedef BYTE BOOLEAN;
  134. typedef BOOLEAN *PBOOLEAN;