Refactor, GLFW->SDL
[vg.git] / vg_steam_utils.h
diff --git a/vg_steam_utils.h b/vg_steam_utils.h
new file mode 100644 (file)
index 0000000..e20c340
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef VG_STEAM_UTILS_H
+#define VG_STEAM_UTILS_H
+
+#include "vg_steam.h"
+
+#if defined( VALVE_CALLBACK_PACK_SMALL )
+ #pragma pack( push, 4 )
+#elif defined( VALVE_CALLBACK_PACK_LARGE )
+ #pragma pack( push, 8 )
+#endif 
+
+/* ... */
+
+#pragma pack(pop)
+
+typedef void ISteamUtils;
+typedef void ISteamInput;
+
+ISteamUtils *SteamAPI_SteamUtils_v010(void);
+ISteamUtils *SteamAPI_SteamUtils(void)
+{
+   return SteamAPI_SteamUtils_v010();
+}
+
+int SteamAPI_ISteamUtils_SetWarningMessageHook( 
+      ISteamUtils *self, void( *fn_print )(int, const char *) );
+
+
+ISteamInput *SteamAPI_SteamInput_v006(void);
+ISteamInput *SteamAPI_SteamInput(void)
+{
+   return SteamAPI_SteamInput_v006();
+}
+
+typedef u64 InputHandle_t;
+
+typedef enum ESteamInputType ESteamInputType;
+enum ESteamInputType
+{
+   k_ESteamInputType_Unknown,
+   k_ESteamInputType_SteamController,
+   k_ESteamInputType_XBox360Controller,
+   k_ESteamInputType_XBoxOneController,
+   k_ESteamInputType_GenericGamepad,
+   k_ESteamInputType_PS4Controller,
+   k_ESteamInputType_AppleMFiController,
+   k_ESteamInputType_AndroidController,
+   k_ESteamInputType_SwitchJoyConPair,
+   k_ESteamInputType_SwitchJoyConSingle,
+   k_ESteamInputType_SwitchProController,
+   k_ESteamInputType_MobileTouch,
+   k_ESteamInputType_PS3Controller,
+   k_ESteamInputType_PS5Controller,
+   k_ESteamInputType_SteamDeckController,      // Added in SDK 153
+   k_ESteamInputType_Count,
+   k_ESteamInputType_MaximumPossibleValue = 255,
+};
+
+int SteamAPI_ISteamInput_Init( ISteamInput* self, int bExplicitlyCallRunFrame );
+int SteamAPI_ISteamInput_Shutdown( ISteamInput* self );
+InputHandle_t SteamAPI_ISteamInput_GetControllerForGamepadIndex( 
+                  ISteamInput* self, int nIndex );
+ESteamInputType SteamAPI_ISteamInput_GetInputTypeForHandle( 
+                  ISteamInput* self, InputHandle_t inputHandle );
+void SteamAPI_ISteamInput_RunFrame( ISteamInput* self, int bReservedValue );
+
+
+#endif /* VG_STEAM_UTILS_H */