parin.bindings.steam
The steam module provides access to the Steamworks flat C API. These bindings match the Steamworks SDK v1.65 release and cover a subset of it: init, callbacks, user, friends, utils, stats and achievements, leaderboards, apps, cloud, screenshots and timeline. Link against steam_api64.dll (Windows), libsteam_api.so (Linux) or libsteam_api.dylib (macOS) from the SDK. Callbacks use manual dispatch because the C++ callback macros are not available outside of C++.
Types 59
A Steam ID as stored inside callback structures. It is byte aligned, so it can start at any offset.
ulong steamIDUsed by the manual dispatch functions.
k_iCallback k_iCallback k_iCallbackulong m_nGameIDbool m_bGroupAchievementchar[k_cchStatNameMax] m_rgchAchievementNameuint m_nCurProgressuint m_nMaxProgress k_iCallbackSteamLeaderboard_t m_hSteamLeaderboardSteamLeaderboardEntries_t m_hSteamLeaderboardEntriesint m_cEntryCount k_iCallbackubyte m_bSuccessSteamLeaderboard_t m_hSteamLeaderboardint m_nScoreubyte m_bScoreChangedint m_nGlobalRankNewint m_nGlobalRankPreviousFunctions 97
ESteamAPIInitResult SteamInternal_SteamAPI_Init(const(char) * pszInternalCheckInterfaceVersions, SteamErrMsg * pOutErrMsg) extern(C) @system nothrow @nogcbool SteamAPI_ManualDispatch_GetNextCallback(HSteamPipe hSteamPipe, CallbackMsg_t * pCallbackMsg) extern(C) @system nothrow @nogcvoid SteamAPI_ManualDispatch_FreeLastCallback(HSteamPipe hSteamPipe) extern(C) @system nothrow @nogcbool SteamAPI_ManualDispatch_GetAPICallResult(HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void * pCallback, int cubCallback, int iCallbackExpected, bool * pbFailed) extern(C) @system nothrow @nogcconst(char) * SteamAPI_ISteamFriends_GetPersonaName(ISteamFriends * self) extern(C) @system nothrow @nogcconst(char) * SteamAPI_ISteamFriends_GetFriendPersonaName(ISteamFriends * self, uint64_steamid steamIDFriend) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamFriends_ActivateGameOverlay(ISteamFriends * self, const(char) * pchDialog) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamFriends_ActivateGameOverlayToUser(ISteamFriends * self, const(char) * pchDialog, uint64_steamid steamID) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(ISteamFriends * self, const(char) * pchURL, EActivateGameOverlayToWebPageMode eMode) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamFriends_ActivateGameOverlayToStore(ISteamFriends * self, AppId_t nAppID, EOverlayToStoreFlag eFlag) extern(C) @system nothrow @nogcbool SteamAPI_ISteamFriends_SetRichPresence(ISteamFriends * self, const(char) * pchKey, const(char) * pchValue) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamFriends_ClearRichPresence(ISteamFriends * self) extern(C) @system nothrow @nogcuint SteamAPI_ISteamUtils_GetSecondsSinceAppActive(ISteamUtils * self) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUtils_IsAPICallCompleted(ISteamUtils * self, SteamAPICall_t hSteamAPICall, bool * pbFailed) extern(C) @system nothrow @nogcESteamAPICallFailure SteamAPI_ISteamUtils_GetAPICallFailureReason(ISteamUtils * self, SteamAPICall_t hSteamAPICall) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUtils_GetAPICallResult(ISteamUtils * self, SteamAPICall_t hSteamAPICall, void * pCallback, int cubCallback, int iCallbackExpected, bool * pbFailed) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamUtils_SetOverlayNotificationPosition(ISteamUtils * self, ENotificationPosition eNotificationPosition) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUtils_IsSteamInBigPictureMode(ISteamUtils * self) extern(C) @system nothrow @nogcESteamHardwareType SteamAPI_ISteamUtils_IsRunningOnSteamHardware(ISteamUtils * self) extern(C) @system nothrow @nogcESteamHardwareDefaultConfig SteamAPI_ISteamUtils_GetSteamHardwareDefaultConfig(ISteamUtils * self) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUtils_IsRunningUnderProton(ISteamUtils * self) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUtils_ShowGamepadTextInput(ISteamUtils * self, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const(char) * pchDescription, uint unCharMax, const(char) * pchExistingText) extern(C) @system nothrow @nogcuint SteamAPI_ISteamUtils_GetEnteredGamepadTextLength(ISteamUtils * self) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUtils_GetEnteredGamepadTextInput(ISteamUtils * self, char * pchText, uint cchText) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUtils_ShowFloatingGamepadTextInput(ISteamUtils * self, EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUtils_DismissFloatingGamepadTextInput(ISteamUtils * self) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUserStats_GetStatInt32(ISteamUserStats * self, const(char) * pchName, int * pData) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUserStats_GetStatFloat(ISteamUserStats * self, const(char) * pchName, float * pData) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUserStats_SetStatInt32(ISteamUserStats * self, const(char) * pchName, int nData) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUserStats_SetStatFloat(ISteamUserStats * self, const(char) * pchName, float fData) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUserStats_GetAchievement(ISteamUserStats * self, const(char) * pchName, bool * pbAchieved) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUserStats_SetAchievement(ISteamUserStats * self, const(char) * pchName) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUserStats_ClearAchievement(ISteamUserStats * self, const(char) * pchName) extern(C) @system nothrow @nogcconst(char) * SteamAPI_ISteamUserStats_GetAchievementDisplayAttribute(ISteamUserStats * self, const(char) * pchName, const(char) * pchKey) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUserStats_IndicateAchievementProgress(ISteamUserStats * self, const(char) * pchName, uint nCurProgress, uint nMaxProgress) extern(C) @system nothrow @nogcuint SteamAPI_ISteamUserStats_GetNumAchievements(ISteamUserStats * self) extern(C) @system nothrow @nogcconst(char) * SteamAPI_ISteamUserStats_GetAchievementName(ISteamUserStats * self, uint iAchievement) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUserStats_ResetAllStats(ISteamUserStats * self, bool bAchievementsToo) extern(C) @system nothrow @nogcSteamAPICall_t SteamAPI_ISteamUserStats_FindOrCreateLeaderboard(ISteamUserStats * self, const(char) * pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType) extern(C) @system nothrow @nogcSteamAPICall_t SteamAPI_ISteamUserStats_FindLeaderboard(ISteamUserStats * self, const(char) * pchLeaderboardName) extern(C) @system nothrow @nogcconst(char) * SteamAPI_ISteamUserStats_GetLeaderboardName(ISteamUserStats * self, SteamLeaderboard_t hSteamLeaderboard) extern(C) @system nothrow @nogcint SteamAPI_ISteamUserStats_GetLeaderboardEntryCount(ISteamUserStats * self, SteamLeaderboard_t hSteamLeaderboard) extern(C) @system nothrow @nogcSteamAPICall_t SteamAPI_ISteamUserStats_DownloadLeaderboardEntries(ISteamUserStats * self, SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd) extern(C) @system nothrow @nogcbool SteamAPI_ISteamUserStats_GetDownloadedLeaderboardEntry(ISteamUserStats * self, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t * pLeaderboardEntry, int * pDetails, int cDetailsMax) extern(C) @system nothrow @nogcSteamAPICall_t SteamAPI_ISteamUserStats_UploadLeaderboardScore(ISteamUserStats * self, SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, const(int) * pScoreDetails, int cScoreDetailsCount) extern(C) @system nothrow @nogcbool SteamAPI_ISteamApps_BIsSubscribedApp(ISteamApps * self, AppId_t appID) extern(C) @system nothrow @nogcbool SteamAPI_ISteamApps_BIsSubscribedFromFreeWeekend(ISteamApps * self) extern(C) @system nothrow @nogcbool SteamAPI_ISteamApps_BIsDlcInstalled(ISteamApps * self, AppId_t appID) extern(C) @system nothrow @nogcbool SteamAPI_ISteamApps_BGetDLCDataByIndex(ISteamApps * self, int iDLC, AppId_t * pAppID, bool * pbAvailable, char * pchName, int cchNameBufferSize) extern(C) @system nothrow @nogcconst(char) * SteamAPI_ISteamApps_GetCurrentGameLanguage(ISteamApps * self) extern(C) @system nothrow @nogcconst(char) * SteamAPI_ISteamApps_GetAvailableGameLanguages(ISteamApps * self) extern(C) @system nothrow @nogcint SteamAPI_ISteamApps_GetLaunchCommandLine(ISteamApps * self, char * pszCommandLine, int cubCommandLine) extern(C) @system nothrow @nogcbool SteamAPI_ISteamRemoteStorage_FileWrite(ISteamRemoteStorage * self, const(char) * pchFile, const(void) * pvData, int cubData) extern(C) @system nothrow @nogcint SteamAPI_ISteamRemoteStorage_FileRead(ISteamRemoteStorage * self, const(char) * pchFile, void * pvData, int cubDataToRead) extern(C) @system nothrow @nogcbool SteamAPI_ISteamRemoteStorage_FileForget(ISteamRemoteStorage * self, const(char) * pchFile) extern(C) @system nothrow @nogcbool SteamAPI_ISteamRemoteStorage_FileDelete(ISteamRemoteStorage * self, const(char) * pchFile) extern(C) @system nothrow @nogcbool SteamAPI_ISteamRemoteStorage_FileExists(ISteamRemoteStorage * self, const(char) * pchFile) extern(C) @system nothrow @nogcbool SteamAPI_ISteamRemoteStorage_FilePersisted(ISteamRemoteStorage * self, const(char) * pchFile) extern(C) @system nothrow @nogcint SteamAPI_ISteamRemoteStorage_GetFileSize(ISteamRemoteStorage * self, const(char) * pchFile) extern(C) @system nothrow @nogcint SteamAPI_ISteamRemoteStorage_GetFileCount(ISteamRemoteStorage * self) extern(C) @system nothrow @nogcconst(char) * SteamAPI_ISteamRemoteStorage_GetFileNameAndSize(ISteamRemoteStorage * self, int iFile, int * pnFileSizeInBytes) extern(C) @system nothrow @nogcbool SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount(ISteamRemoteStorage * self) extern(C) @system nothrow @nogcbool SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp(ISteamRemoteStorage * self) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamRemoteStorage_SetCloudEnabledForApp(ISteamRemoteStorage * self, bool bEnabled) extern(C) @system nothrow @nogcScreenshotHandle SteamAPI_ISteamScreenshots_WriteScreenshot(ISteamScreenshots * self, void * pubRGB, uint cubRGB, int nWidth, int nHeight) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamScreenshots_TriggerScreenshot(ISteamScreenshots * self) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamScreenshots_HookScreenshots(ISteamScreenshots * self, bool bHook) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamTimeline_SetTimelineTooltip(ISteamTimeline * self, const(char) * pchDescription, float flTimeDelta) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamTimeline_ClearTimelineTooltip(ISteamTimeline * self, float flTimeDelta) extern(C) @system nothrow @nogcvoid SteamAPI_ISteamTimeline_SetTimelineGameMode(ISteamTimeline * self, ETimelineGameMode eMode) extern(C) @system nothrow @nogcTimelineEventHandle_t SteamAPI_ISteamTimeline_AddInstantaneousTimelineEvent(ISteamTimeline * self, const(char) * pchTitle, const(char) * pchDescription, const(char) * pchIcon, uint unIconPriority, float flStartOffsetSeconds, ETimelineEventClipPriority ePossibleClip) extern(C) @system nothrow @nogcVariables 12
steamPackPointer = steamPack < (void *).sizeof ? steamPack : (void *).sizeofk_cchMaxSteamErrMsg = 1024k_cchStatNameMax = 128k_cchLeaderboardNameMax = 128k_uAPICallInvalid = 0k_iSteamUserCallbacks = 100k_iSteamFriendsCallbacks = 300k_iSteamUtilsCallbacks = 700k_iSteamAppsCallbacks = 1000k_iSteamUserStatsCallbacks = 1100k_iSteamRemoteStorageCallbacks = 1300steamInterfaceVersions = "SteamUtils011\0" ~
"STEAMAPPS_INTERFACE_VERSION009\0" ~
"SteamFriends018\0" ~
"STEAMREMOTESTORAGE_INTERFACE_VERSION016\0" ~
"STEAMSCREENSHOTS_INTERFACE_VERSION003\0" ~
"STEAMUSERSTATS_INTERFACE_VERSION013\0" ~
"SteamUser023\0" ~
"\0"The interface versions used by this module. Pass it to SteamInternal_SteamAPI_Init to init and check that the Steam client supports them, like SteamAPI_InitEx does in C++.