Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
2.6 KiB

  1. //================ Copyright (c) 1996-2009 Valve Corporation. All Rights Reserved. =================
  2. //
  3. //
  4. //
  5. //==================================================================================================
  6. #ifndef POSIX_WIN32STUBS_H
  7. #define POSIX_WIN32STUBS_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier0/basetypes.h"
  12. #include "tier0/platform.h"
  13. typedef int32 LRESULT;
  14. typedef void* HWND;
  15. typedef uint32 UINT;
  16. typedef uintp WPARAM;
  17. typedef uintp LPARAM;
  18. typedef uint8 BYTE;
  19. typedef int16 SHORT;
  20. typedef void* WNDPROC;
  21. typedef void* HANDLE;
  22. //typedef char xKey_t;
  23. #define XUSER_MAX_COUNT 2
  24. #if defined( _OSX )
  25. // [will] Added Xbox button constants for MacOSX
  26. typedef enum
  27. {
  28. XK_NULL,
  29. XK_BUTTON_UP,
  30. XK_BUTTON_DOWN,
  31. XK_BUTTON_LEFT,
  32. XK_BUTTON_RIGHT,
  33. XK_BUTTON_START,
  34. XK_BUTTON_BACK,
  35. XK_BUTTON_STICK1,
  36. XK_BUTTON_STICK2,
  37. XK_BUTTON_A,
  38. XK_BUTTON_B,
  39. XK_BUTTON_X,
  40. XK_BUTTON_Y,
  41. XK_BUTTON_LEFT_SHOULDER,
  42. XK_BUTTON_RIGHT_SHOULDER,
  43. XK_BUTTON_LTRIGGER,
  44. XK_BUTTON_RTRIGGER,
  45. XK_STICK1_UP,
  46. XK_STICK1_DOWN,
  47. XK_STICK1_LEFT,
  48. XK_STICK1_RIGHT,
  49. XK_STICK2_UP,
  50. XK_STICK2_DOWN,
  51. XK_STICK2_LEFT,
  52. XK_STICK2_RIGHT,
  53. XK_BUTTON_INACTIVE_START, // Special key that is passed through on disabled controllers
  54. XK_BUTTON_FIREMODE_SELECTOR_1,
  55. XK_BUTTON_FIREMODE_SELECTOR_2,
  56. XK_BUTTON_FIREMODE_SELECTOR_3,
  57. XK_BUTTON_RELOAD,
  58. XK_BUTTON_TRIGGER,
  59. XK_BUTTON_PUMP_ACTION,
  60. XK_XBUTTON_ROLL_RIGHT,
  61. XK_XBUTTON_ROLL_LEFT,
  62. XK_MAX_KEYS,
  63. } xKey_t;
  64. #else
  65. #define XK_MAX_KEYS 20
  66. #endif // _OSX
  67. typedef struct joyinfoex_tag
  68. {
  69. DWORD dwSize;
  70. DWORD dwFlags;
  71. DWORD dwXpos;
  72. DWORD dwYpos;
  73. DWORD dwZpos;
  74. DWORD dwRpos;
  75. DWORD dwUpos;
  76. DWORD dwVpos;
  77. DWORD dwButtons;
  78. DWORD dwButtonNumber;
  79. DWORD dwPOV;
  80. DWORD dwReserved1;
  81. DWORD dwReserved2;
  82. } JOYINFOEX, *LPJOYINFOEX;
  83. typedef struct _XINPUT_GAMEPAD
  84. {
  85. WORD wButtons;
  86. BYTE bLeftTrigger;
  87. BYTE bRightTrigger;
  88. SHORT sThumbLX;
  89. SHORT sThumbLY;
  90. SHORT sThumbRX;
  91. SHORT sThumbRY;
  92. } XINPUT_GAMEPAD, *PXINPUT_GAMEPAD;
  93. typedef struct _XINPUT_STATE
  94. {
  95. DWORD dwPacketNumber;
  96. XINPUT_GAMEPAD Gamepad;
  97. } XINPUT_STATE, *PXINPUT_STATE;
  98. typedef struct _XINPUT_VIBRATION
  99. {
  100. WORD wLeftMotorSpeed;
  101. WORD wRightMotorSpeed;
  102. } XINPUT_VIBRATION, *PXINPUT_VIBRATION;
  103. #endif // POSIX_WIN32STUBS_H