From 1e1eb00e04d28e358bfd9eb9d50b32641a0a032d Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Thu, 11 Apr 2019 16:37:51 +0100 Subject: [PATCH] Fixes, Codegen --- .../Interfaces/Inventory.Definition.cs | 2 +- .../SteamNative/SteamNative.Constants.cs | 24 +- .../SteamNative/SteamNative.Enums.cs | 583 +- .../SteamNative.Platform.Interface.cs | 99 +- .../SteamNative.Platform.Linux64.cs | 617 +- .../SteamNative/SteamNative.Platform.Mac.cs | 617 +- .../SteamNative/SteamNative.Platform.Win64.cs | 608 +- .../SteamNative/SteamNative.SteamApps.cs | 18 + .../SteamNative/SteamNative.SteamClient.cs | 24 + .../SteamNative.SteamController.cs | 54 +- .../SteamNative/SteamNative.SteamFriends.cs | 10 +- .../SteamNative.SteamGameSearch.cs | 137 + .../SteamNative.SteamHTMLSurface.cs | 10 +- .../SteamNative/SteamNative.SteamInput.cs | 255 + .../SteamNative/SteamNative.SteamInventory.cs | 8 +- .../SteamNative/SteamNative.SteamParties.cs | 151 + .../SteamNative/SteamNative.SteamUGC.cs | 12 + .../SteamNative/SteamNative.SteamUser.cs | 12 + .../SteamNative/SteamNative.Structs.cs | 6759 ++++++----------- .../SteamNative/SteamNative.Types.cs | 75 + Generator/CodeWriter/Struct.cs | 5 +- Generator/steam_api_missing.json | 68 + Generator/steam_sdk/steam_api.json | 7 +- 23 files changed, 5538 insertions(+), 4617 deletions(-) create mode 100644 Facepunch.Steamworks/SteamNative/SteamNative.SteamGameSearch.cs create mode 100644 Facepunch.Steamworks/SteamNative/SteamNative.SteamInput.cs create mode 100644 Facepunch.Steamworks/SteamNative/SteamNative.SteamParties.cs diff --git a/Facepunch.Steamworks/Interfaces/Inventory.Definition.cs b/Facepunch.Steamworks/Interfaces/Inventory.Definition.cs index a49e62e..996ac19 100644 --- a/Facepunch.Steamworks/Interfaces/Inventory.Definition.cs +++ b/Facepunch.Steamworks/Interfaces/Inventory.Definition.cs @@ -250,7 +250,7 @@ internal void InRecipe( Recipe r ) internal void UpdatePrice() { - if ( inventory.inventory.GetItemPrice( Id, out ulong price) ) + if ( inventory.inventory.GetItemPrice( Id, out ulong price, out ulong basePrice ) ) { LocalPrice = price / 100.0; LocalPriceFormatted = Utility.FormatPrice( inventory.Currency, price ); diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Constants.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Constants.cs index 802775a..dca17e2 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Constants.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Constants.cs @@ -18,6 +18,8 @@ internal static class CallbackIdentifiers public const int SteamApps = 1000; public const int SteamUserStats = 1100; public const int SteamNetworking = 1200; + public const int SteamNetworkingSockets = 1220; + public const int SteamNetworkingMessages = 1250; public const int ClientRemoteStorage = 1300; public const int ClientDepotBuilder = 1400; public const int SteamGameServerItems = 1500; @@ -57,30 +59,38 @@ internal static class CallbackIdentifiers public const int ClientSharedConnection = 4900; public const int SteamParentalSettings = 5000; public const int ClientShader = 5100; + public const int SteamGameSearch = 5200; + public const int SteamParties = 5300; + public const int ClientParties = 5400; } internal static class Defines { internal const string STEAMAPPLIST_INTERFACE_VERSION = "STEAMAPPLIST_INTERFACE_VERSION001"; internal const string STEAMAPPS_INTERFACE_VERSION = "STEAMAPPS_INTERFACE_VERSION008"; internal const string STEAMAPPTICKET_INTERFACE_VERSION = "STEAMAPPTICKET_INTERFACE_VERSION001"; - internal const string STEAMCONTROLLER_INTERFACE_VERSION = "SteamController006"; - internal const string STEAMFRIENDS_INTERFACE_VERSION = "SteamFriends015"; + internal const string STEAMCONTROLLER_INTERFACE_VERSION = "SteamController007"; + internal const string STEAMFRIENDS_INTERFACE_VERSION = "SteamFriends017"; internal const string STEAMGAMECOORDINATOR_INTERFACE_VERSION = "SteamGameCoordinator001"; internal const string STEAMGAMESERVER_INTERFACE_VERSION = "SteamGameServer012"; internal const string STEAMGAMESERVERSTATS_INTERFACE_VERSION = "SteamGameServerStats001"; - internal const string STEAMHTMLSURFACE_INTERFACE_VERSION = "STEAMHTMLSURFACE_INTERFACE_VERSION_004"; - internal const string STEAMHTTP_INTERFACE_VERSION = "STEAMHTTP_INTERFACE_VERSION002"; - internal const string STEAMINVENTORY_INTERFACE_VERSION = "STEAMINVENTORY_INTERFACE_V002"; + internal const string STEAMHTMLSURFACE_INTERFACE_VERSION = "STEAMHTMLSURFACE_INTERFACE_VERSION_005"; + internal const string STEAMHTTP_INTERFACE_VERSION = "STEAMHTTP_INTERFACE_VERSION003"; + internal const string STEAMINPUT_INTERFACE_VERSION = "SteamInput001"; + internal const string STEAMINVENTORY_INTERFACE_VERSION = "STEAMINVENTORY_INTERFACE_V003"; internal const string STEAMMATCHMAKING_INTERFACE_VERSION = "SteamMatchMaking009"; internal const string STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION = "SteamMatchMakingServers002"; + internal const string STEAMGAMESEARCH_INTERFACE_VERSION = "SteamMatchGameSearch001"; + internal const string STEAMPARTIES_INTERFACE_VERSION = "SteamParties002"; internal const string STEAMMUSIC_INTERFACE_VERSION = "STEAMMUSIC_INTERFACE_VERSION001"; internal const string STEAMMUSICREMOTE_INTERFACE_VERSION = "STEAMMUSICREMOTE_INTERFACE_VERSION001"; internal const string STEAMNETWORKING_INTERFACE_VERSION = "SteamNetworking005"; + internal const string STEAMNETWORKINGSOCKETS_INTERFACE_VERSION = "SteamNetworkingSockets002"; + internal const string STEAMNETWORKINGUTILS_INTERFACE_VERSION = "SteamNetworkingUtils001"; internal const string STEAMPARENTALSETTINGS_INTERFACE_VERSION = "STEAMPARENTALSETTINGS_INTERFACE_VERSION001"; internal const string STEAMREMOTESTORAGE_INTERFACE_VERSION = "STEAMREMOTESTORAGE_INTERFACE_VERSION014"; internal const string STEAMSCREENSHOTS_INTERFACE_VERSION = "STEAMSCREENSHOTS_INTERFACE_VERSION003"; - internal const string STEAMUGC_INTERFACE_VERSION = "STEAMUGC_INTERFACE_VERSION010"; - internal const string STEAMUSER_INTERFACE_VERSION = "SteamUser019"; + internal const string STEAMUGC_INTERFACE_VERSION = "STEAMUGC_INTERFACE_VERSION012"; + internal const string STEAMUSER_INTERFACE_VERSION = "SteamUser020"; internal const string STEAMUSERSTATS_INTERFACE_VERSION = "STEAMUSERSTATS_INTERFACE_VERSION011"; internal const string STEAMUTILS_INTERFACE_VERSION = "SteamUtils009"; internal const string STEAMVIDEO_INTERFACE_VERSION = "STEAMVIDEO_INTERFACE_V002"; diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Enums.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Enums.cs index f57eb40..7b4f975 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Enums.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Enums.cs @@ -133,6 +133,7 @@ internal enum Result : int WGNetworkSendExceeded = 110, AccountNotFriends = 111, LimitedUserAccount = 112, + CantRemoveItem = 113, } // @@ -405,6 +406,16 @@ internal enum BroadcastUploadResult : int MissingAudio = 11, TooFarBehind = 12, TranscodeBehind = 13, + NotAllowedToPlay = 14, + Busy = 15, + Banned = 16, + AlreadyActive = 17, + ForcedOff = 18, + AudioBehind = 19, + Shutdown = 20, + Disconnect = 21, + VideoInitFailed = 22, + AudioInitFailed = 23, } // @@ -441,6 +452,7 @@ internal enum VRHMDType : int HTC_Dev = 1, HTC_VivePre = 2, HTC_Vive = 3, + HTC_VivePro = 4, HTC_Unknown = 20, Oculus_DK1 = 21, Oculus_DK2 = 22, @@ -458,6 +470,34 @@ internal enum VRHMDType : int Samsung_Odyssey = 91, Unannounced_Unknown = 100, Unannounced_WindowsMR = 101, + vridge = 110, + Huawei_Unknown = 120, + Huawei_VR2 = 121, + Huawei_Unannounced = 129, + } + + // + // EMarketNotAllowedReasonFlags + // + internal enum MarketNotAllowedReasonFlags : int + { + None = 0, + TemporaryFailure = 1, + AccountDisabled = 2, + AccountLockedDown = 4, + AccountLimited = 8, + TradeBanned = 16, + AccountNotTrusted = 32, + SteamGuardNotEnabled = 64, + SteamGuardOnlyRecentlyEnabled = 128, + RecentPasswordReset = 256, + NewPaymentMethod = 512, + InvalidCookie = 1024, + UsingNewDevice = 2048, + RecentSelfRefund = 4096, + NewPaymentMethodCannotBeVerified = 8192, + NoRecentPurchases = 16384, + AcceptedWalletGift = 32768, } // @@ -471,6 +511,34 @@ internal enum GameIDType : int P2P = 3, } + // + // EGameSearchErrorCode_t + // + internal enum GameSearchErrorCode_t : int + { + OK = 1, + Failed_Search_Already_In_Progress = 2, + Failed_No_Search_In_Progress = 3, + Failed_Not_Lobby_Leader = 4, + Failed_No_Host_Available = 5, + Failed_Search_Params_Invalid = 6, + Failed_Offline = 7, + Failed_NotAuthorized = 8, + Failed_Unknown_Error = 9, + } + + // + // EPlayerResult_t + // + internal enum PlayerResult_t : int + { + FailedToConnect = 1, + Abandoned = 2, + Kicked = 3, + Incomplete = 4, + Completed = 5, + } + // // IPCFailure_t::EFailureType // @@ -508,7 +576,8 @@ internal enum PersonaState : int Snooze = 4, LookingToTrade = 5, LookingToPlay = 6, - Max = 7, + Invisible = 7, + Max = 8, } // @@ -555,6 +624,15 @@ internal enum OverlayToStoreFlag : int AddToCartAndShow = 2, } + // + // EActivateGameOverlayToWebPageMode + // + internal enum ActivateGameOverlayToWebPageMode : int + { + Default = 0, + Modal = 1, + } + // // EPersonaChange // @@ -571,9 +649,10 @@ internal enum PersonaChange : int LeftSource = 256, RelationshipChanged = 512, NameFirstSet = 1024, - FacebookInfo = 2048, + Broadcast = 2048, Nickname = 4096, SteamLevel = 8192, + RichPresence = 16384, } // @@ -675,6 +754,38 @@ internal enum ChatMemberStateChange : int Banned = 16, } + // + // ESteamPartyBeaconLocationType + // + internal enum SteamPartyBeaconLocationType : int + { + Invalid = 0, + ChatGroup = 1, + Max = 2, + } + + // + // ESteamPartyBeaconLocationData + // + internal enum SteamPartyBeaconLocationData : int + { + Invalid = 0, + Name = 1, + IconURLSmall = 2, + IconURLMedium = 3, + IconURLLarge = 4, + } + + // + // RequestPlayersForGameResultCallback_t::PlayerAcceptState_t + // + internal enum PlayerAcceptState_t : int + { + Unknown = 0, + PlayerAccepted = 1, + PlayerDeclined = 2, + } + // // ERemoteStoragePlatform // @@ -686,6 +797,7 @@ internal enum RemoteStoragePlatform : int PS3 = 4, Linux = 8, Reserved2 = 16, + Android = 32, All = -1, } @@ -973,6 +1085,358 @@ internal enum HTTPStatusCode : int HTTPStatusCode5xxUnknown = 599, } + // + // EInputSource + // + internal enum InputSource : int + { + None = 0, + LeftTrackpad = 1, + RightTrackpad = 2, + Joystick = 3, + ABXY = 4, + Switch = 5, + LeftTrigger = 6, + RightTrigger = 7, + LeftBumper = 8, + RightBumper = 9, + Gyro = 10, + CenterTrackpad = 11, + RightJoystick = 12, + DPad = 13, + Key = 14, + Mouse = 15, + LeftGyro = 16, + Count = 17, + } + + // + // EInputSourceMode + // + internal enum InputSourceMode : int + { + None = 0, + Dpad = 1, + Buttons = 2, + FourButtons = 3, + AbsoluteMouse = 4, + RelativeMouse = 5, + JoystickMove = 6, + JoystickMouse = 7, + JoystickCamera = 8, + ScrollWheel = 9, + Trigger = 10, + TouchMenu = 11, + MouseJoystick = 12, + MouseRegion = 13, + RadialMenu = 14, + SingleButton = 15, + Switches = 16, + } + + // + // EInputActionOrigin + // + internal enum InputActionOrigin : int + { + None = 0, + SteamController_A = 1, + SteamController_B = 2, + SteamController_X = 3, + SteamController_Y = 4, + SteamController_LeftBumper = 5, + SteamController_RightBumper = 6, + SteamController_LeftGrip = 7, + SteamController_RightGrip = 8, + SteamController_Start = 9, + SteamController_Back = 10, + SteamController_LeftPad_Touch = 11, + SteamController_LeftPad_Swipe = 12, + SteamController_LeftPad_Click = 13, + SteamController_LeftPad_DPadNorth = 14, + SteamController_LeftPad_DPadSouth = 15, + SteamController_LeftPad_DPadWest = 16, + SteamController_LeftPad_DPadEast = 17, + SteamController_RightPad_Touch = 18, + SteamController_RightPad_Swipe = 19, + SteamController_RightPad_Click = 20, + SteamController_RightPad_DPadNorth = 21, + SteamController_RightPad_DPadSouth = 22, + SteamController_RightPad_DPadWest = 23, + SteamController_RightPad_DPadEast = 24, + SteamController_LeftTrigger_Pull = 25, + SteamController_LeftTrigger_Click = 26, + SteamController_RightTrigger_Pull = 27, + SteamController_RightTrigger_Click = 28, + SteamController_LeftStick_Move = 29, + SteamController_LeftStick_Click = 30, + SteamController_LeftStick_DPadNorth = 31, + SteamController_LeftStick_DPadSouth = 32, + SteamController_LeftStick_DPadWest = 33, + SteamController_LeftStick_DPadEast = 34, + SteamController_Gyro_Move = 35, + SteamController_Gyro_Pitch = 36, + SteamController_Gyro_Yaw = 37, + SteamController_Gyro_Roll = 38, + SteamController_Reserved0 = 39, + SteamController_Reserved1 = 40, + SteamController_Reserved2 = 41, + SteamController_Reserved3 = 42, + SteamController_Reserved4 = 43, + SteamController_Reserved5 = 44, + SteamController_Reserved6 = 45, + SteamController_Reserved7 = 46, + SteamController_Reserved8 = 47, + SteamController_Reserved9 = 48, + SteamController_Reserved10 = 49, + PS4_X = 50, + PS4_Circle = 51, + PS4_Triangle = 52, + PS4_Square = 53, + PS4_LeftBumper = 54, + PS4_RightBumper = 55, + PS4_Options = 56, + PS4_Share = 57, + PS4_LeftPad_Touch = 58, + PS4_LeftPad_Swipe = 59, + PS4_LeftPad_Click = 60, + PS4_LeftPad_DPadNorth = 61, + PS4_LeftPad_DPadSouth = 62, + PS4_LeftPad_DPadWest = 63, + PS4_LeftPad_DPadEast = 64, + PS4_RightPad_Touch = 65, + PS4_RightPad_Swipe = 66, + PS4_RightPad_Click = 67, + PS4_RightPad_DPadNorth = 68, + PS4_RightPad_DPadSouth = 69, + PS4_RightPad_DPadWest = 70, + PS4_RightPad_DPadEast = 71, + PS4_CenterPad_Touch = 72, + PS4_CenterPad_Swipe = 73, + PS4_CenterPad_Click = 74, + PS4_CenterPad_DPadNorth = 75, + PS4_CenterPad_DPadSouth = 76, + PS4_CenterPad_DPadWest = 77, + PS4_CenterPad_DPadEast = 78, + PS4_LeftTrigger_Pull = 79, + PS4_LeftTrigger_Click = 80, + PS4_RightTrigger_Pull = 81, + PS4_RightTrigger_Click = 82, + PS4_LeftStick_Move = 83, + PS4_LeftStick_Click = 84, + PS4_LeftStick_DPadNorth = 85, + PS4_LeftStick_DPadSouth = 86, + PS4_LeftStick_DPadWest = 87, + PS4_LeftStick_DPadEast = 88, + PS4_RightStick_Move = 89, + PS4_RightStick_Click = 90, + PS4_RightStick_DPadNorth = 91, + PS4_RightStick_DPadSouth = 92, + PS4_RightStick_DPadWest = 93, + PS4_RightStick_DPadEast = 94, + PS4_DPad_North = 95, + PS4_DPad_South = 96, + PS4_DPad_West = 97, + PS4_DPad_East = 98, + PS4_Gyro_Move = 99, + PS4_Gyro_Pitch = 100, + PS4_Gyro_Yaw = 101, + PS4_Gyro_Roll = 102, + PS4_Reserved0 = 103, + PS4_Reserved1 = 104, + PS4_Reserved2 = 105, + PS4_Reserved3 = 106, + PS4_Reserved4 = 107, + PS4_Reserved5 = 108, + PS4_Reserved6 = 109, + PS4_Reserved7 = 110, + PS4_Reserved8 = 111, + PS4_Reserved9 = 112, + PS4_Reserved10 = 113, + XBoxOne_A = 114, + XBoxOne_B = 115, + XBoxOne_X = 116, + XBoxOne_Y = 117, + XBoxOne_LeftBumper = 118, + XBoxOne_RightBumper = 119, + XBoxOne_Menu = 120, + XBoxOne_View = 121, + XBoxOne_LeftTrigger_Pull = 122, + XBoxOne_LeftTrigger_Click = 123, + XBoxOne_RightTrigger_Pull = 124, + XBoxOne_RightTrigger_Click = 125, + XBoxOne_LeftStick_Move = 126, + XBoxOne_LeftStick_Click = 127, + XBoxOne_LeftStick_DPadNorth = 128, + XBoxOne_LeftStick_DPadSouth = 129, + XBoxOne_LeftStick_DPadWest = 130, + XBoxOne_LeftStick_DPadEast = 131, + XBoxOne_RightStick_Move = 132, + XBoxOne_RightStick_Click = 133, + XBoxOne_RightStick_DPadNorth = 134, + XBoxOne_RightStick_DPadSouth = 135, + XBoxOne_RightStick_DPadWest = 136, + XBoxOne_RightStick_DPadEast = 137, + XBoxOne_DPad_North = 138, + XBoxOne_DPad_South = 139, + XBoxOne_DPad_West = 140, + XBoxOne_DPad_East = 141, + XBoxOne_Reserved0 = 142, + XBoxOne_Reserved1 = 143, + XBoxOne_Reserved2 = 144, + XBoxOne_Reserved3 = 145, + XBoxOne_Reserved4 = 146, + XBoxOne_Reserved5 = 147, + XBoxOne_Reserved6 = 148, + XBoxOne_Reserved7 = 149, + XBoxOne_Reserved8 = 150, + XBoxOne_Reserved9 = 151, + XBoxOne_Reserved10 = 152, + XBox360_A = 153, + XBox360_B = 154, + XBox360_X = 155, + XBox360_Y = 156, + XBox360_LeftBumper = 157, + XBox360_RightBumper = 158, + XBox360_Start = 159, + XBox360_Back = 160, + XBox360_LeftTrigger_Pull = 161, + XBox360_LeftTrigger_Click = 162, + XBox360_RightTrigger_Pull = 163, + XBox360_RightTrigger_Click = 164, + XBox360_LeftStick_Move = 165, + XBox360_LeftStick_Click = 166, + XBox360_LeftStick_DPadNorth = 167, + XBox360_LeftStick_DPadSouth = 168, + XBox360_LeftStick_DPadWest = 169, + XBox360_LeftStick_DPadEast = 170, + XBox360_RightStick_Move = 171, + XBox360_RightStick_Click = 172, + XBox360_RightStick_DPadNorth = 173, + XBox360_RightStick_DPadSouth = 174, + XBox360_RightStick_DPadWest = 175, + XBox360_RightStick_DPadEast = 176, + XBox360_DPad_North = 177, + XBox360_DPad_South = 178, + XBox360_DPad_West = 179, + XBox360_DPad_East = 180, + XBox360_Reserved0 = 181, + XBox360_Reserved1 = 182, + XBox360_Reserved2 = 183, + XBox360_Reserved3 = 184, + XBox360_Reserved4 = 185, + XBox360_Reserved5 = 186, + XBox360_Reserved6 = 187, + XBox360_Reserved7 = 188, + XBox360_Reserved8 = 189, + XBox360_Reserved9 = 190, + XBox360_Reserved10 = 191, + Switch_A = 192, + Switch_B = 193, + Switch_X = 194, + Switch_Y = 195, + Switch_LeftBumper = 196, + Switch_RightBumper = 197, + Switch_Plus = 198, + Switch_Minus = 199, + Switch_Capture = 200, + Switch_LeftTrigger_Pull = 201, + Switch_LeftTrigger_Click = 202, + Switch_RightTrigger_Pull = 203, + Switch_RightTrigger_Click = 204, + Switch_LeftStick_Move = 205, + Switch_LeftStick_Click = 206, + Switch_LeftStick_DPadNorth = 207, + Switch_LeftStick_DPadSouth = 208, + Switch_LeftStick_DPadWest = 209, + Switch_LeftStick_DPadEast = 210, + Switch_RightStick_Move = 211, + Switch_RightStick_Click = 212, + Switch_RightStick_DPadNorth = 213, + Switch_RightStick_DPadSouth = 214, + Switch_RightStick_DPadWest = 215, + Switch_RightStick_DPadEast = 216, + Switch_DPad_North = 217, + Switch_DPad_South = 218, + Switch_DPad_West = 219, + Switch_DPad_East = 220, + Switch_ProGyro_Move = 221, + Switch_ProGyro_Pitch = 222, + Switch_ProGyro_Yaw = 223, + Switch_ProGyro_Roll = 224, + Switch_Reserved0 = 225, + Switch_Reserved1 = 226, + Switch_Reserved2 = 227, + Switch_Reserved3 = 228, + Switch_Reserved4 = 229, + Switch_Reserved5 = 230, + Switch_Reserved6 = 231, + Switch_Reserved7 = 232, + Switch_Reserved8 = 233, + Switch_Reserved9 = 234, + Switch_Reserved10 = 235, + Switch_RightGyro_Move = 236, + Switch_RightGyro_Pitch = 237, + Switch_RightGyro_Yaw = 238, + Switch_RightGyro_Roll = 239, + Switch_LeftGyro_Move = 240, + Switch_LeftGyro_Pitch = 241, + Switch_LeftGyro_Yaw = 242, + Switch_LeftGyro_Roll = 243, + Switch_LeftGrip_Lower = 244, + Switch_LeftGrip_Upper = 245, + Switch_RightGrip_Lower = 246, + Switch_RightGrip_Upper = 247, + Switch_Reserved11 = 248, + Switch_Reserved12 = 249, + Switch_Reserved13 = 250, + Switch_Reserved14 = 251, + Switch_Reserved15 = 252, + Switch_Reserved16 = 253, + Switch_Reserved17 = 254, + Switch_Reserved18 = 255, + Switch_Reserved19 = 256, + Switch_Reserved20 = 257, + Count = 258, + MaximumPossibleValue = 32767, + } + + // + // EXboxOrigin + // + internal enum XboxOrigin : int + { + A = 0, + B = 1, + X = 2, + Y = 3, + LeftBumper = 4, + RightBumper = 5, + Menu = 6, + View = 7, + LeftTrigger_Pull = 8, + LeftTrigger_Click = 9, + RightTrigger_Pull = 10, + RightTrigger_Click = 11, + LeftStick_Move = 12, + LeftStick_Click = 13, + LeftStick_DPadNorth = 14, + LeftStick_DPadSouth = 15, + LeftStick_DPadWest = 16, + LeftStick_DPadEast = 17, + RightStick_Move = 18, + RightStick_Click = 19, + RightStick_DPadNorth = 20, + RightStick_DPadSouth = 21, + RightStick_DPadWest = 22, + RightStick_DPadEast = 23, + DPad_North = 24, + DPad_South = 25, + DPad_West = 26, + DPad_East = 27, + Count = 28, + } + // // ESteamControllerPad // @@ -982,6 +1446,37 @@ internal enum SteamControllerPad : int Right = 1, } + // + // ESteamInputType + // + internal enum SteamInputType : int + { + Unknown = 0, + SteamController = 1, + XBox360Controller = 2, + XBoxOneController = 3, + GenericGamepad = 4, + PS4Controller = 5, + AppleMFiController = 6, + AndroidController = 7, + SwitchJoyConPair = 8, + SwitchJoyConSingle = 9, + SwitchProController = 10, + MobileTouch = 11, + PS3Controller = 12, + Count = 13, + MaximumPossibleValue = 255, + } + + // + // ESteamInputLEDFlag + // + internal enum SteamInputLEDFlag : int + { + SetColor = 0, + RestoreUserDefault = 1, + } + // // EControllerSource // @@ -995,13 +1490,16 @@ internal enum ControllerSource : int Switch = 5, LeftTrigger = 6, RightTrigger = 7, - Gyro = 8, - CenterTrackpad = 9, - RightJoystick = 10, - DPad = 11, - Key = 12, - Mouse = 13, - Count = 14, + LeftBumper = 8, + RightBumper = 9, + Gyro = 10, + CenterTrackpad = 11, + RightJoystick = 12, + DPad = 13, + Key = 14, + Mouse = 15, + LeftGyro = 16, + Count = 17, } // @@ -1187,9 +1685,9 @@ internal enum ControllerActionOrigin : int SteamV2_Y = 151, SteamV2_LeftBumper = 152, SteamV2_RightBumper = 153, - SteamV2_LeftGrip = 154, - SteamV2_RightGrip = 155, - SteamV2_LeftGrip_Upper = 156, + SteamV2_LeftGrip_Lower = 154, + SteamV2_LeftGrip_Upper = 155, + SteamV2_RightGrip_Lower = 156, SteamV2_RightGrip_Upper = 157, SteamV2_LeftBumper_Pressure = 158, SteamV2_RightBumper_Pressure = 159, @@ -1229,7 +1727,53 @@ internal enum ControllerActionOrigin : int SteamV2_Gyro_Pitch = 193, SteamV2_Gyro_Yaw = 194, SteamV2_Gyro_Roll = 195, - Count = 196, + Switch_A = 196, + Switch_B = 197, + Switch_X = 198, + Switch_Y = 199, + Switch_LeftBumper = 200, + Switch_RightBumper = 201, + Switch_Plus = 202, + Switch_Minus = 203, + Switch_Capture = 204, + Switch_LeftTrigger_Pull = 205, + Switch_LeftTrigger_Click = 206, + Switch_RightTrigger_Pull = 207, + Switch_RightTrigger_Click = 208, + Switch_LeftStick_Move = 209, + Switch_LeftStick_Click = 210, + Switch_LeftStick_DPadNorth = 211, + Switch_LeftStick_DPadSouth = 212, + Switch_LeftStick_DPadWest = 213, + Switch_LeftStick_DPadEast = 214, + Switch_RightStick_Move = 215, + Switch_RightStick_Click = 216, + Switch_RightStick_DPadNorth = 217, + Switch_RightStick_DPadSouth = 218, + Switch_RightStick_DPadWest = 219, + Switch_RightStick_DPadEast = 220, + Switch_DPad_North = 221, + Switch_DPad_South = 222, + Switch_DPad_West = 223, + Switch_DPad_East = 224, + Switch_ProGyro_Move = 225, + Switch_ProGyro_Pitch = 226, + Switch_ProGyro_Yaw = 227, + Switch_ProGyro_Roll = 228, + Switch_RightGyro_Move = 229, + Switch_RightGyro_Pitch = 230, + Switch_RightGyro_Yaw = 231, + Switch_RightGyro_Roll = 232, + Switch_LeftGyro_Move = 233, + Switch_LeftGyro_Pitch = 234, + Switch_LeftGyro_Yaw = 235, + Switch_LeftGyro_Roll = 236, + Switch_LeftGrip_Lower = 237, + Switch_LeftGrip_Upper = 238, + Switch_RightGrip_Lower = 239, + Switch_RightGrip_Upper = 240, + Count = 241, + MaximumPossibleValue = 32767, } // @@ -1241,19 +1785,6 @@ internal enum SteamControllerLEDFlag : int RestoreUserDefault = 1, } - // - // ESteamInputType - // - internal enum SteamInputType : int - { - Unknown = 0, - SteamController = 1, - XBox360Controller = 2, - XBoxOneController = 3, - GenericXInput = 4, - PS4Controller = 5, - } - // // EUGCMatchingUGCType // diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Interface.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Interface.cs index adbdb16..f459303 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Interface.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Interface.cs @@ -42,6 +42,8 @@ internal interface Interface : IDisposable int /*int*/ ISteamApps_GetAppBuildId(); void /*void*/ ISteamApps_RequestAllProofOfPurchaseKeys(); SteamAPICall_t /*(SteamAPICall_t)*/ ISteamApps_GetFileDetails( string /*const char **/ pszFileName ); + int /*int*/ ISteamApps_GetLaunchCommandLine( System.Text.StringBuilder /*char **/ pszCommandLine, int /*int*/ cubCommandLine ); + bool /*bool*/ ISteamApps_BIsSubscribedFromFamilySharing(); HSteamPipe /*(HSteamPipe)*/ ISteamClient_CreateSteamPipe(); bool /*bool*/ ISteamClient_BReleaseSteamPipe( int hSteamPipe ); HSteamUser /*(HSteamUser)*/ ISteamClient_ConnectToGlobalUser( int hSteamPipe ); @@ -61,6 +63,7 @@ internal interface Interface : IDisposable IntPtr /*class ISteamNetworking **/ ISteamClient_GetISteamNetworking( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); IntPtr /*class ISteamRemoteStorage **/ ISteamClient_GetISteamRemoteStorage( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); IntPtr /*class ISteamScreenshots **/ ISteamClient_GetISteamScreenshots( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); + IntPtr /*class ISteamGameSearch **/ ISteamClient_GetISteamGameSearch( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); uint /*uint32*/ ISteamClient_GetIPCCallCount(); void /*void*/ ISteamClient_SetWarningMessageHook( IntPtr /*SteamAPIWarningMessageHook_t*/ pFunction ); bool /*bool*/ ISteamClient_BShutdownIfAllPipesClosed(); @@ -74,11 +77,12 @@ internal interface Interface : IDisposable IntPtr /*class ISteamInventory **/ ISteamClient_GetISteamInventory( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); IntPtr /*class ISteamVideo **/ ISteamClient_GetISteamVideo( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); IntPtr /*class ISteamParentalSettings **/ ISteamClient_GetISteamParentalSettings( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); + IntPtr /*class ISteamInput **/ ISteamClient_GetISteamInput( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); + IntPtr /*class ISteamParties **/ ISteamClient_GetISteamParties( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); bool /*bool*/ ISteamController_Init(); bool /*bool*/ ISteamController_Shutdown(); void /*void*/ ISteamController_RunFrame(); int /*int*/ ISteamController_GetConnectedControllers( IntPtr /*ControllerHandle_t **/ handlesOut ); - bool /*bool*/ ISteamController_ShowBindingPanel( ulong controllerHandle ); ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ ISteamController_GetActionSetHandle( string /*const char **/ pszActionSetName ); void /*void*/ ISteamController_ActivateActionSet( ulong controllerHandle, ulong actionSetHandle ); ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ ISteamController_GetCurrentActionSet( ulong controllerHandle ); @@ -87,24 +91,27 @@ internal interface Interface : IDisposable void /*void*/ ISteamController_DeactivateAllActionSetLayers( ulong controllerHandle ); int /*int*/ ISteamController_GetActiveActionSetLayers( ulong controllerHandle, IntPtr /*ControllerActionSetHandle_t **/ handlesOut ); ControllerDigitalActionHandle_t /*(ControllerDigitalActionHandle_t)*/ ISteamController_GetDigitalActionHandle( string /*const char **/ pszActionName ); - ControllerDigitalActionData_t /*struct ControllerDigitalActionData_t*/ ISteamController_GetDigitalActionData( ulong controllerHandle, ulong digitalActionHandle ); + InputDigitalActionData_t /*struct InputDigitalActionData_t*/ ISteamController_GetDigitalActionData( ulong controllerHandle, ulong digitalActionHandle ); int /*int*/ ISteamController_GetDigitalActionOrigins( ulong controllerHandle, ulong actionSetHandle, ulong digitalActionHandle, out ControllerActionOrigin /*EControllerActionOrigin **/ originsOut ); ControllerAnalogActionHandle_t /*(ControllerAnalogActionHandle_t)*/ ISteamController_GetAnalogActionHandle( string /*const char **/ pszActionName ); - ControllerAnalogActionData_t /*struct ControllerAnalogActionData_t*/ ISteamController_GetAnalogActionData( ulong controllerHandle, ulong analogActionHandle ); + InputAnalogActionData_t /*struct InputAnalogActionData_t*/ ISteamController_GetAnalogActionData( ulong controllerHandle, ulong analogActionHandle ); int /*int*/ ISteamController_GetAnalogActionOrigins( ulong controllerHandle, ulong actionSetHandle, ulong analogActionHandle, out ControllerActionOrigin /*EControllerActionOrigin **/ originsOut ); + IntPtr ISteamController_GetGlyphForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); + IntPtr ISteamController_GetStringForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); void /*void*/ ISteamController_StopAnalogActionMomentum( ulong controllerHandle, ulong eAction ); + InputMotionData_t /*struct InputMotionData_t*/ ISteamController_GetMotionData( ulong controllerHandle ); void /*void*/ ISteamController_TriggerHapticPulse( ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ); void /*void*/ ISteamController_TriggerRepeatedHapticPulse( ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ); void /*void*/ ISteamController_TriggerVibration( ulong controllerHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ); void /*void*/ ISteamController_SetLEDColor( ulong controllerHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ); - int /*int*/ ISteamController_GetGamepadIndexForController( ulong ulControllerHandle ); - ControllerHandle_t /*(ControllerHandle_t)*/ ISteamController_GetControllerForGamepadIndex( int /*int*/ nIndex ); - ControllerMotionData_t /*struct ControllerMotionData_t*/ ISteamController_GetMotionData( ulong controllerHandle ); - bool /*bool*/ ISteamController_ShowDigitalActionOrigins( ulong controllerHandle, ulong digitalActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ); - bool /*bool*/ ISteamController_ShowAnalogActionOrigins( ulong controllerHandle, ulong analogActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ); - IntPtr ISteamController_GetStringForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); - IntPtr ISteamController_GetGlyphForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); + bool /*bool*/ ISteamController_ShowBindingPanel( ulong controllerHandle ); SteamInputType /*ESteamInputType*/ ISteamController_GetInputTypeForHandle( ulong controllerHandle ); + ControllerHandle_t /*(ControllerHandle_t)*/ ISteamController_GetControllerForGamepadIndex( int /*int*/ nIndex ); + int /*int*/ ISteamController_GetGamepadIndexForController( ulong ulControllerHandle ); + IntPtr ISteamController_GetStringForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ); + IntPtr ISteamController_GetGlyphForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ); + ControllerActionOrigin /*EControllerActionOrigin*/ ISteamController_GetActionOriginFromXboxOrigin( ulong controllerHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ); + ControllerActionOrigin /*EControllerActionOrigin*/ ISteamController_TranslateActionOrigin( SteamInputType /*ESteamInputType*/ eDestinationInputType, ControllerActionOrigin /*EControllerActionOrigin*/ eSourceOrigin ); IntPtr ISteamFriends_GetPersonaName(); SteamAPICall_t /*(SteamAPICall_t)*/ ISteamFriends_SetPersonaName( string /*const char **/ pchPersonaName ); PersonaState /*EPersonaState*/ ISteamFriends_GetPersonaState(); @@ -135,7 +142,7 @@ internal interface Interface : IDisposable void /*void*/ ISteamFriends_SetInGameVoiceSpeaking( ulong steamIDUser, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bSpeaking ); void /*void*/ ISteamFriends_ActivateGameOverlay( string /*const char **/ pchDialog ); void /*void*/ ISteamFriends_ActivateGameOverlayToUser( string /*const char **/ pchDialog, ulong steamID ); - void /*void*/ ISteamFriends_ActivateGameOverlayToWebPage( string /*const char **/ pchURL ); + void /*void*/ ISteamFriends_ActivateGameOverlayToWebPage( string /*const char **/ pchURL, ActivateGameOverlayToWebPageMode /*EActivateGameOverlayToWebPageMode*/ eMode ); void /*void*/ ISteamFriends_ActivateGameOverlayToStore( uint nAppID, OverlayToStoreFlag /*EOverlayToStoreFlag*/ eFlag ); void /*void*/ ISteamFriends_SetPlayedWith( ulong steamIDUserPlayedWith ); void /*void*/ ISteamFriends_ActivateGameOverlayInviteDialog( ulong steamIDLobby ); @@ -177,6 +184,21 @@ internal interface Interface : IDisposable SteamAPICall_t /*(SteamAPICall_t)*/ ISteamFriends_EnumerateFollowingList( uint /*uint32*/ unStartIndex ); bool /*bool*/ ISteamFriends_IsClanPublic( ulong steamIDClan ); bool /*bool*/ ISteamFriends_IsClanOfficialGameGroup( ulong steamIDClan ); + int /*int*/ ISteamFriends_GetNumChatsWithUnreadPriorityMessages(); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_AddGameSearchParams( string /*const char **/ pchKeyToFind, string /*const char **/ pchValuesToFind ); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SearchForGameWithLobby( ulong steamIDLobby, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SearchForGameSolo( int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_AcceptGame(); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_DeclineGame(); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_RetrieveConnectionDetails( ulong steamIDHost, IntPtr /*char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_EndGameSearch(); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SetGameHostParams( string /*const char **/ pchKey, string /*const char **/ pchValue ); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SetConnectionDetails( string /*const char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_RequestPlayersForGame( int /*int*/ nPlayerMin, int /*int*/ nPlayerMax, int /*int*/ nMaxTeamSize ); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_HostConfirmGameStart( ulong /*uint64*/ ullUniqueGameID ); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_CancelRequestPlayersForGame(); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SubmitPlayerResult( ulong /*uint64*/ ullUniqueGameID, ulong steamIDPlayer, PlayerResult_t /*EPlayerResult_t*/ EPlayerResult ); + GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_EndGame( ulong /*uint64*/ ullUniqueGameID ); bool /*bool*/ ISteamGameServer_InitGameServer( uint /*uint32*/ unIP, ushort /*uint16*/ usGamePort, ushort /*uint16*/ usQueryPort, uint /*uint32*/ unFlags, uint nGameAppId, string /*const char **/ pchVersionString ); void /*void*/ ISteamGameServer_SetProduct( string /*const char **/ pszProduct ); void /*void*/ ISteamGameServer_SetGameDescription( string /*const char **/ pszGameDescription ); @@ -249,7 +271,7 @@ internal interface Interface : IDisposable void /*void*/ ISteamHTMLSurface_MouseDoubleClick( uint unBrowserHandle, HTMLMouseButton /*ISteamHTMLSurface::EHTMLMouseButton*/ eMouseButton ); void /*void*/ ISteamHTMLSurface_MouseMove( uint unBrowserHandle, int /*int*/ x, int /*int*/ y ); void /*void*/ ISteamHTMLSurface_MouseWheel( uint unBrowserHandle, int /*int32*/ nDelta ); - void /*void*/ ISteamHTMLSurface_KeyDown( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); + void /*void*/ ISteamHTMLSurface_KeyDown( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bIsSystemKey ); void /*void*/ ISteamHTMLSurface_KeyUp( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); void /*void*/ ISteamHTMLSurface_KeyChar( uint unBrowserHandle, uint /*uint32*/ cUnicodeChar, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); void /*void*/ ISteamHTMLSurface_SetHorizontalScroll( uint unBrowserHandle, uint /*uint32*/ nAbsolutePixelScroll ); @@ -265,6 +287,7 @@ internal interface Interface : IDisposable void /*void*/ ISteamHTMLSurface_SetPageScaleFactor( uint unBrowserHandle, float /*float*/ flZoom, int /*int*/ nPointX, int /*int*/ nPointY ); void /*void*/ ISteamHTMLSurface_SetBackgroundMode( uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bBackgroundMode ); void /*void*/ ISteamHTMLSurface_SetDPIScalingFactor( uint unBrowserHandle, float /*float*/ flDPIScaling ); + void /*void*/ ISteamHTMLSurface_OpenDeveloperTools( uint unBrowserHandle ); void /*void*/ ISteamHTMLSurface_AllowStartRequest( uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowed ); void /*void*/ ISteamHTMLSurface_JSDialogResponse( uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bResult ); HTTPRequestHandle /*(HTTPRequestHandle)*/ ISteamHTTP_CreateHTTPRequest( HTTPMethod /*EHTTPMethod*/ eHTTPRequestMethod, string /*const char **/ pchAbsoluteURL ); @@ -292,6 +315,39 @@ internal interface Interface : IDisposable bool /*bool*/ ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate( uint hRequest, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bRequireVerifiedCertificate ); bool /*bool*/ ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS( uint hRequest, uint /*uint32*/ unMilliseconds ); bool /*bool*/ ISteamHTTP_GetHTTPRequestWasTimedOut( uint hRequest, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbWasTimedOut ); + bool /*bool*/ ISteamInput_Init(); + bool /*bool*/ ISteamInput_Shutdown(); + void /*void*/ ISteamInput_RunFrame(); + int /*int*/ ISteamInput_GetConnectedControllers( IntPtr /*InputHandle_t **/ handlesOut ); + InputActionSetHandle_t /*(InputActionSetHandle_t)*/ ISteamInput_GetActionSetHandle( string /*const char **/ pszActionSetName ); + void /*void*/ ISteamInput_ActivateActionSet( ulong inputHandle, ulong actionSetHandle ); + InputActionSetHandle_t /*(InputActionSetHandle_t)*/ ISteamInput_GetCurrentActionSet( ulong inputHandle ); + void /*void*/ ISteamInput_ActivateActionSetLayer( ulong inputHandle, ulong actionSetLayerHandle ); + void /*void*/ ISteamInput_DeactivateActionSetLayer( ulong inputHandle, ulong actionSetLayerHandle ); + void /*void*/ ISteamInput_DeactivateAllActionSetLayers( ulong inputHandle ); + int /*int*/ ISteamInput_GetActiveActionSetLayers( ulong inputHandle, IntPtr /*InputActionSetHandle_t **/ handlesOut ); + InputDigitalActionHandle_t /*(InputDigitalActionHandle_t)*/ ISteamInput_GetDigitalActionHandle( string /*const char **/ pszActionName ); + InputDigitalActionData_t /*struct InputDigitalActionData_t*/ ISteamInput_GetDigitalActionData( ulong inputHandle, ulong digitalActionHandle ); + int /*int*/ ISteamInput_GetDigitalActionOrigins( ulong inputHandle, ulong actionSetHandle, ulong digitalActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ); + InputAnalogActionHandle_t /*(InputAnalogActionHandle_t)*/ ISteamInput_GetAnalogActionHandle( string /*const char **/ pszActionName ); + InputAnalogActionData_t /*struct InputAnalogActionData_t*/ ISteamInput_GetAnalogActionData( ulong inputHandle, ulong analogActionHandle ); + int /*int*/ ISteamInput_GetAnalogActionOrigins( ulong inputHandle, ulong actionSetHandle, ulong analogActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ); + IntPtr ISteamInput_GetGlyphForActionOrigin( InputActionOrigin /*EInputActionOrigin*/ eOrigin ); + IntPtr ISteamInput_GetStringForActionOrigin( InputActionOrigin /*EInputActionOrigin*/ eOrigin ); + void /*void*/ ISteamInput_StopAnalogActionMomentum( ulong inputHandle, ulong eAction ); + InputMotionData_t /*struct InputMotionData_t*/ ISteamInput_GetMotionData( ulong inputHandle ); + void /*void*/ ISteamInput_TriggerVibration( ulong inputHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ); + void /*void*/ ISteamInput_SetLEDColor( ulong inputHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ); + void /*void*/ ISteamInput_TriggerHapticPulse( ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ); + void /*void*/ ISteamInput_TriggerRepeatedHapticPulse( ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ); + bool /*bool*/ ISteamInput_ShowBindingPanel( ulong inputHandle ); + SteamInputType /*ESteamInputType*/ ISteamInput_GetInputTypeForHandle( ulong inputHandle ); + InputHandle_t /*(InputHandle_t)*/ ISteamInput_GetControllerForGamepadIndex( int /*int*/ nIndex ); + int /*int*/ ISteamInput_GetGamepadIndexForController( ulong ulinputHandle ); + IntPtr ISteamInput_GetStringForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ); + IntPtr ISteamInput_GetGlyphForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ); + InputActionOrigin /*EInputActionOrigin*/ ISteamInput_GetActionOriginFromXboxOrigin( ulong inputHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ); + InputActionOrigin /*EInputActionOrigin*/ ISteamInput_TranslateActionOrigin( SteamInputType /*ESteamInputType*/ eDestinationInputType, InputActionOrigin /*EInputActionOrigin*/ eSourceOrigin ); Result /*EResult*/ ISteamInventory_GetResultStatus( int resultHandle ); bool /*bool*/ ISteamInventory_GetResultItems( int resultHandle, IntPtr /*struct SteamItemDetails_t **/ pOutItemsArray, out uint /*uint32 **/ punOutItemsArraySize ); bool /*bool*/ ISteamInventory_GetResultItemProperty( int resultHandle, uint /*uint32*/ unItemIndex, string /*const char **/ pchPropertyName, System.Text.StringBuilder /*char **/ pchValueBuffer, out uint /*uint32 **/ punValueBufferSizeOut ); @@ -320,8 +376,8 @@ internal interface Interface : IDisposable SteamAPICall_t /*(SteamAPICall_t)*/ ISteamInventory_StartPurchase( int[] pArrayItemDefs, uint[] /*const uint32 **/ punArrayQuantity, uint /*uint32*/ unArrayLength ); SteamAPICall_t /*(SteamAPICall_t)*/ ISteamInventory_RequestPrices(); uint /*uint32*/ ISteamInventory_GetNumItemsWithPrices(); - bool /*bool*/ ISteamInventory_GetItemsWithPrices( IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pPrices, uint /*uint32*/ unArrayLength ); - bool /*bool*/ ISteamInventory_GetItemPrice( int iDefinition, out ulong /*uint64 **/ pPrice ); + bool /*bool*/ ISteamInventory_GetItemsWithPrices( IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pCurrentPrices, IntPtr /*uint64 **/ pBasePrices, uint /*uint32*/ unArrayLength ); + bool /*bool*/ ISteamInventory_GetItemPrice( int iDefinition, out ulong /*uint64 **/ pCurrentPrice, out ulong /*uint64 **/ pBasePrice ); SteamInventoryUpdateHandle_t /*(SteamInventoryUpdateHandle_t)*/ ISteamInventory_StartUpdateProperties(); bool /*bool*/ ISteamInventory_RemoveProperty( ulong handle, ulong nItemID, string /*const char **/ pchPropertyName ); bool /*bool*/ ISteamInventory_SetProperty( ulong handle, ulong nItemID, string /*const char **/ pchPropertyName, string /*const char **/ pchPropertyValue ); @@ -453,6 +509,18 @@ internal interface Interface : IDisposable bool /*bool*/ ISteamParentalSettings_BIsAppInBlockList( uint nAppID ); bool /*bool*/ ISteamParentalSettings_BIsFeatureBlocked( ParentalFeature /*EParentalFeature*/ eFeature ); bool /*bool*/ ISteamParentalSettings_BIsFeatureInBlockList( ParentalFeature /*EParentalFeature*/ eFeature ); + uint /*uint32*/ ISteamParties_GetNumActiveBeacons(); + PartyBeaconID_t /*(PartyBeaconID_t)*/ ISteamParties_GetBeaconByIndex( uint /*uint32*/ unIndex ); + bool /*bool*/ ISteamParties_GetBeaconDetails( ulong ulBeaconID, out ulong pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pLocation, System.Text.StringBuilder /*char **/ pchMetadata, int /*int*/ cchMetadata ); + SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_JoinParty( ulong ulBeaconID ); + bool /*bool*/ ISteamParties_GetNumAvailableBeaconLocations( IntPtr /*uint32 **/ puNumLocations ); + bool /*bool*/ ISteamParties_GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pLocationList, uint /*uint32*/ uMaxNumLocations ); + SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_CreateBeacon( uint /*uint32*/ unOpenSlots, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pBeaconLocation, string /*const char **/ pchConnectString, string /*const char **/ pchMetadata ); + void /*void*/ ISteamParties_OnReservationCompleted( ulong ulBeacon, ulong steamIDUser ); + void /*void*/ ISteamParties_CancelReservation( ulong ulBeacon, ulong steamIDUser ); + SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_ChangeNumOpenSlots( ulong ulBeacon, uint /*uint32*/ unOpenSlots ); + bool /*bool*/ ISteamParties_DestroyBeacon( ulong ulBeacon ); + bool /*bool*/ ISteamParties_GetBeaconLocationData( SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t*/ BeaconLocation, SteamPartyBeaconLocationData /*ESteamPartyBeaconLocationData*/ eData, System.Text.StringBuilder /*char **/ pchDataStringOut, int /*int*/ cchDataStringOut ); bool /*bool*/ ISteamRemoteStorage_FileWrite( string /*const char **/ pchFile, IntPtr /*const void **/ pvData, int /*int32*/ cubData ); int /*int32*/ ISteamRemoteStorage_FileRead( string /*const char **/ pchFile, IntPtr /*void **/ pvData, int /*int32*/ cubDataToRead ); SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_FileWriteAsync( string /*const char **/ pchFile, IntPtr /*const void **/ pvData, uint /*uint32*/ cubData ); @@ -519,6 +587,7 @@ internal interface Interface : IDisposable ScreenshotHandle /*(ScreenshotHandle)*/ ISteamScreenshots_AddVRScreenshotToLibrary( VRScreenshotType /*EVRScreenshotType*/ eType, string /*const char **/ pchFilename, string /*const char **/ pchVRFilename ); UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryUserUGCRequest( uint unAccountID, UserUGCList /*EUserUGCList*/ eListType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingUGCType, UserUGCListSortOrder /*EUserUGCListSortOrder*/ eSortOrder, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ); UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryAllUGCRequest( UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ); + UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryAllUGCRequest0( UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, string /*const char **/ pchCursor ); UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryUGCDetailsRequest( IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ unNumPublishedFileIDs ); SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_SendQueryUGCRequest( ulong handle ); bool /*bool*/ ISteamUGC_GetQueryUGCResult( ulong handle, uint /*uint32*/ index, ref SteamUGCDetails_t /*struct SteamUGCDetails_t **/ pDetails ); @@ -559,6 +628,7 @@ internal interface Interface : IDisposable bool /*bool*/ ISteamUGC_SetItemTags( ulong updateHandle, ref SteamParamStringArray_t /*const struct SteamParamStringArray_t **/ pTags ); bool /*bool*/ ISteamUGC_SetItemContent( ulong handle, string /*const char **/ pszContentFolder ); bool /*bool*/ ISteamUGC_SetItemPreview( ulong handle, string /*const char **/ pszPreviewFile ); + bool /*bool*/ ISteamUGC_SetAllowLegacyUpload( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowLegacyUpload ); bool /*bool*/ ISteamUGC_RemoveItemKeyValueTags( ulong handle, string /*const char **/ pchKey ); bool /*bool*/ ISteamUGC_AddItemKeyValueTag( ulong handle, string /*const char **/ pchKey, string /*const char **/ pchValue ); bool /*bool*/ ISteamUGC_AddItemPreviewFile( ulong handle, string /*const char **/ pszPreviewFile, ItemPreviewType /*EItemPreviewType*/ type ); @@ -620,6 +690,7 @@ internal interface Interface : IDisposable bool /*bool*/ ISteamUser_BIsTwoFactorEnabled(); bool /*bool*/ ISteamUser_BIsPhoneIdentifying(); bool /*bool*/ ISteamUser_BIsPhoneRequiringVerification(); + SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUser_GetMarketEligibility(); bool /*bool*/ ISteamUserStats_RequestCurrentStats(); bool /*bool*/ ISteamUserStats_GetStat( string /*const char **/ pchName, out int /*int32 **/ pData ); bool /*bool*/ ISteamUserStats_GetStat0( string /*const char **/ pchName, out float /*float **/ pData ); diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux64.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux64.cs index 009a7a8..c34cd87 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux64.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Linux64.cs @@ -140,6 +140,12 @@ public virtual void Dispose() return Native.SteamAPI_ISteamClient_GetISteamScreenshots(_ptr, hSteamuser, hSteamPipe, pchVersion); } + public virtual IntPtr /*class ISteamGameSearch **/ ISteamClient_GetISteamGameSearch( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); + + return Native.SteamAPI_ISteamClient_GetISteamGameSearch(_ptr, hSteamuser, hSteamPipe, pchVersion); + } public virtual uint /*uint32*/ ISteamClient_GetIPCCallCount() { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); @@ -218,6 +224,18 @@ public virtual void Dispose() return Native.SteamAPI_ISteamClient_GetISteamParentalSettings(_ptr, hSteamuser, hSteamPipe, pchVersion); } + public virtual IntPtr /*class ISteamInput **/ ISteamClient_GetISteamInput( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); + + return Native.SteamAPI_ISteamClient_GetISteamInput(_ptr, hSteamUser, hSteamPipe, pchVersion); + } + public virtual IntPtr /*class ISteamParties **/ ISteamClient_GetISteamParties( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); + + return Native.SteamAPI_ISteamClient_GetISteamParties(_ptr, hSteamUser, hSteamPipe, pchVersion); + } public virtual HSteamUser /*(HSteamUser)*/ ISteamUser_GetHSteamUser() { @@ -393,6 +411,12 @@ public virtual void Dispose() return Native.SteamAPI_ISteamUser_BIsPhoneRequiringVerification(_ptr); } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUser_GetMarketEligibility() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUser _ptr is null!" ); + + return Native.SteamAPI_ISteamUser_GetMarketEligibility(_ptr); + } public virtual IntPtr ISteamFriends_GetPersonaName() { @@ -577,11 +601,11 @@ public virtual IntPtr ISteamFriends_GetClanTag( ulong steamIDClan ) Native.SteamAPI_ISteamFriends_ActivateGameOverlayToUser(_ptr, pchDialog, steamID); } - public virtual void /*void*/ ISteamFriends_ActivateGameOverlayToWebPage( string /*const char **/ pchURL ) + public virtual void /*void*/ ISteamFriends_ActivateGameOverlayToWebPage( string /*const char **/ pchURL, ActivateGameOverlayToWebPageMode /*EActivateGameOverlayToWebPageMode*/ eMode ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamFriends _ptr is null!" ); - Native.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(_ptr, pchURL); + Native.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(_ptr, pchURL, eMode); } public virtual void /*void*/ ISteamFriends_ActivateGameOverlayToStore( uint nAppID, OverlayToStoreFlag /*EOverlayToStoreFlag*/ eFlag ) { @@ -829,6 +853,12 @@ public virtual IntPtr ISteamFriends_GetFriendRichPresenceKeyByIndex( ulong steam return Native.SteamAPI_ISteamFriends_IsClanOfficialGameGroup(_ptr, steamIDClan); } + public virtual int /*int*/ ISteamFriends_GetNumChatsWithUnreadPriorityMessages() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamFriends _ptr is null!" ); + + return Native.SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages(_ptr); + } public virtual uint /*uint32*/ ISteamUtils_GetSecondsSinceAppActive() { @@ -1337,6 +1367,173 @@ public virtual IntPtr ISteamMatchmaking_GetLobbyMemberData( ulong steamIDLobby, Native.SteamAPI_ISteamMatchmakingServers_CancelServerQuery(_ptr, hServerQuery); } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_AddGameSearchParams( string /*const char **/ pchKeyToFind, string /*const char **/ pchValuesToFind ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_AddGameSearchParams(_ptr, pchKeyToFind, pchValuesToFind); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SearchForGameWithLobby( ulong steamIDLobby, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SearchForGameWithLobby(_ptr, steamIDLobby, nPlayerMin, nPlayerMax); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SearchForGameSolo( int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SearchForGameSolo(_ptr, nPlayerMin, nPlayerMax); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_AcceptGame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_AcceptGame(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_DeclineGame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_DeclineGame(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_RetrieveConnectionDetails( ulong steamIDHost, IntPtr /*char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_RetrieveConnectionDetails(_ptr, steamIDHost, pchConnectionDetails, cubConnectionDetails); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_EndGameSearch() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_EndGameSearch(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SetGameHostParams( string /*const char **/ pchKey, string /*const char **/ pchValue ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SetGameHostParams(_ptr, pchKey, pchValue); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SetConnectionDetails( string /*const char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SetConnectionDetails(_ptr, pchConnectionDetails, cubConnectionDetails); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_RequestPlayersForGame( int /*int*/ nPlayerMin, int /*int*/ nPlayerMax, int /*int*/ nMaxTeamSize ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_RequestPlayersForGame(_ptr, nPlayerMin, nPlayerMax, nMaxTeamSize); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_HostConfirmGameStart( ulong /*uint64*/ ullUniqueGameID ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_HostConfirmGameStart(_ptr, ullUniqueGameID); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_CancelRequestPlayersForGame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SubmitPlayerResult( ulong /*uint64*/ ullUniqueGameID, ulong steamIDPlayer, PlayerResult_t /*EPlayerResult_t*/ EPlayerResult ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SubmitPlayerResult(_ptr, ullUniqueGameID, steamIDPlayer, EPlayerResult); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_EndGame( ulong /*uint64*/ ullUniqueGameID ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_EndGame(_ptr, ullUniqueGameID); + } + + public virtual uint /*uint32*/ ISteamParties_GetNumActiveBeacons() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetNumActiveBeacons(_ptr); + } + public virtual PartyBeaconID_t /*(PartyBeaconID_t)*/ ISteamParties_GetBeaconByIndex( uint /*uint32*/ unIndex ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetBeaconByIndex(_ptr, unIndex); + } + public virtual bool /*bool*/ ISteamParties_GetBeaconDetails( ulong ulBeaconID, out ulong pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pLocation, System.Text.StringBuilder /*char **/ pchMetadata, int /*int*/ cchMetadata ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + var pLocation_ps = new SteamPartyBeaconLocation_t.PackSmall(); + var ret = Native.SteamAPI_ISteamParties_GetBeaconDetails(_ptr, ulBeaconID, out pSteamIDBeaconOwner, ref pLocation_ps, pchMetadata, cchMetadata); + pLocation = pLocation_ps; + return ret; + } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_JoinParty( ulong ulBeaconID ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_JoinParty(_ptr, ulBeaconID); + } + public virtual bool /*bool*/ ISteamParties_GetNumAvailableBeaconLocations( IntPtr /*uint32 **/ puNumLocations ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetNumAvailableBeaconLocations(_ptr, puNumLocations); + } + public virtual bool /*bool*/ ISteamParties_GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pLocationList, uint /*uint32*/ uMaxNumLocations ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + var pLocationList_ps = new SteamPartyBeaconLocation_t.PackSmall(); + var ret = Native.SteamAPI_ISteamParties_GetAvailableBeaconLocations(_ptr, ref pLocationList_ps, uMaxNumLocations); + pLocationList = pLocationList_ps; + return ret; + } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_CreateBeacon( uint /*uint32*/ unOpenSlots, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pBeaconLocation, string /*const char **/ pchConnectString, string /*const char **/ pchMetadata ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + var pBeaconLocation_ps = new SteamPartyBeaconLocation_t.PackSmall(); + var ret = Native.SteamAPI_ISteamParties_CreateBeacon(_ptr, unOpenSlots, ref pBeaconLocation_ps, pchConnectString, pchMetadata); + pBeaconLocation = pBeaconLocation_ps; + return ret; + } + public virtual void /*void*/ ISteamParties_OnReservationCompleted( ulong ulBeacon, ulong steamIDUser ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + Native.SteamAPI_ISteamParties_OnReservationCompleted(_ptr, ulBeacon, steamIDUser); + } + public virtual void /*void*/ ISteamParties_CancelReservation( ulong ulBeacon, ulong steamIDUser ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + Native.SteamAPI_ISteamParties_CancelReservation(_ptr, ulBeacon, steamIDUser); + } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_ChangeNumOpenSlots( ulong ulBeacon, uint /*uint32*/ unOpenSlots ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_ChangeNumOpenSlots(_ptr, ulBeacon, unOpenSlots); + } + public virtual bool /*bool*/ ISteamParties_DestroyBeacon( ulong ulBeacon ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_DestroyBeacon(_ptr, ulBeacon); + } + public virtual bool /*bool*/ ISteamParties_GetBeaconLocationData( SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t*/ BeaconLocation, SteamPartyBeaconLocationData /*ESteamPartyBeaconLocationData*/ eData, System.Text.StringBuilder /*char **/ pchDataStringOut, int /*int*/ cchDataStringOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetBeaconLocationData(_ptr, BeaconLocation, eData, pchDataStringOut, cchDataStringOut); + } + public virtual bool /*bool*/ ISteamRemoteStorage_FileWrite( string /*const char **/ pchFile, IntPtr /*const void **/ pvData, int /*int32*/ cubData ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamRemoteStorage _ptr is null!" ); @@ -2105,6 +2302,18 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamApps_GetFileDetails(_ptr, pszFileName); } + public virtual int /*int*/ ISteamApps_GetLaunchCommandLine( System.Text.StringBuilder /*char **/ pszCommandLine, int /*int*/ cubCommandLine ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamApps _ptr is null!" ); + + return Native.SteamAPI_ISteamApps_GetLaunchCommandLine(_ptr, pszCommandLine, cubCommandLine); + } + public virtual bool /*bool*/ ISteamApps_BIsSubscribedFromFamilySharing() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamApps _ptr is null!" ); + + return Native.SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing(_ptr); + } public virtual bool /*bool*/ ISteamNetworking_SendP2PPacket( ulong steamIDRemote, IntPtr /*const void **/ pubData, uint /*uint32*/ cubData, P2PSend /*EP2PSend*/ eP2PSendType, int /*int*/ nChannel ) { @@ -2696,6 +2905,205 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut(_ptr, hRequest, ref pbWasTimedOut); } + public virtual bool /*bool*/ ISteamInput_Init() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_Init(_ptr); + } + public virtual bool /*bool*/ ISteamInput_Shutdown() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_Shutdown(_ptr); + } + public virtual void /*void*/ ISteamInput_RunFrame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_RunFrame(_ptr); + } + public virtual int /*int*/ ISteamInput_GetConnectedControllers( IntPtr /*InputHandle_t **/ handlesOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetConnectedControllers(_ptr, handlesOut); + } + public virtual InputActionSetHandle_t /*(InputActionSetHandle_t)*/ ISteamInput_GetActionSetHandle( string /*const char **/ pszActionSetName ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetActionSetHandle(_ptr, pszActionSetName); + } + public virtual void /*void*/ ISteamInput_ActivateActionSet( ulong inputHandle, ulong actionSetHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_ActivateActionSet(_ptr, inputHandle, actionSetHandle); + } + public virtual InputActionSetHandle_t /*(InputActionSetHandle_t)*/ ISteamInput_GetCurrentActionSet( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetCurrentActionSet(_ptr, inputHandle); + } + public virtual void /*void*/ ISteamInput_ActivateActionSetLayer( ulong inputHandle, ulong actionSetLayerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_ActivateActionSetLayer(_ptr, inputHandle, actionSetLayerHandle); + } + public virtual void /*void*/ ISteamInput_DeactivateActionSetLayer( ulong inputHandle, ulong actionSetLayerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_DeactivateActionSetLayer(_ptr, inputHandle, actionSetLayerHandle); + } + public virtual void /*void*/ ISteamInput_DeactivateAllActionSetLayers( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_DeactivateAllActionSetLayers(_ptr, inputHandle); + } + public virtual int /*int*/ ISteamInput_GetActiveActionSetLayers( ulong inputHandle, IntPtr /*InputActionSetHandle_t **/ handlesOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetActiveActionSetLayers(_ptr, inputHandle, handlesOut); + } + public virtual InputDigitalActionHandle_t /*(InputDigitalActionHandle_t)*/ ISteamInput_GetDigitalActionHandle( string /*const char **/ pszActionName ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetDigitalActionHandle(_ptr, pszActionName); + } + public virtual InputDigitalActionData_t /*struct InputDigitalActionData_t*/ ISteamInput_GetDigitalActionData( ulong inputHandle, ulong digitalActionHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetDigitalActionData(_ptr, inputHandle, digitalActionHandle); + } + public virtual int /*int*/ ISteamInput_GetDigitalActionOrigins( ulong inputHandle, ulong actionSetHandle, ulong digitalActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetDigitalActionOrigins(_ptr, inputHandle, actionSetHandle, digitalActionHandle, out originsOut); + } + public virtual InputAnalogActionHandle_t /*(InputAnalogActionHandle_t)*/ ISteamInput_GetAnalogActionHandle( string /*const char **/ pszActionName ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetAnalogActionHandle(_ptr, pszActionName); + } + public virtual InputAnalogActionData_t /*struct InputAnalogActionData_t*/ ISteamInput_GetAnalogActionData( ulong inputHandle, ulong analogActionHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetAnalogActionData(_ptr, inputHandle, analogActionHandle); + } + public virtual int /*int*/ ISteamInput_GetAnalogActionOrigins( ulong inputHandle, ulong actionSetHandle, ulong analogActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetAnalogActionOrigins(_ptr, inputHandle, actionSetHandle, analogActionHandle, out originsOut); + } + public virtual IntPtr ISteamInput_GetGlyphForActionOrigin( InputActionOrigin /*EInputActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetGlyphForActionOrigin(_ptr, eOrigin); + } + public virtual IntPtr ISteamInput_GetStringForActionOrigin( InputActionOrigin /*EInputActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetStringForActionOrigin(_ptr, eOrigin); + } + public virtual void /*void*/ ISteamInput_StopAnalogActionMomentum( ulong inputHandle, ulong eAction ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_StopAnalogActionMomentum(_ptr, inputHandle, eAction); + } + public virtual InputMotionData_t /*struct InputMotionData_t*/ ISteamInput_GetMotionData( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetMotionData(_ptr, inputHandle); + } + public virtual void /*void*/ ISteamInput_TriggerVibration( ulong inputHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_TriggerVibration(_ptr, inputHandle, usLeftSpeed, usRightSpeed); + } + public virtual void /*void*/ ISteamInput_SetLEDColor( ulong inputHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_SetLEDColor(_ptr, inputHandle, nColorR, nColorG, nColorB, nFlags); + } + public virtual void /*void*/ ISteamInput_TriggerHapticPulse( ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_TriggerHapticPulse(_ptr, inputHandle, eTargetPad, usDurationMicroSec); + } + public virtual void /*void*/ ISteamInput_TriggerRepeatedHapticPulse( ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_TriggerRepeatedHapticPulse(_ptr, inputHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags); + } + public virtual bool /*bool*/ ISteamInput_ShowBindingPanel( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_ShowBindingPanel(_ptr, inputHandle); + } + public virtual SteamInputType /*ESteamInputType*/ ISteamInput_GetInputTypeForHandle( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetInputTypeForHandle(_ptr, inputHandle); + } + public virtual InputHandle_t /*(InputHandle_t)*/ ISteamInput_GetControllerForGamepadIndex( int /*int*/ nIndex ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetControllerForGamepadIndex(_ptr, nIndex); + } + public virtual int /*int*/ ISteamInput_GetGamepadIndexForController( ulong ulinputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetGamepadIndexForController(_ptr, ulinputHandle); + } + public virtual IntPtr ISteamInput_GetStringForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetStringForXboxOrigin(_ptr, eOrigin); + } + public virtual IntPtr ISteamInput_GetGlyphForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetGlyphForXboxOrigin(_ptr, eOrigin); + } + public virtual InputActionOrigin /*EInputActionOrigin*/ ISteamInput_GetActionOriginFromXboxOrigin( ulong inputHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin(_ptr, inputHandle, eOrigin); + } + public virtual InputActionOrigin /*EInputActionOrigin*/ ISteamInput_TranslateActionOrigin( SteamInputType /*ESteamInputType*/ eDestinationInputType, InputActionOrigin /*EInputActionOrigin*/ eSourceOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_TranslateActionOrigin(_ptr, eDestinationInputType, eSourceOrigin); + } + public virtual bool /*bool*/ ISteamController_Init() { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2720,12 +3128,6 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetConnectedControllers(_ptr, handlesOut); } - public virtual bool /*bool*/ ISteamController_ShowBindingPanel( ulong controllerHandle ) - { - if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - - return Native.SteamAPI_ISteamController_ShowBindingPanel(_ptr, controllerHandle); - } public virtual ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ ISteamController_GetActionSetHandle( string /*const char **/ pszActionSetName ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2774,7 +3176,7 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetDigitalActionHandle(_ptr, pszActionName); } - public virtual ControllerDigitalActionData_t /*struct ControllerDigitalActionData_t*/ ISteamController_GetDigitalActionData( ulong controllerHandle, ulong digitalActionHandle ) + public virtual InputDigitalActionData_t /*struct InputDigitalActionData_t*/ ISteamController_GetDigitalActionData( ulong controllerHandle, ulong digitalActionHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2792,7 +3194,7 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetAnalogActionHandle(_ptr, pszActionName); } - public virtual ControllerAnalogActionData_t /*struct ControllerAnalogActionData_t*/ ISteamController_GetAnalogActionData( ulong controllerHandle, ulong analogActionHandle ) + public virtual InputAnalogActionData_t /*struct InputAnalogActionData_t*/ ISteamController_GetAnalogActionData( ulong controllerHandle, ulong analogActionHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2804,12 +3206,30 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetAnalogActionOrigins(_ptr, controllerHandle, actionSetHandle, analogActionHandle, out originsOut); } + public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetGlyphForActionOrigin(_ptr, eOrigin); + } + public virtual IntPtr ISteamController_GetStringForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetStringForActionOrigin(_ptr, eOrigin); + } public virtual void /*void*/ ISteamController_StopAnalogActionMomentum( ulong controllerHandle, ulong eAction ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); Native.SteamAPI_ISteamController_StopAnalogActionMomentum(_ptr, controllerHandle, eAction); } + public virtual InputMotionData_t /*struct InputMotionData_t*/ ISteamController_GetMotionData( ulong controllerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetMotionData(_ptr, controllerHandle); + } public virtual void /*void*/ ISteamController_TriggerHapticPulse( ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2834,11 +3254,17 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc Native.SteamAPI_ISteamController_SetLEDColor(_ptr, controllerHandle, nColorR, nColorG, nColorB, nFlags); } - public virtual int /*int*/ ISteamController_GetGamepadIndexForController( ulong ulControllerHandle ) + public virtual bool /*bool*/ ISteamController_ShowBindingPanel( ulong controllerHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetGamepadIndexForController(_ptr, ulControllerHandle); + return Native.SteamAPI_ISteamController_ShowBindingPanel(_ptr, controllerHandle); + } + public virtual SteamInputType /*ESteamInputType*/ ISteamController_GetInputTypeForHandle( ulong controllerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetInputTypeForHandle(_ptr, controllerHandle); } public virtual ControllerHandle_t /*(ControllerHandle_t)*/ ISteamController_GetControllerForGamepadIndex( int /*int*/ nIndex ) { @@ -2846,41 +3272,35 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetControllerForGamepadIndex(_ptr, nIndex); } - public virtual ControllerMotionData_t /*struct ControllerMotionData_t*/ ISteamController_GetMotionData( ulong controllerHandle ) + public virtual int /*int*/ ISteamController_GetGamepadIndexForController( ulong ulControllerHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetMotionData(_ptr, controllerHandle); + return Native.SteamAPI_ISteamController_GetGamepadIndexForController(_ptr, ulControllerHandle); } - public virtual bool /*bool*/ ISteamController_ShowDigitalActionOrigins( ulong controllerHandle, ulong digitalActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ) + public virtual IntPtr ISteamController_GetStringForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_ShowDigitalActionOrigins(_ptr, controllerHandle, digitalActionHandle, flScale, flXPosition, flYPosition); + return Native.SteamAPI_ISteamController_GetStringForXboxOrigin(_ptr, eOrigin); } - public virtual bool /*bool*/ ISteamController_ShowAnalogActionOrigins( ulong controllerHandle, ulong analogActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ) + public virtual IntPtr ISteamController_GetGlyphForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_ShowAnalogActionOrigins(_ptr, controllerHandle, analogActionHandle, flScale, flXPosition, flYPosition); + return Native.SteamAPI_ISteamController_GetGlyphForXboxOrigin(_ptr, eOrigin); } - public virtual IntPtr ISteamController_GetStringForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + public virtual ControllerActionOrigin /*EControllerActionOrigin*/ ISteamController_GetActionOriginFromXboxOrigin( ulong controllerHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetStringForActionOrigin(_ptr, eOrigin); + return Native.SteamAPI_ISteamController_GetActionOriginFromXboxOrigin(_ptr, controllerHandle, eOrigin); } - public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + public virtual ControllerActionOrigin /*EControllerActionOrigin*/ ISteamController_TranslateActionOrigin( SteamInputType /*ESteamInputType*/ eDestinationInputType, ControllerActionOrigin /*EControllerActionOrigin*/ eSourceOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetGlyphForActionOrigin(_ptr, eOrigin); - } - public virtual SteamInputType /*ESteamInputType*/ ISteamController_GetInputTypeForHandle( ulong controllerHandle ) - { - if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - - return Native.SteamAPI_ISteamController_GetInputTypeForHandle(_ptr, controllerHandle); + return Native.SteamAPI_ISteamController_TranslateActionOrigin(_ptr, eDestinationInputType, eSourceOrigin); } public virtual UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryUserUGCRequest( uint unAccountID, UserUGCList /*EUserUGCList*/ eListType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingUGCType, UserUGCListSortOrder /*EUserUGCListSortOrder*/ eSortOrder, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ) @@ -2895,6 +3315,12 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction return Native.SteamAPI_ISteamUGC_CreateQueryAllUGCRequest(_ptr, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage); } + public virtual UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryAllUGCRequest0( UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, string /*const char **/ pchCursor ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); + + return Native.SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0(_ptr, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor); + } public virtual UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryUGCDetailsRequest( IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ unNumPublishedFileIDs ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); @@ -3141,6 +3567,12 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction return Native.SteamAPI_ISteamUGC_SetItemPreview(_ptr, handle, pszPreviewFile); } + public virtual bool /*bool*/ ISteamUGC_SetAllowLegacyUpload( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowLegacyUpload ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); + + return Native.SteamAPI_ISteamUGC_SetAllowLegacyUpload(_ptr, handle, bAllowLegacyUpload); + } public virtual bool /*bool*/ ISteamUGC_RemoveItemKeyValueTags( ulong handle, string /*const char **/ pchKey ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); @@ -3473,11 +3905,11 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction Native.SteamAPI_ISteamHTMLSurface_MouseWheel(_ptr, unBrowserHandle, nDelta); } - public virtual void /*void*/ ISteamHTMLSurface_KeyDown( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ) + public virtual void /*void*/ ISteamHTMLSurface_KeyDown( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bIsSystemKey ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamHTMLSurface _ptr is null!" ); - Native.SteamAPI_ISteamHTMLSurface_KeyDown(_ptr, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers); + Native.SteamAPI_ISteamHTMLSurface_KeyDown(_ptr, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers, bIsSystemKey); } public virtual void /*void*/ ISteamHTMLSurface_KeyUp( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ) { @@ -3569,6 +4001,12 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction Native.SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor(_ptr, unBrowserHandle, flDPIScaling); } + public virtual void /*void*/ ISteamHTMLSurface_OpenDeveloperTools( uint unBrowserHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamHTMLSurface _ptr is null!" ); + + Native.SteamAPI_ISteamHTMLSurface_OpenDeveloperTools(_ptr, unBrowserHandle); + } public virtual void /*void*/ ISteamHTMLSurface_AllowStartRequest( uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowed ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamHTMLSurface _ptr is null!" ); @@ -3750,17 +4188,17 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction return Native.SteamAPI_ISteamInventory_GetNumItemsWithPrices(_ptr); } - public virtual bool /*bool*/ ISteamInventory_GetItemsWithPrices( IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pPrices, uint /*uint32*/ unArrayLength ) + public virtual bool /*bool*/ ISteamInventory_GetItemsWithPrices( IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pCurrentPrices, IntPtr /*uint64 **/ pBasePrices, uint /*uint32*/ unArrayLength ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInventory _ptr is null!" ); - return Native.SteamAPI_ISteamInventory_GetItemsWithPrices(_ptr, pArrayItemDefs, pPrices, unArrayLength); + return Native.SteamAPI_ISteamInventory_GetItemsWithPrices(_ptr, pArrayItemDefs, pCurrentPrices, pBasePrices, unArrayLength); } - public virtual bool /*bool*/ ISteamInventory_GetItemPrice( int iDefinition, out ulong /*uint64 **/ pPrice ) + public virtual bool /*bool*/ ISteamInventory_GetItemPrice( int iDefinition, out ulong /*uint64 **/ pCurrentPrice, out ulong /*uint64 **/ pBasePrice ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInventory _ptr is null!" ); - return Native.SteamAPI_ISteamInventory_GetItemPrice(_ptr, iDefinition, out pPrice); + return Native.SteamAPI_ISteamInventory_GetItemPrice(_ptr, iDefinition, out pCurrentPrice, out pBasePrice); } public virtual SteamInventoryUpdateHandle_t /*(SteamInventoryUpdateHandle_t)*/ ISteamInventory_StartUpdateProperties() { @@ -4282,6 +4720,7 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern IntPtr /*class ISteamNetworking **/ SteamAPI_ISteamClient_GetISteamNetworking( IntPtr ISteamClient, int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "libsteam_api64.so" )] internal static extern IntPtr /*class ISteamRemoteStorage **/ SteamAPI_ISteamClient_GetISteamRemoteStorage( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "libsteam_api64.so" )] internal static extern IntPtr /*class ISteamScreenshots **/ SteamAPI_ISteamClient_GetISteamScreenshots( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr /*class ISteamGameSearch **/ SteamAPI_ISteamClient_GetISteamGameSearch( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "libsteam_api64.so" )] internal static extern uint /*uint32*/ SteamAPI_ISteamClient_GetIPCCallCount( IntPtr ISteamClient ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamClient_SetWarningMessageHook( IntPtr ISteamClient, IntPtr /*SteamAPIWarningMessageHook_t*/ pFunction ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamClient_BShutdownIfAllPipesClosed( IntPtr ISteamClient ); @@ -4295,6 +4734,8 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern IntPtr /*class ISteamInventory **/ SteamAPI_ISteamClient_GetISteamInventory( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "libsteam_api64.so" )] internal static extern IntPtr /*class ISteamVideo **/ SteamAPI_ISteamClient_GetISteamVideo( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "libsteam_api64.so" )] internal static extern IntPtr /*class ISteamParentalSettings **/ SteamAPI_ISteamClient_GetISteamParentalSettings( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr /*class ISteamInput **/ SteamAPI_ISteamClient_GetISteamInput( IntPtr ISteamClient, int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr /*class ISteamParties **/ SteamAPI_ISteamClient_GetISteamParties( IntPtr ISteamClient, int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); // // ISteamUser @@ -4328,6 +4769,7 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUser_BIsTwoFactorEnabled( IntPtr ISteamUser ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUser_BIsPhoneIdentifying( IntPtr ISteamUser ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUser_BIsPhoneRequiringVerification( IntPtr ISteamUser ); + [DllImport( "libsteam_api64.so" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamUser_GetMarketEligibility( IntPtr ISteamUser ); // // ISteamFriends @@ -4362,7 +4804,7 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_SetInGameVoiceSpeaking( IntPtr ISteamFriends, ulong steamIDUser, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bSpeaking ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlay( IntPtr ISteamFriends, string /*const char **/ pchDialog ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToUser( IntPtr ISteamFriends, string /*const char **/ pchDialog, ulong steamID ); - [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage( IntPtr ISteamFriends, string /*const char **/ pchURL ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage( IntPtr ISteamFriends, string /*const char **/ pchURL, ActivateGameOverlayToWebPageMode /*EActivateGameOverlayToWebPageMode*/ eMode ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToStore( IntPtr ISteamFriends, uint nAppID, OverlayToStoreFlag /*EOverlayToStoreFlag*/ eFlag ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_SetPlayedWith( IntPtr ISteamFriends, ulong steamIDUserPlayedWith ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog( IntPtr ISteamFriends, ulong steamIDLobby ); @@ -4404,6 +4846,7 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamFriends_EnumerateFollowingList( IntPtr ISteamFriends, uint /*uint32*/ unStartIndex ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamFriends_IsClanPublic( IntPtr ISteamFriends, ulong steamIDClan ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamFriends_IsClanOfficialGameGroup( IntPtr ISteamFriends, ulong steamIDClan ); + [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages( IntPtr ISteamFriends ); // // ISteamUtils @@ -4501,6 +4944,40 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern HServerQuery /*(HServerQuery)*/ SteamAPI_ISteamMatchmakingServers_ServerRules( IntPtr ISteamMatchmakingServers, uint /*uint32*/ unIP, ushort /*uint16*/ usPort, IntPtr /*class ISteamMatchmakingRulesResponse **/ pRequestServersResponse ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamMatchmakingServers_CancelServerQuery( IntPtr ISteamMatchmakingServers, int hServerQuery ); + // + // ISteamGameSearch + // + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_AddGameSearchParams( IntPtr ISteamGameSearch, string /*const char **/ pchKeyToFind, string /*const char **/ pchValuesToFind ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SearchForGameWithLobby( IntPtr ISteamGameSearch, ulong steamIDLobby, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SearchForGameSolo( IntPtr ISteamGameSearch, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_AcceptGame( IntPtr ISteamGameSearch ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_DeclineGame( IntPtr ISteamGameSearch ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_RetrieveConnectionDetails( IntPtr ISteamGameSearch, ulong steamIDHost, IntPtr /*char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_EndGameSearch( IntPtr ISteamGameSearch ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SetGameHostParams( IntPtr ISteamGameSearch, string /*const char **/ pchKey, string /*const char **/ pchValue ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SetConnectionDetails( IntPtr ISteamGameSearch, string /*const char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_RequestPlayersForGame( IntPtr ISteamGameSearch, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax, int /*int*/ nMaxTeamSize ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_HostConfirmGameStart( IntPtr ISteamGameSearch, ulong /*uint64*/ ullUniqueGameID ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame( IntPtr ISteamGameSearch ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SubmitPlayerResult( IntPtr ISteamGameSearch, ulong /*uint64*/ ullUniqueGameID, ulong steamIDPlayer, PlayerResult_t /*EPlayerResult_t*/ EPlayerResult ); + [DllImport( "libsteam_api64.so" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_EndGame( IntPtr ISteamGameSearch, ulong /*uint64*/ ullUniqueGameID ); + + // + // ISteamParties + // + [DllImport( "libsteam_api64.so" )] internal static extern uint /*uint32*/ SteamAPI_ISteamParties_GetNumActiveBeacons( IntPtr ISteamParties ); + [DllImport( "libsteam_api64.so" )] internal static extern PartyBeaconID_t /*(PartyBeaconID_t)*/ SteamAPI_ISteamParties_GetBeaconByIndex( IntPtr ISteamParties, uint /*uint32*/ unIndex ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetBeaconDetails( IntPtr ISteamParties, ulong ulBeaconID, out ulong pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t.PackSmall /*struct SteamPartyBeaconLocation_t **/ pLocation, System.Text.StringBuilder /*char **/ pchMetadata, int /*int*/ cchMetadata ); + [DllImport( "libsteam_api64.so" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamParties_JoinParty( IntPtr ISteamParties, ulong ulBeaconID ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetNumAvailableBeaconLocations( IntPtr ISteamParties, IntPtr /*uint32 **/ puNumLocations ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetAvailableBeaconLocations( IntPtr ISteamParties, ref SteamPartyBeaconLocation_t.PackSmall /*struct SteamPartyBeaconLocation_t **/ pLocationList, uint /*uint32*/ uMaxNumLocations ); + [DllImport( "libsteam_api64.so" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamParties_CreateBeacon( IntPtr ISteamParties, uint /*uint32*/ unOpenSlots, ref SteamPartyBeaconLocation_t.PackSmall /*struct SteamPartyBeaconLocation_t **/ pBeaconLocation, string /*const char **/ pchConnectString, string /*const char **/ pchMetadata ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamParties_OnReservationCompleted( IntPtr ISteamParties, ulong ulBeacon, ulong steamIDUser ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamParties_CancelReservation( IntPtr ISteamParties, ulong ulBeacon, ulong steamIDUser ); + [DllImport( "libsteam_api64.so" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamParties_ChangeNumOpenSlots( IntPtr ISteamParties, ulong ulBeacon, uint /*uint32*/ unOpenSlots ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_DestroyBeacon( IntPtr ISteamParties, ulong ulBeacon ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetBeaconLocationData( IntPtr ISteamParties, SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t*/ BeaconLocation, SteamPartyBeaconLocationData /*ESteamPartyBeaconLocationData*/ eData, System.Text.StringBuilder /*char **/ pchDataStringOut, int /*int*/ cchDataStringOut ); + // // ISteamRemoteStorage // @@ -4636,6 +5113,8 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamApps_GetAppBuildId( IntPtr ISteamApps ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys( IntPtr ISteamApps ); [DllImport( "libsteam_api64.so" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamApps_GetFileDetails( IntPtr ISteamApps, string /*const char **/ pszFileName ); + [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamApps_GetLaunchCommandLine( IntPtr ISteamApps, System.Text.StringBuilder /*char **/ pszCommandLine, int /*int*/ cubCommandLine ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( IntPtr ISteamApps ); // // ISteamNetworking @@ -4754,6 +5233,43 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS( IntPtr ISteamHTTP, uint hRequest, uint /*uint32*/ unMilliseconds ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut( IntPtr ISteamHTTP, uint hRequest, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbWasTimedOut ); + // + // ISteamInput + // + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamInput_Init( IntPtr ISteamInput ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamInput_Shutdown( IntPtr ISteamInput ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamInput_RunFrame( IntPtr ISteamInput ); + [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetConnectedControllers( IntPtr ISteamInput, IntPtr /*InputHandle_t **/ handlesOut ); + [DllImport( "libsteam_api64.so" )] internal static extern InputActionSetHandle_t /*(InputActionSetHandle_t)*/ SteamAPI_ISteamInput_GetActionSetHandle( IntPtr ISteamInput, string /*const char **/ pszActionSetName ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamInput_ActivateActionSet( IntPtr ISteamInput, ulong inputHandle, ulong actionSetHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern InputActionSetHandle_t /*(InputActionSetHandle_t)*/ SteamAPI_ISteamInput_GetCurrentActionSet( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamInput_ActivateActionSetLayer( IntPtr ISteamInput, ulong inputHandle, ulong actionSetLayerHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamInput_DeactivateActionSetLayer( IntPtr ISteamInput, ulong inputHandle, ulong actionSetLayerHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamInput_DeactivateAllActionSetLayers( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetActiveActionSetLayers( IntPtr ISteamInput, ulong inputHandle, IntPtr /*InputActionSetHandle_t **/ handlesOut ); + [DllImport( "libsteam_api64.so" )] internal static extern InputDigitalActionHandle_t /*(InputDigitalActionHandle_t)*/ SteamAPI_ISteamInput_GetDigitalActionHandle( IntPtr ISteamInput, string /*const char **/ pszActionName ); + [DllImport( "libsteam_api64.so" )] internal static extern InputDigitalActionData_t /*struct InputDigitalActionData_t*/ SteamAPI_ISteamInput_GetDigitalActionData( IntPtr ISteamInput, ulong inputHandle, ulong digitalActionHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetDigitalActionOrigins( IntPtr ISteamInput, ulong inputHandle, ulong actionSetHandle, ulong digitalActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ); + [DllImport( "libsteam_api64.so" )] internal static extern InputAnalogActionHandle_t /*(InputAnalogActionHandle_t)*/ SteamAPI_ISteamInput_GetAnalogActionHandle( IntPtr ISteamInput, string /*const char **/ pszActionName ); + [DllImport( "libsteam_api64.so" )] internal static extern InputAnalogActionData_t /*struct InputAnalogActionData_t*/ SteamAPI_ISteamInput_GetAnalogActionData( IntPtr ISteamInput, ulong inputHandle, ulong analogActionHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetAnalogActionOrigins( IntPtr ISteamInput, ulong inputHandle, ulong actionSetHandle, ulong analogActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr SteamAPI_ISteamInput_GetGlyphForActionOrigin( IntPtr ISteamInput, InputActionOrigin /*EInputActionOrigin*/ eOrigin ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr SteamAPI_ISteamInput_GetStringForActionOrigin( IntPtr ISteamInput, InputActionOrigin /*EInputActionOrigin*/ eOrigin ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamInput_StopAnalogActionMomentum( IntPtr ISteamInput, ulong inputHandle, ulong eAction ); + [DllImport( "libsteam_api64.so" )] internal static extern InputMotionData_t /*struct InputMotionData_t*/ SteamAPI_ISteamInput_GetMotionData( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamInput_TriggerVibration( IntPtr ISteamInput, ulong inputHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamInput_SetLEDColor( IntPtr ISteamInput, ulong inputHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamInput_TriggerHapticPulse( IntPtr ISteamInput, ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamInput_TriggerRepeatedHapticPulse( IntPtr ISteamInput, ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamInput_ShowBindingPanel( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern SteamInputType /*ESteamInputType*/ SteamAPI_ISteamInput_GetInputTypeForHandle( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern InputHandle_t /*(InputHandle_t)*/ SteamAPI_ISteamInput_GetControllerForGamepadIndex( IntPtr ISteamInput, int /*int*/ nIndex ); + [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetGamepadIndexForController( IntPtr ISteamInput, ulong ulinputHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr SteamAPI_ISteamInput_GetStringForXboxOrigin( IntPtr ISteamInput, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr SteamAPI_ISteamInput_GetGlyphForXboxOrigin( IntPtr ISteamInput, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api64.so" )] internal static extern InputActionOrigin /*EInputActionOrigin*/ SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin( IntPtr ISteamInput, ulong inputHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api64.so" )] internal static extern InputActionOrigin /*EInputActionOrigin*/ SteamAPI_ISteamInput_TranslateActionOrigin( IntPtr ISteamInput, SteamInputType /*ESteamInputType*/ eDestinationInputType, InputActionOrigin /*EInputActionOrigin*/ eSourceOrigin ); + // // ISteamController // @@ -4761,7 +5277,6 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_Shutdown( IntPtr ISteamController ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamController_RunFrame( IntPtr ISteamController ); [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetConnectedControllers( IntPtr ISteamController, IntPtr /*ControllerHandle_t **/ handlesOut ); - [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowBindingPanel( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "libsteam_api64.so" )] internal static extern ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ SteamAPI_ISteamController_GetActionSetHandle( IntPtr ISteamController, string /*const char **/ pszActionSetName ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamController_ActivateActionSet( IntPtr ISteamController, ulong controllerHandle, ulong actionSetHandle ); [DllImport( "libsteam_api64.so" )] internal static extern ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ SteamAPI_ISteamController_GetCurrentActionSet( IntPtr ISteamController, ulong controllerHandle ); @@ -4770,30 +5285,34 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamController_DeactivateAllActionSetLayers( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetActiveActionSetLayers( IntPtr ISteamController, ulong controllerHandle, IntPtr /*ControllerActionSetHandle_t **/ handlesOut ); [DllImport( "libsteam_api64.so" )] internal static extern ControllerDigitalActionHandle_t /*(ControllerDigitalActionHandle_t)*/ SteamAPI_ISteamController_GetDigitalActionHandle( IntPtr ISteamController, string /*const char **/ pszActionName ); - [DllImport( "libsteam_api64.so" )] internal static extern ControllerDigitalActionData_t /*struct ControllerDigitalActionData_t*/ SteamAPI_ISteamController_GetDigitalActionData( IntPtr ISteamController, ulong controllerHandle, ulong digitalActionHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern InputDigitalActionData_t /*struct InputDigitalActionData_t*/ SteamAPI_ISteamController_GetDigitalActionData( IntPtr ISteamController, ulong controllerHandle, ulong digitalActionHandle ); [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetDigitalActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong actionSetHandle, ulong digitalActionHandle, out ControllerActionOrigin /*EControllerActionOrigin **/ originsOut ); [DllImport( "libsteam_api64.so" )] internal static extern ControllerAnalogActionHandle_t /*(ControllerAnalogActionHandle_t)*/ SteamAPI_ISteamController_GetAnalogActionHandle( IntPtr ISteamController, string /*const char **/ pszActionName ); - [DllImport( "libsteam_api64.so" )] internal static extern ControllerAnalogActionData_t /*struct ControllerAnalogActionData_t*/ SteamAPI_ISteamController_GetAnalogActionData( IntPtr ISteamController, ulong controllerHandle, ulong analogActionHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern InputAnalogActionData_t /*struct InputAnalogActionData_t*/ SteamAPI_ISteamController_GetAnalogActionData( IntPtr ISteamController, ulong controllerHandle, ulong analogActionHandle ); [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetAnalogActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong actionSetHandle, ulong analogActionHandle, out ControllerActionOrigin /*EControllerActionOrigin **/ originsOut ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr SteamAPI_ISteamController_GetStringForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamController_StopAnalogActionMomentum( IntPtr ISteamController, ulong controllerHandle, ulong eAction ); + [DllImport( "libsteam_api64.so" )] internal static extern InputMotionData_t /*struct InputMotionData_t*/ SteamAPI_ISteamController_GetMotionData( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamController_TriggerHapticPulse( IntPtr ISteamController, ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamController_TriggerRepeatedHapticPulse( IntPtr ISteamController, ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamController_TriggerVibration( IntPtr ISteamController, ulong controllerHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamController_SetLEDColor( IntPtr ISteamController, ulong controllerHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ); - [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetGamepadIndexForController( IntPtr ISteamController, ulong ulControllerHandle ); - [DllImport( "libsteam_api64.so" )] internal static extern ControllerHandle_t /*(ControllerHandle_t)*/ SteamAPI_ISteamController_GetControllerForGamepadIndex( IntPtr ISteamController, int /*int*/ nIndex ); - [DllImport( "libsteam_api64.so" )] internal static extern ControllerMotionData_t /*struct ControllerMotionData_t*/ SteamAPI_ISteamController_GetMotionData( IntPtr ISteamController, ulong controllerHandle ); - [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowDigitalActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong digitalActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ); - [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowAnalogActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong analogActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ); - [DllImport( "libsteam_api64.so" )] internal static extern IntPtr SteamAPI_ISteamController_GetStringForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); - [DllImport( "libsteam_api64.so" )] internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowBindingPanel( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "libsteam_api64.so" )] internal static extern SteamInputType /*ESteamInputType*/ SteamAPI_ISteamController_GetInputTypeForHandle( IntPtr ISteamController, ulong controllerHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern ControllerHandle_t /*(ControllerHandle_t)*/ SteamAPI_ISteamController_GetControllerForGamepadIndex( IntPtr ISteamController, int /*int*/ nIndex ); + [DllImport( "libsteam_api64.so" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetGamepadIndexForController( IntPtr ISteamController, ulong ulControllerHandle ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr SteamAPI_ISteamController_GetStringForXboxOrigin( IntPtr ISteamController, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api64.so" )] internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForXboxOrigin( IntPtr ISteamController, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api64.so" )] internal static extern ControllerActionOrigin /*EControllerActionOrigin*/ SteamAPI_ISteamController_GetActionOriginFromXboxOrigin( IntPtr ISteamController, ulong controllerHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api64.so" )] internal static extern ControllerActionOrigin /*EControllerActionOrigin*/ SteamAPI_ISteamController_TranslateActionOrigin( IntPtr ISteamController, SteamInputType /*ESteamInputType*/ eDestinationInputType, ControllerActionOrigin /*EControllerActionOrigin*/ eSourceOrigin ); // // ISteamUGC // [DllImport( "libsteam_api64.so" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( IntPtr ISteamUGC, uint unAccountID, UserUGCList /*EUserUGCList*/ eListType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingUGCType, UserUGCListSortOrder /*EUserUGCListSortOrder*/ eSortOrder, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ); [DllImport( "libsteam_api64.so" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryAllUGCRequest( IntPtr ISteamUGC, UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ); + [DllImport( "libsteam_api64.so" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0( IntPtr ISteamUGC, UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, string /*const char **/ pchCursor ); [DllImport( "libsteam_api64.so" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest( IntPtr ISteamUGC, IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ unNumPublishedFileIDs ); [DllImport( "libsteam_api64.so" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamUGC_SendQueryUGCRequest( IntPtr ISteamUGC, ulong handle ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_GetQueryUGCResult( IntPtr ISteamUGC, ulong handle, uint /*uint32*/ index, ref SteamUGCDetails_t.PackSmall /*struct SteamUGCDetails_t **/ pDetails ); @@ -4834,6 +5353,7 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetItemTags( IntPtr ISteamUGC, ulong updateHandle, ref SteamParamStringArray_t.PackSmall /*const struct SteamParamStringArray_t **/ pTags ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetItemContent( IntPtr ISteamUGC, ulong handle, string /*const char **/ pszContentFolder ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetItemPreview( IntPtr ISteamUGC, ulong handle, string /*const char **/ pszPreviewFile ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetAllowLegacyUpload( IntPtr ISteamUGC, ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowLegacyUpload ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_RemoveItemKeyValueTags( IntPtr ISteamUGC, ulong handle, string /*const char **/ pchKey ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_AddItemKeyValueTag( IntPtr ISteamUGC, ulong handle, string /*const char **/ pchKey, string /*const char **/ pchValue ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_AddItemPreviewFile( IntPtr ISteamUGC, ulong handle, string /*const char **/ pszPreviewFile, ItemPreviewType /*EItemPreviewType*/ type ); @@ -4897,7 +5417,7 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_MouseDoubleClick( IntPtr ISteamHTMLSurface, uint unBrowserHandle, HTMLMouseButton /*ISteamHTMLSurface::EHTMLMouseButton*/ eMouseButton ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_MouseMove( IntPtr ISteamHTMLSurface, uint unBrowserHandle, int /*int*/ x, int /*int*/ y ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_MouseWheel( IntPtr ISteamHTMLSurface, uint unBrowserHandle, int /*int32*/ nDelta ); - [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyDown( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyDown( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bIsSystemKey ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyUp( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyChar( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ cUnicodeChar, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetHorizontalScroll( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nAbsolutePixelScroll ); @@ -4913,6 +5433,7 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetPageScaleFactor( IntPtr ISteamHTMLSurface, uint unBrowserHandle, float /*float*/ flZoom, int /*int*/ nPointX, int /*int*/ nPointY ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetBackgroundMode( IntPtr ISteamHTMLSurface, uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bBackgroundMode ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor( IntPtr ISteamHTMLSurface, uint unBrowserHandle, float /*float*/ flDPIScaling ); + [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_OpenDeveloperTools( IntPtr ISteamHTMLSurface, uint unBrowserHandle ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_AllowStartRequest( IntPtr ISteamHTMLSurface, uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowed ); [DllImport( "libsteam_api64.so" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_JSDialogResponse( IntPtr ISteamHTMLSurface, uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bResult ); @@ -4947,8 +5468,8 @@ internal static unsafe class Native [DllImport( "libsteam_api64.so" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamInventory_StartPurchase( IntPtr ISteamInventory, int[] pArrayItemDefs, uint[] /*const uint32 **/ punArrayQuantity, uint /*uint32*/ unArrayLength ); [DllImport( "libsteam_api64.so" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamInventory_RequestPrices( IntPtr ISteamInventory ); [DllImport( "libsteam_api64.so" )] internal static extern uint /*uint32*/ SteamAPI_ISteamInventory_GetNumItemsWithPrices( IntPtr ISteamInventory ); - [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemsWithPrices( IntPtr ISteamInventory, IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pPrices, uint /*uint32*/ unArrayLength ); - [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemPrice( IntPtr ISteamInventory, int iDefinition, out ulong /*uint64 **/ pPrice ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemsWithPrices( IntPtr ISteamInventory, IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pCurrentPrices, IntPtr /*uint64 **/ pBasePrices, uint /*uint32*/ unArrayLength ); + [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemPrice( IntPtr ISteamInventory, int iDefinition, out ulong /*uint64 **/ pCurrentPrice, out ulong /*uint64 **/ pBasePrice ); [DllImport( "libsteam_api64.so" )] internal static extern SteamInventoryUpdateHandle_t /*(SteamInventoryUpdateHandle_t)*/ SteamAPI_ISteamInventory_StartUpdateProperties( IntPtr ISteamInventory ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_RemoveProperty( IntPtr ISteamInventory, ulong handle, ulong nItemID, string /*const char **/ pchPropertyName ); [DllImport( "libsteam_api64.so" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_SetProperty( IntPtr ISteamInventory, ulong handle, ulong nItemID, string /*const char **/ pchPropertyName, string /*const char **/ pchPropertyValue ); diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Mac.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Mac.cs index 989ad11..3223797 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Mac.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Mac.cs @@ -140,6 +140,12 @@ public virtual void Dispose() return Native.SteamAPI_ISteamClient_GetISteamScreenshots(_ptr, hSteamuser, hSteamPipe, pchVersion); } + public virtual IntPtr /*class ISteamGameSearch **/ ISteamClient_GetISteamGameSearch( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); + + return Native.SteamAPI_ISteamClient_GetISteamGameSearch(_ptr, hSteamuser, hSteamPipe, pchVersion); + } public virtual uint /*uint32*/ ISteamClient_GetIPCCallCount() { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); @@ -218,6 +224,18 @@ public virtual void Dispose() return Native.SteamAPI_ISteamClient_GetISteamParentalSettings(_ptr, hSteamuser, hSteamPipe, pchVersion); } + public virtual IntPtr /*class ISteamInput **/ ISteamClient_GetISteamInput( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); + + return Native.SteamAPI_ISteamClient_GetISteamInput(_ptr, hSteamUser, hSteamPipe, pchVersion); + } + public virtual IntPtr /*class ISteamParties **/ ISteamClient_GetISteamParties( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); + + return Native.SteamAPI_ISteamClient_GetISteamParties(_ptr, hSteamUser, hSteamPipe, pchVersion); + } public virtual HSteamUser /*(HSteamUser)*/ ISteamUser_GetHSteamUser() { @@ -393,6 +411,12 @@ public virtual void Dispose() return Native.SteamAPI_ISteamUser_BIsPhoneRequiringVerification(_ptr); } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUser_GetMarketEligibility() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUser _ptr is null!" ); + + return Native.SteamAPI_ISteamUser_GetMarketEligibility(_ptr); + } public virtual IntPtr ISteamFriends_GetPersonaName() { @@ -577,11 +601,11 @@ public virtual IntPtr ISteamFriends_GetClanTag( ulong steamIDClan ) Native.SteamAPI_ISteamFriends_ActivateGameOverlayToUser(_ptr, pchDialog, steamID); } - public virtual void /*void*/ ISteamFriends_ActivateGameOverlayToWebPage( string /*const char **/ pchURL ) + public virtual void /*void*/ ISteamFriends_ActivateGameOverlayToWebPage( string /*const char **/ pchURL, ActivateGameOverlayToWebPageMode /*EActivateGameOverlayToWebPageMode*/ eMode ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamFriends _ptr is null!" ); - Native.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(_ptr, pchURL); + Native.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(_ptr, pchURL, eMode); } public virtual void /*void*/ ISteamFriends_ActivateGameOverlayToStore( uint nAppID, OverlayToStoreFlag /*EOverlayToStoreFlag*/ eFlag ) { @@ -829,6 +853,12 @@ public virtual IntPtr ISteamFriends_GetFriendRichPresenceKeyByIndex( ulong steam return Native.SteamAPI_ISteamFriends_IsClanOfficialGameGroup(_ptr, steamIDClan); } + public virtual int /*int*/ ISteamFriends_GetNumChatsWithUnreadPriorityMessages() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamFriends _ptr is null!" ); + + return Native.SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages(_ptr); + } public virtual uint /*uint32*/ ISteamUtils_GetSecondsSinceAppActive() { @@ -1337,6 +1367,173 @@ public virtual IntPtr ISteamMatchmaking_GetLobbyMemberData( ulong steamIDLobby, Native.SteamAPI_ISteamMatchmakingServers_CancelServerQuery(_ptr, hServerQuery); } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_AddGameSearchParams( string /*const char **/ pchKeyToFind, string /*const char **/ pchValuesToFind ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_AddGameSearchParams(_ptr, pchKeyToFind, pchValuesToFind); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SearchForGameWithLobby( ulong steamIDLobby, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SearchForGameWithLobby(_ptr, steamIDLobby, nPlayerMin, nPlayerMax); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SearchForGameSolo( int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SearchForGameSolo(_ptr, nPlayerMin, nPlayerMax); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_AcceptGame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_AcceptGame(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_DeclineGame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_DeclineGame(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_RetrieveConnectionDetails( ulong steamIDHost, IntPtr /*char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_RetrieveConnectionDetails(_ptr, steamIDHost, pchConnectionDetails, cubConnectionDetails); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_EndGameSearch() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_EndGameSearch(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SetGameHostParams( string /*const char **/ pchKey, string /*const char **/ pchValue ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SetGameHostParams(_ptr, pchKey, pchValue); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SetConnectionDetails( string /*const char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SetConnectionDetails(_ptr, pchConnectionDetails, cubConnectionDetails); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_RequestPlayersForGame( int /*int*/ nPlayerMin, int /*int*/ nPlayerMax, int /*int*/ nMaxTeamSize ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_RequestPlayersForGame(_ptr, nPlayerMin, nPlayerMax, nMaxTeamSize); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_HostConfirmGameStart( ulong /*uint64*/ ullUniqueGameID ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_HostConfirmGameStart(_ptr, ullUniqueGameID); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_CancelRequestPlayersForGame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SubmitPlayerResult( ulong /*uint64*/ ullUniqueGameID, ulong steamIDPlayer, PlayerResult_t /*EPlayerResult_t*/ EPlayerResult ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SubmitPlayerResult(_ptr, ullUniqueGameID, steamIDPlayer, EPlayerResult); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_EndGame( ulong /*uint64*/ ullUniqueGameID ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_EndGame(_ptr, ullUniqueGameID); + } + + public virtual uint /*uint32*/ ISteamParties_GetNumActiveBeacons() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetNumActiveBeacons(_ptr); + } + public virtual PartyBeaconID_t /*(PartyBeaconID_t)*/ ISteamParties_GetBeaconByIndex( uint /*uint32*/ unIndex ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetBeaconByIndex(_ptr, unIndex); + } + public virtual bool /*bool*/ ISteamParties_GetBeaconDetails( ulong ulBeaconID, out ulong pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pLocation, System.Text.StringBuilder /*char **/ pchMetadata, int /*int*/ cchMetadata ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + var pLocation_ps = new SteamPartyBeaconLocation_t.PackSmall(); + var ret = Native.SteamAPI_ISteamParties_GetBeaconDetails(_ptr, ulBeaconID, out pSteamIDBeaconOwner, ref pLocation_ps, pchMetadata, cchMetadata); + pLocation = pLocation_ps; + return ret; + } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_JoinParty( ulong ulBeaconID ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_JoinParty(_ptr, ulBeaconID); + } + public virtual bool /*bool*/ ISteamParties_GetNumAvailableBeaconLocations( IntPtr /*uint32 **/ puNumLocations ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetNumAvailableBeaconLocations(_ptr, puNumLocations); + } + public virtual bool /*bool*/ ISteamParties_GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pLocationList, uint /*uint32*/ uMaxNumLocations ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + var pLocationList_ps = new SteamPartyBeaconLocation_t.PackSmall(); + var ret = Native.SteamAPI_ISteamParties_GetAvailableBeaconLocations(_ptr, ref pLocationList_ps, uMaxNumLocations); + pLocationList = pLocationList_ps; + return ret; + } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_CreateBeacon( uint /*uint32*/ unOpenSlots, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pBeaconLocation, string /*const char **/ pchConnectString, string /*const char **/ pchMetadata ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + var pBeaconLocation_ps = new SteamPartyBeaconLocation_t.PackSmall(); + var ret = Native.SteamAPI_ISteamParties_CreateBeacon(_ptr, unOpenSlots, ref pBeaconLocation_ps, pchConnectString, pchMetadata); + pBeaconLocation = pBeaconLocation_ps; + return ret; + } + public virtual void /*void*/ ISteamParties_OnReservationCompleted( ulong ulBeacon, ulong steamIDUser ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + Native.SteamAPI_ISteamParties_OnReservationCompleted(_ptr, ulBeacon, steamIDUser); + } + public virtual void /*void*/ ISteamParties_CancelReservation( ulong ulBeacon, ulong steamIDUser ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + Native.SteamAPI_ISteamParties_CancelReservation(_ptr, ulBeacon, steamIDUser); + } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_ChangeNumOpenSlots( ulong ulBeacon, uint /*uint32*/ unOpenSlots ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_ChangeNumOpenSlots(_ptr, ulBeacon, unOpenSlots); + } + public virtual bool /*bool*/ ISteamParties_DestroyBeacon( ulong ulBeacon ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_DestroyBeacon(_ptr, ulBeacon); + } + public virtual bool /*bool*/ ISteamParties_GetBeaconLocationData( SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t*/ BeaconLocation, SteamPartyBeaconLocationData /*ESteamPartyBeaconLocationData*/ eData, System.Text.StringBuilder /*char **/ pchDataStringOut, int /*int*/ cchDataStringOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetBeaconLocationData(_ptr, BeaconLocation, eData, pchDataStringOut, cchDataStringOut); + } + public virtual bool /*bool*/ ISteamRemoteStorage_FileWrite( string /*const char **/ pchFile, IntPtr /*const void **/ pvData, int /*int32*/ cubData ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamRemoteStorage _ptr is null!" ); @@ -2105,6 +2302,18 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamApps_GetFileDetails(_ptr, pszFileName); } + public virtual int /*int*/ ISteamApps_GetLaunchCommandLine( System.Text.StringBuilder /*char **/ pszCommandLine, int /*int*/ cubCommandLine ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamApps _ptr is null!" ); + + return Native.SteamAPI_ISteamApps_GetLaunchCommandLine(_ptr, pszCommandLine, cubCommandLine); + } + public virtual bool /*bool*/ ISteamApps_BIsSubscribedFromFamilySharing() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamApps _ptr is null!" ); + + return Native.SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing(_ptr); + } public virtual bool /*bool*/ ISteamNetworking_SendP2PPacket( ulong steamIDRemote, IntPtr /*const void **/ pubData, uint /*uint32*/ cubData, P2PSend /*EP2PSend*/ eP2PSendType, int /*int*/ nChannel ) { @@ -2696,6 +2905,205 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut(_ptr, hRequest, ref pbWasTimedOut); } + public virtual bool /*bool*/ ISteamInput_Init() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_Init(_ptr); + } + public virtual bool /*bool*/ ISteamInput_Shutdown() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_Shutdown(_ptr); + } + public virtual void /*void*/ ISteamInput_RunFrame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_RunFrame(_ptr); + } + public virtual int /*int*/ ISteamInput_GetConnectedControllers( IntPtr /*InputHandle_t **/ handlesOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetConnectedControllers(_ptr, handlesOut); + } + public virtual InputActionSetHandle_t /*(InputActionSetHandle_t)*/ ISteamInput_GetActionSetHandle( string /*const char **/ pszActionSetName ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetActionSetHandle(_ptr, pszActionSetName); + } + public virtual void /*void*/ ISteamInput_ActivateActionSet( ulong inputHandle, ulong actionSetHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_ActivateActionSet(_ptr, inputHandle, actionSetHandle); + } + public virtual InputActionSetHandle_t /*(InputActionSetHandle_t)*/ ISteamInput_GetCurrentActionSet( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetCurrentActionSet(_ptr, inputHandle); + } + public virtual void /*void*/ ISteamInput_ActivateActionSetLayer( ulong inputHandle, ulong actionSetLayerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_ActivateActionSetLayer(_ptr, inputHandle, actionSetLayerHandle); + } + public virtual void /*void*/ ISteamInput_DeactivateActionSetLayer( ulong inputHandle, ulong actionSetLayerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_DeactivateActionSetLayer(_ptr, inputHandle, actionSetLayerHandle); + } + public virtual void /*void*/ ISteamInput_DeactivateAllActionSetLayers( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_DeactivateAllActionSetLayers(_ptr, inputHandle); + } + public virtual int /*int*/ ISteamInput_GetActiveActionSetLayers( ulong inputHandle, IntPtr /*InputActionSetHandle_t **/ handlesOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetActiveActionSetLayers(_ptr, inputHandle, handlesOut); + } + public virtual InputDigitalActionHandle_t /*(InputDigitalActionHandle_t)*/ ISteamInput_GetDigitalActionHandle( string /*const char **/ pszActionName ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetDigitalActionHandle(_ptr, pszActionName); + } + public virtual InputDigitalActionData_t /*struct InputDigitalActionData_t*/ ISteamInput_GetDigitalActionData( ulong inputHandle, ulong digitalActionHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetDigitalActionData(_ptr, inputHandle, digitalActionHandle); + } + public virtual int /*int*/ ISteamInput_GetDigitalActionOrigins( ulong inputHandle, ulong actionSetHandle, ulong digitalActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetDigitalActionOrigins(_ptr, inputHandle, actionSetHandle, digitalActionHandle, out originsOut); + } + public virtual InputAnalogActionHandle_t /*(InputAnalogActionHandle_t)*/ ISteamInput_GetAnalogActionHandle( string /*const char **/ pszActionName ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetAnalogActionHandle(_ptr, pszActionName); + } + public virtual InputAnalogActionData_t /*struct InputAnalogActionData_t*/ ISteamInput_GetAnalogActionData( ulong inputHandle, ulong analogActionHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetAnalogActionData(_ptr, inputHandle, analogActionHandle); + } + public virtual int /*int*/ ISteamInput_GetAnalogActionOrigins( ulong inputHandle, ulong actionSetHandle, ulong analogActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetAnalogActionOrigins(_ptr, inputHandle, actionSetHandle, analogActionHandle, out originsOut); + } + public virtual IntPtr ISteamInput_GetGlyphForActionOrigin( InputActionOrigin /*EInputActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetGlyphForActionOrigin(_ptr, eOrigin); + } + public virtual IntPtr ISteamInput_GetStringForActionOrigin( InputActionOrigin /*EInputActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetStringForActionOrigin(_ptr, eOrigin); + } + public virtual void /*void*/ ISteamInput_StopAnalogActionMomentum( ulong inputHandle, ulong eAction ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_StopAnalogActionMomentum(_ptr, inputHandle, eAction); + } + public virtual InputMotionData_t /*struct InputMotionData_t*/ ISteamInput_GetMotionData( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetMotionData(_ptr, inputHandle); + } + public virtual void /*void*/ ISteamInput_TriggerVibration( ulong inputHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_TriggerVibration(_ptr, inputHandle, usLeftSpeed, usRightSpeed); + } + public virtual void /*void*/ ISteamInput_SetLEDColor( ulong inputHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_SetLEDColor(_ptr, inputHandle, nColorR, nColorG, nColorB, nFlags); + } + public virtual void /*void*/ ISteamInput_TriggerHapticPulse( ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_TriggerHapticPulse(_ptr, inputHandle, eTargetPad, usDurationMicroSec); + } + public virtual void /*void*/ ISteamInput_TriggerRepeatedHapticPulse( ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_TriggerRepeatedHapticPulse(_ptr, inputHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags); + } + public virtual bool /*bool*/ ISteamInput_ShowBindingPanel( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_ShowBindingPanel(_ptr, inputHandle); + } + public virtual SteamInputType /*ESteamInputType*/ ISteamInput_GetInputTypeForHandle( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetInputTypeForHandle(_ptr, inputHandle); + } + public virtual InputHandle_t /*(InputHandle_t)*/ ISteamInput_GetControllerForGamepadIndex( int /*int*/ nIndex ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetControllerForGamepadIndex(_ptr, nIndex); + } + public virtual int /*int*/ ISteamInput_GetGamepadIndexForController( ulong ulinputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetGamepadIndexForController(_ptr, ulinputHandle); + } + public virtual IntPtr ISteamInput_GetStringForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetStringForXboxOrigin(_ptr, eOrigin); + } + public virtual IntPtr ISteamInput_GetGlyphForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetGlyphForXboxOrigin(_ptr, eOrigin); + } + public virtual InputActionOrigin /*EInputActionOrigin*/ ISteamInput_GetActionOriginFromXboxOrigin( ulong inputHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin(_ptr, inputHandle, eOrigin); + } + public virtual InputActionOrigin /*EInputActionOrigin*/ ISteamInput_TranslateActionOrigin( SteamInputType /*ESteamInputType*/ eDestinationInputType, InputActionOrigin /*EInputActionOrigin*/ eSourceOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_TranslateActionOrigin(_ptr, eDestinationInputType, eSourceOrigin); + } + public virtual bool /*bool*/ ISteamController_Init() { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2720,12 +3128,6 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetConnectedControllers(_ptr, handlesOut); } - public virtual bool /*bool*/ ISteamController_ShowBindingPanel( ulong controllerHandle ) - { - if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - - return Native.SteamAPI_ISteamController_ShowBindingPanel(_ptr, controllerHandle); - } public virtual ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ ISteamController_GetActionSetHandle( string /*const char **/ pszActionSetName ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2774,7 +3176,7 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetDigitalActionHandle(_ptr, pszActionName); } - public virtual ControllerDigitalActionData_t /*struct ControllerDigitalActionData_t*/ ISteamController_GetDigitalActionData( ulong controllerHandle, ulong digitalActionHandle ) + public virtual InputDigitalActionData_t /*struct InputDigitalActionData_t*/ ISteamController_GetDigitalActionData( ulong controllerHandle, ulong digitalActionHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2792,7 +3194,7 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetAnalogActionHandle(_ptr, pszActionName); } - public virtual ControllerAnalogActionData_t /*struct ControllerAnalogActionData_t*/ ISteamController_GetAnalogActionData( ulong controllerHandle, ulong analogActionHandle ) + public virtual InputAnalogActionData_t /*struct InputAnalogActionData_t*/ ISteamController_GetAnalogActionData( ulong controllerHandle, ulong analogActionHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2804,12 +3206,30 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetAnalogActionOrigins(_ptr, controllerHandle, actionSetHandle, analogActionHandle, out originsOut); } + public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetGlyphForActionOrigin(_ptr, eOrigin); + } + public virtual IntPtr ISteamController_GetStringForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetStringForActionOrigin(_ptr, eOrigin); + } public virtual void /*void*/ ISteamController_StopAnalogActionMomentum( ulong controllerHandle, ulong eAction ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); Native.SteamAPI_ISteamController_StopAnalogActionMomentum(_ptr, controllerHandle, eAction); } + public virtual InputMotionData_t /*struct InputMotionData_t*/ ISteamController_GetMotionData( ulong controllerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetMotionData(_ptr, controllerHandle); + } public virtual void /*void*/ ISteamController_TriggerHapticPulse( ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2834,11 +3254,17 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc Native.SteamAPI_ISteamController_SetLEDColor(_ptr, controllerHandle, nColorR, nColorG, nColorB, nFlags); } - public virtual int /*int*/ ISteamController_GetGamepadIndexForController( ulong ulControllerHandle ) + public virtual bool /*bool*/ ISteamController_ShowBindingPanel( ulong controllerHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetGamepadIndexForController(_ptr, ulControllerHandle); + return Native.SteamAPI_ISteamController_ShowBindingPanel(_ptr, controllerHandle); + } + public virtual SteamInputType /*ESteamInputType*/ ISteamController_GetInputTypeForHandle( ulong controllerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetInputTypeForHandle(_ptr, controllerHandle); } public virtual ControllerHandle_t /*(ControllerHandle_t)*/ ISteamController_GetControllerForGamepadIndex( int /*int*/ nIndex ) { @@ -2846,41 +3272,35 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetControllerForGamepadIndex(_ptr, nIndex); } - public virtual ControllerMotionData_t /*struct ControllerMotionData_t*/ ISteamController_GetMotionData( ulong controllerHandle ) + public virtual int /*int*/ ISteamController_GetGamepadIndexForController( ulong ulControllerHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetMotionData(_ptr, controllerHandle); + return Native.SteamAPI_ISteamController_GetGamepadIndexForController(_ptr, ulControllerHandle); } - public virtual bool /*bool*/ ISteamController_ShowDigitalActionOrigins( ulong controllerHandle, ulong digitalActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ) + public virtual IntPtr ISteamController_GetStringForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_ShowDigitalActionOrigins(_ptr, controllerHandle, digitalActionHandle, flScale, flXPosition, flYPosition); + return Native.SteamAPI_ISteamController_GetStringForXboxOrigin(_ptr, eOrigin); } - public virtual bool /*bool*/ ISteamController_ShowAnalogActionOrigins( ulong controllerHandle, ulong analogActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ) + public virtual IntPtr ISteamController_GetGlyphForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_ShowAnalogActionOrigins(_ptr, controllerHandle, analogActionHandle, flScale, flXPosition, flYPosition); + return Native.SteamAPI_ISteamController_GetGlyphForXboxOrigin(_ptr, eOrigin); } - public virtual IntPtr ISteamController_GetStringForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + public virtual ControllerActionOrigin /*EControllerActionOrigin*/ ISteamController_GetActionOriginFromXboxOrigin( ulong controllerHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetStringForActionOrigin(_ptr, eOrigin); + return Native.SteamAPI_ISteamController_GetActionOriginFromXboxOrigin(_ptr, controllerHandle, eOrigin); } - public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + public virtual ControllerActionOrigin /*EControllerActionOrigin*/ ISteamController_TranslateActionOrigin( SteamInputType /*ESteamInputType*/ eDestinationInputType, ControllerActionOrigin /*EControllerActionOrigin*/ eSourceOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetGlyphForActionOrigin(_ptr, eOrigin); - } - public virtual SteamInputType /*ESteamInputType*/ ISteamController_GetInputTypeForHandle( ulong controllerHandle ) - { - if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - - return Native.SteamAPI_ISteamController_GetInputTypeForHandle(_ptr, controllerHandle); + return Native.SteamAPI_ISteamController_TranslateActionOrigin(_ptr, eDestinationInputType, eSourceOrigin); } public virtual UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryUserUGCRequest( uint unAccountID, UserUGCList /*EUserUGCList*/ eListType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingUGCType, UserUGCListSortOrder /*EUserUGCListSortOrder*/ eSortOrder, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ) @@ -2895,6 +3315,12 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction return Native.SteamAPI_ISteamUGC_CreateQueryAllUGCRequest(_ptr, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage); } + public virtual UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryAllUGCRequest0( UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, string /*const char **/ pchCursor ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); + + return Native.SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0(_ptr, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor); + } public virtual UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryUGCDetailsRequest( IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ unNumPublishedFileIDs ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); @@ -3141,6 +3567,12 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction return Native.SteamAPI_ISteamUGC_SetItemPreview(_ptr, handle, pszPreviewFile); } + public virtual bool /*bool*/ ISteamUGC_SetAllowLegacyUpload( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowLegacyUpload ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); + + return Native.SteamAPI_ISteamUGC_SetAllowLegacyUpload(_ptr, handle, bAllowLegacyUpload); + } public virtual bool /*bool*/ ISteamUGC_RemoveItemKeyValueTags( ulong handle, string /*const char **/ pchKey ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); @@ -3473,11 +3905,11 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction Native.SteamAPI_ISteamHTMLSurface_MouseWheel(_ptr, unBrowserHandle, nDelta); } - public virtual void /*void*/ ISteamHTMLSurface_KeyDown( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ) + public virtual void /*void*/ ISteamHTMLSurface_KeyDown( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bIsSystemKey ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamHTMLSurface _ptr is null!" ); - Native.SteamAPI_ISteamHTMLSurface_KeyDown(_ptr, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers); + Native.SteamAPI_ISteamHTMLSurface_KeyDown(_ptr, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers, bIsSystemKey); } public virtual void /*void*/ ISteamHTMLSurface_KeyUp( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ) { @@ -3569,6 +4001,12 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction Native.SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor(_ptr, unBrowserHandle, flDPIScaling); } + public virtual void /*void*/ ISteamHTMLSurface_OpenDeveloperTools( uint unBrowserHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamHTMLSurface _ptr is null!" ); + + Native.SteamAPI_ISteamHTMLSurface_OpenDeveloperTools(_ptr, unBrowserHandle); + } public virtual void /*void*/ ISteamHTMLSurface_AllowStartRequest( uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowed ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamHTMLSurface _ptr is null!" ); @@ -3750,17 +4188,17 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction return Native.SteamAPI_ISteamInventory_GetNumItemsWithPrices(_ptr); } - public virtual bool /*bool*/ ISteamInventory_GetItemsWithPrices( IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pPrices, uint /*uint32*/ unArrayLength ) + public virtual bool /*bool*/ ISteamInventory_GetItemsWithPrices( IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pCurrentPrices, IntPtr /*uint64 **/ pBasePrices, uint /*uint32*/ unArrayLength ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInventory _ptr is null!" ); - return Native.SteamAPI_ISteamInventory_GetItemsWithPrices(_ptr, pArrayItemDefs, pPrices, unArrayLength); + return Native.SteamAPI_ISteamInventory_GetItemsWithPrices(_ptr, pArrayItemDefs, pCurrentPrices, pBasePrices, unArrayLength); } - public virtual bool /*bool*/ ISteamInventory_GetItemPrice( int iDefinition, out ulong /*uint64 **/ pPrice ) + public virtual bool /*bool*/ ISteamInventory_GetItemPrice( int iDefinition, out ulong /*uint64 **/ pCurrentPrice, out ulong /*uint64 **/ pBasePrice ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInventory _ptr is null!" ); - return Native.SteamAPI_ISteamInventory_GetItemPrice(_ptr, iDefinition, out pPrice); + return Native.SteamAPI_ISteamInventory_GetItemPrice(_ptr, iDefinition, out pCurrentPrice, out pBasePrice); } public virtual SteamInventoryUpdateHandle_t /*(SteamInventoryUpdateHandle_t)*/ ISteamInventory_StartUpdateProperties() { @@ -4282,6 +4720,7 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr /*class ISteamNetworking **/ SteamAPI_ISteamClient_GetISteamNetworking( IntPtr ISteamClient, int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr /*class ISteamRemoteStorage **/ SteamAPI_ISteamClient_GetISteamRemoteStorage( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr /*class ISteamScreenshots **/ SteamAPI_ISteamClient_GetISteamScreenshots( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr /*class ISteamGameSearch **/ SteamAPI_ISteamClient_GetISteamGameSearch( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "libsteam_api.dylib" )] internal static extern uint /*uint32*/ SteamAPI_ISteamClient_GetIPCCallCount( IntPtr ISteamClient ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamClient_SetWarningMessageHook( IntPtr ISteamClient, IntPtr /*SteamAPIWarningMessageHook_t*/ pFunction ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamClient_BShutdownIfAllPipesClosed( IntPtr ISteamClient ); @@ -4295,6 +4734,8 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr /*class ISteamInventory **/ SteamAPI_ISteamClient_GetISteamInventory( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr /*class ISteamVideo **/ SteamAPI_ISteamClient_GetISteamVideo( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr /*class ISteamParentalSettings **/ SteamAPI_ISteamClient_GetISteamParentalSettings( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr /*class ISteamInput **/ SteamAPI_ISteamClient_GetISteamInput( IntPtr ISteamClient, int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr /*class ISteamParties **/ SteamAPI_ISteamClient_GetISteamParties( IntPtr ISteamClient, int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); // // ISteamUser @@ -4328,6 +4769,7 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUser_BIsTwoFactorEnabled( IntPtr ISteamUser ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUser_BIsPhoneIdentifying( IntPtr ISteamUser ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUser_BIsPhoneRequiringVerification( IntPtr ISteamUser ); + [DllImport( "libsteam_api.dylib" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamUser_GetMarketEligibility( IntPtr ISteamUser ); // // ISteamFriends @@ -4362,7 +4804,7 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_SetInGameVoiceSpeaking( IntPtr ISteamFriends, ulong steamIDUser, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bSpeaking ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlay( IntPtr ISteamFriends, string /*const char **/ pchDialog ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToUser( IntPtr ISteamFriends, string /*const char **/ pchDialog, ulong steamID ); - [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage( IntPtr ISteamFriends, string /*const char **/ pchURL ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage( IntPtr ISteamFriends, string /*const char **/ pchURL, ActivateGameOverlayToWebPageMode /*EActivateGameOverlayToWebPageMode*/ eMode ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToStore( IntPtr ISteamFriends, uint nAppID, OverlayToStoreFlag /*EOverlayToStoreFlag*/ eFlag ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_SetPlayedWith( IntPtr ISteamFriends, ulong steamIDUserPlayedWith ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog( IntPtr ISteamFriends, ulong steamIDLobby ); @@ -4404,6 +4846,7 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamFriends_EnumerateFollowingList( IntPtr ISteamFriends, uint /*uint32*/ unStartIndex ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamFriends_IsClanPublic( IntPtr ISteamFriends, ulong steamIDClan ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamFriends_IsClanOfficialGameGroup( IntPtr ISteamFriends, ulong steamIDClan ); + [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages( IntPtr ISteamFriends ); // // ISteamUtils @@ -4501,6 +4944,40 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern HServerQuery /*(HServerQuery)*/ SteamAPI_ISteamMatchmakingServers_ServerRules( IntPtr ISteamMatchmakingServers, uint /*uint32*/ unIP, ushort /*uint16*/ usPort, IntPtr /*class ISteamMatchmakingRulesResponse **/ pRequestServersResponse ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamMatchmakingServers_CancelServerQuery( IntPtr ISteamMatchmakingServers, int hServerQuery ); + // + // ISteamGameSearch + // + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_AddGameSearchParams( IntPtr ISteamGameSearch, string /*const char **/ pchKeyToFind, string /*const char **/ pchValuesToFind ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SearchForGameWithLobby( IntPtr ISteamGameSearch, ulong steamIDLobby, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SearchForGameSolo( IntPtr ISteamGameSearch, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_AcceptGame( IntPtr ISteamGameSearch ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_DeclineGame( IntPtr ISteamGameSearch ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_RetrieveConnectionDetails( IntPtr ISteamGameSearch, ulong steamIDHost, IntPtr /*char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_EndGameSearch( IntPtr ISteamGameSearch ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SetGameHostParams( IntPtr ISteamGameSearch, string /*const char **/ pchKey, string /*const char **/ pchValue ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SetConnectionDetails( IntPtr ISteamGameSearch, string /*const char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_RequestPlayersForGame( IntPtr ISteamGameSearch, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax, int /*int*/ nMaxTeamSize ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_HostConfirmGameStart( IntPtr ISteamGameSearch, ulong /*uint64*/ ullUniqueGameID ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame( IntPtr ISteamGameSearch ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SubmitPlayerResult( IntPtr ISteamGameSearch, ulong /*uint64*/ ullUniqueGameID, ulong steamIDPlayer, PlayerResult_t /*EPlayerResult_t*/ EPlayerResult ); + [DllImport( "libsteam_api.dylib" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_EndGame( IntPtr ISteamGameSearch, ulong /*uint64*/ ullUniqueGameID ); + + // + // ISteamParties + // + [DllImport( "libsteam_api.dylib" )] internal static extern uint /*uint32*/ SteamAPI_ISteamParties_GetNumActiveBeacons( IntPtr ISteamParties ); + [DllImport( "libsteam_api.dylib" )] internal static extern PartyBeaconID_t /*(PartyBeaconID_t)*/ SteamAPI_ISteamParties_GetBeaconByIndex( IntPtr ISteamParties, uint /*uint32*/ unIndex ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetBeaconDetails( IntPtr ISteamParties, ulong ulBeaconID, out ulong pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t.PackSmall /*struct SteamPartyBeaconLocation_t **/ pLocation, System.Text.StringBuilder /*char **/ pchMetadata, int /*int*/ cchMetadata ); + [DllImport( "libsteam_api.dylib" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamParties_JoinParty( IntPtr ISteamParties, ulong ulBeaconID ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetNumAvailableBeaconLocations( IntPtr ISteamParties, IntPtr /*uint32 **/ puNumLocations ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetAvailableBeaconLocations( IntPtr ISteamParties, ref SteamPartyBeaconLocation_t.PackSmall /*struct SteamPartyBeaconLocation_t **/ pLocationList, uint /*uint32*/ uMaxNumLocations ); + [DllImport( "libsteam_api.dylib" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamParties_CreateBeacon( IntPtr ISteamParties, uint /*uint32*/ unOpenSlots, ref SteamPartyBeaconLocation_t.PackSmall /*struct SteamPartyBeaconLocation_t **/ pBeaconLocation, string /*const char **/ pchConnectString, string /*const char **/ pchMetadata ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamParties_OnReservationCompleted( IntPtr ISteamParties, ulong ulBeacon, ulong steamIDUser ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamParties_CancelReservation( IntPtr ISteamParties, ulong ulBeacon, ulong steamIDUser ); + [DllImport( "libsteam_api.dylib" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamParties_ChangeNumOpenSlots( IntPtr ISteamParties, ulong ulBeacon, uint /*uint32*/ unOpenSlots ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_DestroyBeacon( IntPtr ISteamParties, ulong ulBeacon ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetBeaconLocationData( IntPtr ISteamParties, SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t*/ BeaconLocation, SteamPartyBeaconLocationData /*ESteamPartyBeaconLocationData*/ eData, System.Text.StringBuilder /*char **/ pchDataStringOut, int /*int*/ cchDataStringOut ); + // // ISteamRemoteStorage // @@ -4636,6 +5113,8 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamApps_GetAppBuildId( IntPtr ISteamApps ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys( IntPtr ISteamApps ); [DllImport( "libsteam_api.dylib" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamApps_GetFileDetails( IntPtr ISteamApps, string /*const char **/ pszFileName ); + [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamApps_GetLaunchCommandLine( IntPtr ISteamApps, System.Text.StringBuilder /*char **/ pszCommandLine, int /*int*/ cubCommandLine ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( IntPtr ISteamApps ); // // ISteamNetworking @@ -4754,6 +5233,43 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS( IntPtr ISteamHTTP, uint hRequest, uint /*uint32*/ unMilliseconds ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut( IntPtr ISteamHTTP, uint hRequest, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbWasTimedOut ); + // + // ISteamInput + // + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamInput_Init( IntPtr ISteamInput ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamInput_Shutdown( IntPtr ISteamInput ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamInput_RunFrame( IntPtr ISteamInput ); + [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetConnectedControllers( IntPtr ISteamInput, IntPtr /*InputHandle_t **/ handlesOut ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputActionSetHandle_t /*(InputActionSetHandle_t)*/ SteamAPI_ISteamInput_GetActionSetHandle( IntPtr ISteamInput, string /*const char **/ pszActionSetName ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamInput_ActivateActionSet( IntPtr ISteamInput, ulong inputHandle, ulong actionSetHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputActionSetHandle_t /*(InputActionSetHandle_t)*/ SteamAPI_ISteamInput_GetCurrentActionSet( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamInput_ActivateActionSetLayer( IntPtr ISteamInput, ulong inputHandle, ulong actionSetLayerHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamInput_DeactivateActionSetLayer( IntPtr ISteamInput, ulong inputHandle, ulong actionSetLayerHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamInput_DeactivateAllActionSetLayers( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetActiveActionSetLayers( IntPtr ISteamInput, ulong inputHandle, IntPtr /*InputActionSetHandle_t **/ handlesOut ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputDigitalActionHandle_t /*(InputDigitalActionHandle_t)*/ SteamAPI_ISteamInput_GetDigitalActionHandle( IntPtr ISteamInput, string /*const char **/ pszActionName ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputDigitalActionData_t /*struct InputDigitalActionData_t*/ SteamAPI_ISteamInput_GetDigitalActionData( IntPtr ISteamInput, ulong inputHandle, ulong digitalActionHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetDigitalActionOrigins( IntPtr ISteamInput, ulong inputHandle, ulong actionSetHandle, ulong digitalActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputAnalogActionHandle_t /*(InputAnalogActionHandle_t)*/ SteamAPI_ISteamInput_GetAnalogActionHandle( IntPtr ISteamInput, string /*const char **/ pszActionName ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputAnalogActionData_t /*struct InputAnalogActionData_t*/ SteamAPI_ISteamInput_GetAnalogActionData( IntPtr ISteamInput, ulong inputHandle, ulong analogActionHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetAnalogActionOrigins( IntPtr ISteamInput, ulong inputHandle, ulong actionSetHandle, ulong analogActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr SteamAPI_ISteamInput_GetGlyphForActionOrigin( IntPtr ISteamInput, InputActionOrigin /*EInputActionOrigin*/ eOrigin ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr SteamAPI_ISteamInput_GetStringForActionOrigin( IntPtr ISteamInput, InputActionOrigin /*EInputActionOrigin*/ eOrigin ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamInput_StopAnalogActionMomentum( IntPtr ISteamInput, ulong inputHandle, ulong eAction ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputMotionData_t /*struct InputMotionData_t*/ SteamAPI_ISteamInput_GetMotionData( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamInput_TriggerVibration( IntPtr ISteamInput, ulong inputHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamInput_SetLEDColor( IntPtr ISteamInput, ulong inputHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamInput_TriggerHapticPulse( IntPtr ISteamInput, ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamInput_TriggerRepeatedHapticPulse( IntPtr ISteamInput, ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamInput_ShowBindingPanel( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern SteamInputType /*ESteamInputType*/ SteamAPI_ISteamInput_GetInputTypeForHandle( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputHandle_t /*(InputHandle_t)*/ SteamAPI_ISteamInput_GetControllerForGamepadIndex( IntPtr ISteamInput, int /*int*/ nIndex ); + [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetGamepadIndexForController( IntPtr ISteamInput, ulong ulinputHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr SteamAPI_ISteamInput_GetStringForXboxOrigin( IntPtr ISteamInput, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr SteamAPI_ISteamInput_GetGlyphForXboxOrigin( IntPtr ISteamInput, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputActionOrigin /*EInputActionOrigin*/ SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin( IntPtr ISteamInput, ulong inputHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputActionOrigin /*EInputActionOrigin*/ SteamAPI_ISteamInput_TranslateActionOrigin( IntPtr ISteamInput, SteamInputType /*ESteamInputType*/ eDestinationInputType, InputActionOrigin /*EInputActionOrigin*/ eSourceOrigin ); + // // ISteamController // @@ -4761,7 +5277,6 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_Shutdown( IntPtr ISteamController ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamController_RunFrame( IntPtr ISteamController ); [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetConnectedControllers( IntPtr ISteamController, IntPtr /*ControllerHandle_t **/ handlesOut ); - [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowBindingPanel( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "libsteam_api.dylib" )] internal static extern ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ SteamAPI_ISteamController_GetActionSetHandle( IntPtr ISteamController, string /*const char **/ pszActionSetName ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamController_ActivateActionSet( IntPtr ISteamController, ulong controllerHandle, ulong actionSetHandle ); [DllImport( "libsteam_api.dylib" )] internal static extern ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ SteamAPI_ISteamController_GetCurrentActionSet( IntPtr ISteamController, ulong controllerHandle ); @@ -4770,30 +5285,34 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamController_DeactivateAllActionSetLayers( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetActiveActionSetLayers( IntPtr ISteamController, ulong controllerHandle, IntPtr /*ControllerActionSetHandle_t **/ handlesOut ); [DllImport( "libsteam_api.dylib" )] internal static extern ControllerDigitalActionHandle_t /*(ControllerDigitalActionHandle_t)*/ SteamAPI_ISteamController_GetDigitalActionHandle( IntPtr ISteamController, string /*const char **/ pszActionName ); - [DllImport( "libsteam_api.dylib" )] internal static extern ControllerDigitalActionData_t /*struct ControllerDigitalActionData_t*/ SteamAPI_ISteamController_GetDigitalActionData( IntPtr ISteamController, ulong controllerHandle, ulong digitalActionHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputDigitalActionData_t /*struct InputDigitalActionData_t*/ SteamAPI_ISteamController_GetDigitalActionData( IntPtr ISteamController, ulong controllerHandle, ulong digitalActionHandle ); [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetDigitalActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong actionSetHandle, ulong digitalActionHandle, out ControllerActionOrigin /*EControllerActionOrigin **/ originsOut ); [DllImport( "libsteam_api.dylib" )] internal static extern ControllerAnalogActionHandle_t /*(ControllerAnalogActionHandle_t)*/ SteamAPI_ISteamController_GetAnalogActionHandle( IntPtr ISteamController, string /*const char **/ pszActionName ); - [DllImport( "libsteam_api.dylib" )] internal static extern ControllerAnalogActionData_t /*struct ControllerAnalogActionData_t*/ SteamAPI_ISteamController_GetAnalogActionData( IntPtr ISteamController, ulong controllerHandle, ulong analogActionHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputAnalogActionData_t /*struct InputAnalogActionData_t*/ SteamAPI_ISteamController_GetAnalogActionData( IntPtr ISteamController, ulong controllerHandle, ulong analogActionHandle ); [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetAnalogActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong actionSetHandle, ulong analogActionHandle, out ControllerActionOrigin /*EControllerActionOrigin **/ originsOut ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr SteamAPI_ISteamController_GetStringForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamController_StopAnalogActionMomentum( IntPtr ISteamController, ulong controllerHandle, ulong eAction ); + [DllImport( "libsteam_api.dylib" )] internal static extern InputMotionData_t /*struct InputMotionData_t*/ SteamAPI_ISteamController_GetMotionData( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamController_TriggerHapticPulse( IntPtr ISteamController, ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamController_TriggerRepeatedHapticPulse( IntPtr ISteamController, ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamController_TriggerVibration( IntPtr ISteamController, ulong controllerHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamController_SetLEDColor( IntPtr ISteamController, ulong controllerHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ); - [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetGamepadIndexForController( IntPtr ISteamController, ulong ulControllerHandle ); - [DllImport( "libsteam_api.dylib" )] internal static extern ControllerHandle_t /*(ControllerHandle_t)*/ SteamAPI_ISteamController_GetControllerForGamepadIndex( IntPtr ISteamController, int /*int*/ nIndex ); - [DllImport( "libsteam_api.dylib" )] internal static extern ControllerMotionData_t /*struct ControllerMotionData_t*/ SteamAPI_ISteamController_GetMotionData( IntPtr ISteamController, ulong controllerHandle ); - [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowDigitalActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong digitalActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ); - [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowAnalogActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong analogActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ); - [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr SteamAPI_ISteamController_GetStringForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); - [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowBindingPanel( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "libsteam_api.dylib" )] internal static extern SteamInputType /*ESteamInputType*/ SteamAPI_ISteamController_GetInputTypeForHandle( IntPtr ISteamController, ulong controllerHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern ControllerHandle_t /*(ControllerHandle_t)*/ SteamAPI_ISteamController_GetControllerForGamepadIndex( IntPtr ISteamController, int /*int*/ nIndex ); + [DllImport( "libsteam_api.dylib" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetGamepadIndexForController( IntPtr ISteamController, ulong ulControllerHandle ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr SteamAPI_ISteamController_GetStringForXboxOrigin( IntPtr ISteamController, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api.dylib" )] internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForXboxOrigin( IntPtr ISteamController, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api.dylib" )] internal static extern ControllerActionOrigin /*EControllerActionOrigin*/ SteamAPI_ISteamController_GetActionOriginFromXboxOrigin( IntPtr ISteamController, ulong controllerHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "libsteam_api.dylib" )] internal static extern ControllerActionOrigin /*EControllerActionOrigin*/ SteamAPI_ISteamController_TranslateActionOrigin( IntPtr ISteamController, SteamInputType /*ESteamInputType*/ eDestinationInputType, ControllerActionOrigin /*EControllerActionOrigin*/ eSourceOrigin ); // // ISteamUGC // [DllImport( "libsteam_api.dylib" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( IntPtr ISteamUGC, uint unAccountID, UserUGCList /*EUserUGCList*/ eListType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingUGCType, UserUGCListSortOrder /*EUserUGCListSortOrder*/ eSortOrder, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ); [DllImport( "libsteam_api.dylib" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryAllUGCRequest( IntPtr ISteamUGC, UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ); + [DllImport( "libsteam_api.dylib" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0( IntPtr ISteamUGC, UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, string /*const char **/ pchCursor ); [DllImport( "libsteam_api.dylib" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest( IntPtr ISteamUGC, IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ unNumPublishedFileIDs ); [DllImport( "libsteam_api.dylib" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamUGC_SendQueryUGCRequest( IntPtr ISteamUGC, ulong handle ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_GetQueryUGCResult( IntPtr ISteamUGC, ulong handle, uint /*uint32*/ index, ref SteamUGCDetails_t.PackSmall /*struct SteamUGCDetails_t **/ pDetails ); @@ -4834,6 +5353,7 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetItemTags( IntPtr ISteamUGC, ulong updateHandle, ref SteamParamStringArray_t.PackSmall /*const struct SteamParamStringArray_t **/ pTags ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetItemContent( IntPtr ISteamUGC, ulong handle, string /*const char **/ pszContentFolder ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetItemPreview( IntPtr ISteamUGC, ulong handle, string /*const char **/ pszPreviewFile ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetAllowLegacyUpload( IntPtr ISteamUGC, ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowLegacyUpload ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_RemoveItemKeyValueTags( IntPtr ISteamUGC, ulong handle, string /*const char **/ pchKey ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_AddItemKeyValueTag( IntPtr ISteamUGC, ulong handle, string /*const char **/ pchKey, string /*const char **/ pchValue ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_AddItemPreviewFile( IntPtr ISteamUGC, ulong handle, string /*const char **/ pszPreviewFile, ItemPreviewType /*EItemPreviewType*/ type ); @@ -4897,7 +5417,7 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_MouseDoubleClick( IntPtr ISteamHTMLSurface, uint unBrowserHandle, HTMLMouseButton /*ISteamHTMLSurface::EHTMLMouseButton*/ eMouseButton ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_MouseMove( IntPtr ISteamHTMLSurface, uint unBrowserHandle, int /*int*/ x, int /*int*/ y ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_MouseWheel( IntPtr ISteamHTMLSurface, uint unBrowserHandle, int /*int32*/ nDelta ); - [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyDown( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyDown( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bIsSystemKey ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyUp( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyChar( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ cUnicodeChar, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetHorizontalScroll( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nAbsolutePixelScroll ); @@ -4913,6 +5433,7 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetPageScaleFactor( IntPtr ISteamHTMLSurface, uint unBrowserHandle, float /*float*/ flZoom, int /*int*/ nPointX, int /*int*/ nPointY ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetBackgroundMode( IntPtr ISteamHTMLSurface, uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bBackgroundMode ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor( IntPtr ISteamHTMLSurface, uint unBrowserHandle, float /*float*/ flDPIScaling ); + [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_OpenDeveloperTools( IntPtr ISteamHTMLSurface, uint unBrowserHandle ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_AllowStartRequest( IntPtr ISteamHTMLSurface, uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowed ); [DllImport( "libsteam_api.dylib" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_JSDialogResponse( IntPtr ISteamHTMLSurface, uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bResult ); @@ -4947,8 +5468,8 @@ internal static unsafe class Native [DllImport( "libsteam_api.dylib" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamInventory_StartPurchase( IntPtr ISteamInventory, int[] pArrayItemDefs, uint[] /*const uint32 **/ punArrayQuantity, uint /*uint32*/ unArrayLength ); [DllImport( "libsteam_api.dylib" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamInventory_RequestPrices( IntPtr ISteamInventory ); [DllImport( "libsteam_api.dylib" )] internal static extern uint /*uint32*/ SteamAPI_ISteamInventory_GetNumItemsWithPrices( IntPtr ISteamInventory ); - [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemsWithPrices( IntPtr ISteamInventory, IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pPrices, uint /*uint32*/ unArrayLength ); - [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemPrice( IntPtr ISteamInventory, int iDefinition, out ulong /*uint64 **/ pPrice ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemsWithPrices( IntPtr ISteamInventory, IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pCurrentPrices, IntPtr /*uint64 **/ pBasePrices, uint /*uint32*/ unArrayLength ); + [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemPrice( IntPtr ISteamInventory, int iDefinition, out ulong /*uint64 **/ pCurrentPrice, out ulong /*uint64 **/ pBasePrice ); [DllImport( "libsteam_api.dylib" )] internal static extern SteamInventoryUpdateHandle_t /*(SteamInventoryUpdateHandle_t)*/ SteamAPI_ISteamInventory_StartUpdateProperties( IntPtr ISteamInventory ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_RemoveProperty( IntPtr ISteamInventory, ulong handle, ulong nItemID, string /*const char **/ pchPropertyName ); [DllImport( "libsteam_api.dylib" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_SetProperty( IntPtr ISteamInventory, ulong handle, ulong nItemID, string /*const char **/ pchPropertyName, string /*const char **/ pchPropertyValue ); diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win64.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win64.cs index 68adb3d..f35cbd5 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win64.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Platform.Win64.cs @@ -140,6 +140,12 @@ public virtual void Dispose() return Native.SteamAPI_ISteamClient_GetISteamScreenshots(_ptr, hSteamuser, hSteamPipe, pchVersion); } + public virtual IntPtr /*class ISteamGameSearch **/ ISteamClient_GetISteamGameSearch( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); + + return Native.SteamAPI_ISteamClient_GetISteamGameSearch(_ptr, hSteamuser, hSteamPipe, pchVersion); + } public virtual uint /*uint32*/ ISteamClient_GetIPCCallCount() { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); @@ -218,6 +224,18 @@ public virtual void Dispose() return Native.SteamAPI_ISteamClient_GetISteamParentalSettings(_ptr, hSteamuser, hSteamPipe, pchVersion); } + public virtual IntPtr /*class ISteamInput **/ ISteamClient_GetISteamInput( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); + + return Native.SteamAPI_ISteamClient_GetISteamInput(_ptr, hSteamUser, hSteamPipe, pchVersion); + } + public virtual IntPtr /*class ISteamParties **/ ISteamClient_GetISteamParties( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamClient _ptr is null!" ); + + return Native.SteamAPI_ISteamClient_GetISteamParties(_ptr, hSteamUser, hSteamPipe, pchVersion); + } public virtual HSteamUser /*(HSteamUser)*/ ISteamUser_GetHSteamUser() { @@ -393,6 +411,12 @@ public virtual void Dispose() return Native.SteamAPI_ISteamUser_BIsPhoneRequiringVerification(_ptr); } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUser_GetMarketEligibility() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUser _ptr is null!" ); + + return Native.SteamAPI_ISteamUser_GetMarketEligibility(_ptr); + } public virtual IntPtr ISteamFriends_GetPersonaName() { @@ -574,11 +598,11 @@ public virtual IntPtr ISteamFriends_GetClanTag( ulong steamIDClan ) Native.SteamAPI_ISteamFriends_ActivateGameOverlayToUser(_ptr, pchDialog, steamID); } - public virtual void /*void*/ ISteamFriends_ActivateGameOverlayToWebPage( string /*const char **/ pchURL ) + public virtual void /*void*/ ISteamFriends_ActivateGameOverlayToWebPage( string /*const char **/ pchURL, ActivateGameOverlayToWebPageMode /*EActivateGameOverlayToWebPageMode*/ eMode ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamFriends _ptr is null!" ); - Native.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(_ptr, pchURL); + Native.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(_ptr, pchURL, eMode); } public virtual void /*void*/ ISteamFriends_ActivateGameOverlayToStore( uint nAppID, OverlayToStoreFlag /*EOverlayToStoreFlag*/ eFlag ) { @@ -826,6 +850,12 @@ public virtual IntPtr ISteamFriends_GetFriendRichPresenceKeyByIndex( ulong steam return Native.SteamAPI_ISteamFriends_IsClanOfficialGameGroup(_ptr, steamIDClan); } + public virtual int /*int*/ ISteamFriends_GetNumChatsWithUnreadPriorityMessages() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamFriends _ptr is null!" ); + + return Native.SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages(_ptr); + } public virtual uint /*uint32*/ ISteamUtils_GetSecondsSinceAppActive() { @@ -1334,6 +1364,164 @@ public virtual IntPtr ISteamMatchmaking_GetLobbyMemberData( ulong steamIDLobby, Native.SteamAPI_ISteamMatchmakingServers_CancelServerQuery(_ptr, hServerQuery); } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_AddGameSearchParams( string /*const char **/ pchKeyToFind, string /*const char **/ pchValuesToFind ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_AddGameSearchParams(_ptr, pchKeyToFind, pchValuesToFind); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SearchForGameWithLobby( ulong steamIDLobby, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SearchForGameWithLobby(_ptr, steamIDLobby, nPlayerMin, nPlayerMax); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SearchForGameSolo( int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SearchForGameSolo(_ptr, nPlayerMin, nPlayerMax); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_AcceptGame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_AcceptGame(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_DeclineGame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_DeclineGame(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_RetrieveConnectionDetails( ulong steamIDHost, IntPtr /*char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_RetrieveConnectionDetails(_ptr, steamIDHost, pchConnectionDetails, cubConnectionDetails); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_EndGameSearch() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_EndGameSearch(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SetGameHostParams( string /*const char **/ pchKey, string /*const char **/ pchValue ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SetGameHostParams(_ptr, pchKey, pchValue); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SetConnectionDetails( string /*const char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SetConnectionDetails(_ptr, pchConnectionDetails, cubConnectionDetails); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_RequestPlayersForGame( int /*int*/ nPlayerMin, int /*int*/ nPlayerMax, int /*int*/ nMaxTeamSize ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_RequestPlayersForGame(_ptr, nPlayerMin, nPlayerMax, nMaxTeamSize); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_HostConfirmGameStart( ulong /*uint64*/ ullUniqueGameID ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_HostConfirmGameStart(_ptr, ullUniqueGameID); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_CancelRequestPlayersForGame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame(_ptr); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_SubmitPlayerResult( ulong /*uint64*/ ullUniqueGameID, ulong steamIDPlayer, PlayerResult_t /*EPlayerResult_t*/ EPlayerResult ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_SubmitPlayerResult(_ptr, ullUniqueGameID, steamIDPlayer, EPlayerResult); + } + public virtual GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ ISteamGameSearch_EndGame( ulong /*uint64*/ ullUniqueGameID ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamGameSearch _ptr is null!" ); + + return Native.SteamAPI_ISteamGameSearch_EndGame(_ptr, ullUniqueGameID); + } + + public virtual uint /*uint32*/ ISteamParties_GetNumActiveBeacons() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetNumActiveBeacons(_ptr); + } + public virtual PartyBeaconID_t /*(PartyBeaconID_t)*/ ISteamParties_GetBeaconByIndex( uint /*uint32*/ unIndex ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetBeaconByIndex(_ptr, unIndex); + } + public virtual bool /*bool*/ ISteamParties_GetBeaconDetails( ulong ulBeaconID, out ulong pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pLocation, System.Text.StringBuilder /*char **/ pchMetadata, int /*int*/ cchMetadata ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetBeaconDetails(_ptr, ulBeaconID, out pSteamIDBeaconOwner, ref pLocation, pchMetadata, cchMetadata); + } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_JoinParty( ulong ulBeaconID ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_JoinParty(_ptr, ulBeaconID); + } + public virtual bool /*bool*/ ISteamParties_GetNumAvailableBeaconLocations( IntPtr /*uint32 **/ puNumLocations ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetNumAvailableBeaconLocations(_ptr, puNumLocations); + } + public virtual bool /*bool*/ ISteamParties_GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pLocationList, uint /*uint32*/ uMaxNumLocations ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetAvailableBeaconLocations(_ptr, ref pLocationList, uMaxNumLocations); + } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_CreateBeacon( uint /*uint32*/ unOpenSlots, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pBeaconLocation, string /*const char **/ pchConnectString, string /*const char **/ pchMetadata ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_CreateBeacon(_ptr, unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata); + } + public virtual void /*void*/ ISteamParties_OnReservationCompleted( ulong ulBeacon, ulong steamIDUser ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + Native.SteamAPI_ISteamParties_OnReservationCompleted(_ptr, ulBeacon, steamIDUser); + } + public virtual void /*void*/ ISteamParties_CancelReservation( ulong ulBeacon, ulong steamIDUser ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + Native.SteamAPI_ISteamParties_CancelReservation(_ptr, ulBeacon, steamIDUser); + } + public virtual SteamAPICall_t /*(SteamAPICall_t)*/ ISteamParties_ChangeNumOpenSlots( ulong ulBeacon, uint /*uint32*/ unOpenSlots ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_ChangeNumOpenSlots(_ptr, ulBeacon, unOpenSlots); + } + public virtual bool /*bool*/ ISteamParties_DestroyBeacon( ulong ulBeacon ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_DestroyBeacon(_ptr, ulBeacon); + } + public virtual bool /*bool*/ ISteamParties_GetBeaconLocationData( SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t*/ BeaconLocation, SteamPartyBeaconLocationData /*ESteamPartyBeaconLocationData*/ eData, System.Text.StringBuilder /*char **/ pchDataStringOut, int /*int*/ cchDataStringOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamParties _ptr is null!" ); + + return Native.SteamAPI_ISteamParties_GetBeaconLocationData(_ptr, BeaconLocation, eData, pchDataStringOut, cchDataStringOut); + } + public virtual bool /*bool*/ ISteamRemoteStorage_FileWrite( string /*const char **/ pchFile, IntPtr /*const void **/ pvData, int /*int32*/ cubData ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamRemoteStorage _ptr is null!" ); @@ -2080,6 +2268,18 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamApps_GetFileDetails(_ptr, pszFileName); } + public virtual int /*int*/ ISteamApps_GetLaunchCommandLine( System.Text.StringBuilder /*char **/ pszCommandLine, int /*int*/ cubCommandLine ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamApps _ptr is null!" ); + + return Native.SteamAPI_ISteamApps_GetLaunchCommandLine(_ptr, pszCommandLine, cubCommandLine); + } + public virtual bool /*bool*/ ISteamApps_BIsSubscribedFromFamilySharing() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamApps _ptr is null!" ); + + return Native.SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing(_ptr); + } public virtual bool /*bool*/ ISteamNetworking_SendP2PPacket( ulong steamIDRemote, IntPtr /*const void **/ pubData, uint /*uint32*/ cubData, P2PSend /*EP2PSend*/ eP2PSendType, int /*int*/ nChannel ) { @@ -2668,6 +2868,205 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut(_ptr, hRequest, ref pbWasTimedOut); } + public virtual bool /*bool*/ ISteamInput_Init() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_Init(_ptr); + } + public virtual bool /*bool*/ ISteamInput_Shutdown() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_Shutdown(_ptr); + } + public virtual void /*void*/ ISteamInput_RunFrame() + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_RunFrame(_ptr); + } + public virtual int /*int*/ ISteamInput_GetConnectedControllers( IntPtr /*InputHandle_t **/ handlesOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetConnectedControllers(_ptr, handlesOut); + } + public virtual InputActionSetHandle_t /*(InputActionSetHandle_t)*/ ISteamInput_GetActionSetHandle( string /*const char **/ pszActionSetName ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetActionSetHandle(_ptr, pszActionSetName); + } + public virtual void /*void*/ ISteamInput_ActivateActionSet( ulong inputHandle, ulong actionSetHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_ActivateActionSet(_ptr, inputHandle, actionSetHandle); + } + public virtual InputActionSetHandle_t /*(InputActionSetHandle_t)*/ ISteamInput_GetCurrentActionSet( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetCurrentActionSet(_ptr, inputHandle); + } + public virtual void /*void*/ ISteamInput_ActivateActionSetLayer( ulong inputHandle, ulong actionSetLayerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_ActivateActionSetLayer(_ptr, inputHandle, actionSetLayerHandle); + } + public virtual void /*void*/ ISteamInput_DeactivateActionSetLayer( ulong inputHandle, ulong actionSetLayerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_DeactivateActionSetLayer(_ptr, inputHandle, actionSetLayerHandle); + } + public virtual void /*void*/ ISteamInput_DeactivateAllActionSetLayers( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_DeactivateAllActionSetLayers(_ptr, inputHandle); + } + public virtual int /*int*/ ISteamInput_GetActiveActionSetLayers( ulong inputHandle, IntPtr /*InputActionSetHandle_t **/ handlesOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetActiveActionSetLayers(_ptr, inputHandle, handlesOut); + } + public virtual InputDigitalActionHandle_t /*(InputDigitalActionHandle_t)*/ ISteamInput_GetDigitalActionHandle( string /*const char **/ pszActionName ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetDigitalActionHandle(_ptr, pszActionName); + } + public virtual InputDigitalActionData_t /*struct InputDigitalActionData_t*/ ISteamInput_GetDigitalActionData( ulong inputHandle, ulong digitalActionHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetDigitalActionData(_ptr, inputHandle, digitalActionHandle); + } + public virtual int /*int*/ ISteamInput_GetDigitalActionOrigins( ulong inputHandle, ulong actionSetHandle, ulong digitalActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetDigitalActionOrigins(_ptr, inputHandle, actionSetHandle, digitalActionHandle, out originsOut); + } + public virtual InputAnalogActionHandle_t /*(InputAnalogActionHandle_t)*/ ISteamInput_GetAnalogActionHandle( string /*const char **/ pszActionName ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetAnalogActionHandle(_ptr, pszActionName); + } + public virtual InputAnalogActionData_t /*struct InputAnalogActionData_t*/ ISteamInput_GetAnalogActionData( ulong inputHandle, ulong analogActionHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetAnalogActionData(_ptr, inputHandle, analogActionHandle); + } + public virtual int /*int*/ ISteamInput_GetAnalogActionOrigins( ulong inputHandle, ulong actionSetHandle, ulong analogActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetAnalogActionOrigins(_ptr, inputHandle, actionSetHandle, analogActionHandle, out originsOut); + } + public virtual IntPtr ISteamInput_GetGlyphForActionOrigin( InputActionOrigin /*EInputActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetGlyphForActionOrigin(_ptr, eOrigin); + } + public virtual IntPtr ISteamInput_GetStringForActionOrigin( InputActionOrigin /*EInputActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetStringForActionOrigin(_ptr, eOrigin); + } + public virtual void /*void*/ ISteamInput_StopAnalogActionMomentum( ulong inputHandle, ulong eAction ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_StopAnalogActionMomentum(_ptr, inputHandle, eAction); + } + public virtual InputMotionData_t /*struct InputMotionData_t*/ ISteamInput_GetMotionData( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetMotionData(_ptr, inputHandle); + } + public virtual void /*void*/ ISteamInput_TriggerVibration( ulong inputHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_TriggerVibration(_ptr, inputHandle, usLeftSpeed, usRightSpeed); + } + public virtual void /*void*/ ISteamInput_SetLEDColor( ulong inputHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_SetLEDColor(_ptr, inputHandle, nColorR, nColorG, nColorB, nFlags); + } + public virtual void /*void*/ ISteamInput_TriggerHapticPulse( ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_TriggerHapticPulse(_ptr, inputHandle, eTargetPad, usDurationMicroSec); + } + public virtual void /*void*/ ISteamInput_TriggerRepeatedHapticPulse( ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + Native.SteamAPI_ISteamInput_TriggerRepeatedHapticPulse(_ptr, inputHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags); + } + public virtual bool /*bool*/ ISteamInput_ShowBindingPanel( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_ShowBindingPanel(_ptr, inputHandle); + } + public virtual SteamInputType /*ESteamInputType*/ ISteamInput_GetInputTypeForHandle( ulong inputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetInputTypeForHandle(_ptr, inputHandle); + } + public virtual InputHandle_t /*(InputHandle_t)*/ ISteamInput_GetControllerForGamepadIndex( int /*int*/ nIndex ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetControllerForGamepadIndex(_ptr, nIndex); + } + public virtual int /*int*/ ISteamInput_GetGamepadIndexForController( ulong ulinputHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetGamepadIndexForController(_ptr, ulinputHandle); + } + public virtual IntPtr ISteamInput_GetStringForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetStringForXboxOrigin(_ptr, eOrigin); + } + public virtual IntPtr ISteamInput_GetGlyphForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetGlyphForXboxOrigin(_ptr, eOrigin); + } + public virtual InputActionOrigin /*EInputActionOrigin*/ ISteamInput_GetActionOriginFromXboxOrigin( ulong inputHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin(_ptr, inputHandle, eOrigin); + } + public virtual InputActionOrigin /*EInputActionOrigin*/ ISteamInput_TranslateActionOrigin( SteamInputType /*ESteamInputType*/ eDestinationInputType, InputActionOrigin /*EInputActionOrigin*/ eSourceOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInput _ptr is null!" ); + + return Native.SteamAPI_ISteamInput_TranslateActionOrigin(_ptr, eDestinationInputType, eSourceOrigin); + } + public virtual bool /*bool*/ ISteamController_Init() { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2692,12 +3091,6 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetConnectedControllers(_ptr, handlesOut); } - public virtual bool /*bool*/ ISteamController_ShowBindingPanel( ulong controllerHandle ) - { - if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - - return Native.SteamAPI_ISteamController_ShowBindingPanel(_ptr, controllerHandle); - } public virtual ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ ISteamController_GetActionSetHandle( string /*const char **/ pszActionSetName ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2746,7 +3139,7 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetDigitalActionHandle(_ptr, pszActionName); } - public virtual ControllerDigitalActionData_t /*struct ControllerDigitalActionData_t*/ ISteamController_GetDigitalActionData( ulong controllerHandle, ulong digitalActionHandle ) + public virtual InputDigitalActionData_t /*struct InputDigitalActionData_t*/ ISteamController_GetDigitalActionData( ulong controllerHandle, ulong digitalActionHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2764,7 +3157,7 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetAnalogActionHandle(_ptr, pszActionName); } - public virtual ControllerAnalogActionData_t /*struct ControllerAnalogActionData_t*/ ISteamController_GetAnalogActionData( ulong controllerHandle, ulong analogActionHandle ) + public virtual InputAnalogActionData_t /*struct InputAnalogActionData_t*/ ISteamController_GetAnalogActionData( ulong controllerHandle, ulong analogActionHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2776,12 +3169,30 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetAnalogActionOrigins(_ptr, controllerHandle, actionSetHandle, analogActionHandle, out originsOut); } + public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetGlyphForActionOrigin(_ptr, eOrigin); + } + public virtual IntPtr ISteamController_GetStringForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetStringForActionOrigin(_ptr, eOrigin); + } public virtual void /*void*/ ISteamController_StopAnalogActionMomentum( ulong controllerHandle, ulong eAction ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); Native.SteamAPI_ISteamController_StopAnalogActionMomentum(_ptr, controllerHandle, eAction); } + public virtual InputMotionData_t /*struct InputMotionData_t*/ ISteamController_GetMotionData( ulong controllerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetMotionData(_ptr, controllerHandle); + } public virtual void /*void*/ ISteamController_TriggerHapticPulse( ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); @@ -2806,11 +3217,17 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc Native.SteamAPI_ISteamController_SetLEDColor(_ptr, controllerHandle, nColorR, nColorG, nColorB, nFlags); } - public virtual int /*int*/ ISteamController_GetGamepadIndexForController( ulong ulControllerHandle ) + public virtual bool /*bool*/ ISteamController_ShowBindingPanel( ulong controllerHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetGamepadIndexForController(_ptr, ulControllerHandle); + return Native.SteamAPI_ISteamController_ShowBindingPanel(_ptr, controllerHandle); + } + public virtual SteamInputType /*ESteamInputType*/ ISteamController_GetInputTypeForHandle( ulong controllerHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); + + return Native.SteamAPI_ISteamController_GetInputTypeForHandle(_ptr, controllerHandle); } public virtual ControllerHandle_t /*(ControllerHandle_t)*/ ISteamController_GetControllerForGamepadIndex( int /*int*/ nIndex ) { @@ -2818,41 +3235,35 @@ public virtual IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pc return Native.SteamAPI_ISteamController_GetControllerForGamepadIndex(_ptr, nIndex); } - public virtual ControllerMotionData_t /*struct ControllerMotionData_t*/ ISteamController_GetMotionData( ulong controllerHandle ) + public virtual int /*int*/ ISteamController_GetGamepadIndexForController( ulong ulControllerHandle ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetMotionData(_ptr, controllerHandle); + return Native.SteamAPI_ISteamController_GetGamepadIndexForController(_ptr, ulControllerHandle); } - public virtual bool /*bool*/ ISteamController_ShowDigitalActionOrigins( ulong controllerHandle, ulong digitalActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ) + public virtual IntPtr ISteamController_GetStringForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_ShowDigitalActionOrigins(_ptr, controllerHandle, digitalActionHandle, flScale, flXPosition, flYPosition); + return Native.SteamAPI_ISteamController_GetStringForXboxOrigin(_ptr, eOrigin); } - public virtual bool /*bool*/ ISteamController_ShowAnalogActionOrigins( ulong controllerHandle, ulong analogActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ) + public virtual IntPtr ISteamController_GetGlyphForXboxOrigin( XboxOrigin /*EXboxOrigin*/ eOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_ShowAnalogActionOrigins(_ptr, controllerHandle, analogActionHandle, flScale, flXPosition, flYPosition); + return Native.SteamAPI_ISteamController_GetGlyphForXboxOrigin(_ptr, eOrigin); } - public virtual IntPtr ISteamController_GetStringForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + public virtual ControllerActionOrigin /*EControllerActionOrigin*/ ISteamController_GetActionOriginFromXboxOrigin( ulong controllerHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetStringForActionOrigin(_ptr, eOrigin); + return Native.SteamAPI_ISteamController_GetActionOriginFromXboxOrigin(_ptr, controllerHandle, eOrigin); } - public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ) + public virtual ControllerActionOrigin /*EControllerActionOrigin*/ ISteamController_TranslateActionOrigin( SteamInputType /*ESteamInputType*/ eDestinationInputType, ControllerActionOrigin /*EControllerActionOrigin*/ eSourceOrigin ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - return Native.SteamAPI_ISteamController_GetGlyphForActionOrigin(_ptr, eOrigin); - } - public virtual SteamInputType /*ESteamInputType*/ ISteamController_GetInputTypeForHandle( ulong controllerHandle ) - { - if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamController _ptr is null!" ); - - return Native.SteamAPI_ISteamController_GetInputTypeForHandle(_ptr, controllerHandle); + return Native.SteamAPI_ISteamController_TranslateActionOrigin(_ptr, eDestinationInputType, eSourceOrigin); } public virtual UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryUserUGCRequest( uint unAccountID, UserUGCList /*EUserUGCList*/ eListType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingUGCType, UserUGCListSortOrder /*EUserUGCListSortOrder*/ eSortOrder, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ) @@ -2867,6 +3278,12 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction return Native.SteamAPI_ISteamUGC_CreateQueryAllUGCRequest(_ptr, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage); } + public virtual UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryAllUGCRequest0( UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, string /*const char **/ pchCursor ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); + + return Native.SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0(_ptr, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor); + } public virtual UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryUGCDetailsRequest( IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ unNumPublishedFileIDs ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); @@ -3107,6 +3524,12 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction return Native.SteamAPI_ISteamUGC_SetItemPreview(_ptr, handle, pszPreviewFile); } + public virtual bool /*bool*/ ISteamUGC_SetAllowLegacyUpload( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowLegacyUpload ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); + + return Native.SteamAPI_ISteamUGC_SetAllowLegacyUpload(_ptr, handle, bAllowLegacyUpload); + } public virtual bool /*bool*/ ISteamUGC_RemoveItemKeyValueTags( ulong handle, string /*const char **/ pchKey ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamUGC _ptr is null!" ); @@ -3439,11 +3862,11 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction Native.SteamAPI_ISteamHTMLSurface_MouseWheel(_ptr, unBrowserHandle, nDelta); } - public virtual void /*void*/ ISteamHTMLSurface_KeyDown( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ) + public virtual void /*void*/ ISteamHTMLSurface_KeyDown( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bIsSystemKey ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamHTMLSurface _ptr is null!" ); - Native.SteamAPI_ISteamHTMLSurface_KeyDown(_ptr, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers); + Native.SteamAPI_ISteamHTMLSurface_KeyDown(_ptr, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers, bIsSystemKey); } public virtual void /*void*/ ISteamHTMLSurface_KeyUp( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ) { @@ -3535,6 +3958,12 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction Native.SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor(_ptr, unBrowserHandle, flDPIScaling); } + public virtual void /*void*/ ISteamHTMLSurface_OpenDeveloperTools( uint unBrowserHandle ) + { + if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamHTMLSurface _ptr is null!" ); + + Native.SteamAPI_ISteamHTMLSurface_OpenDeveloperTools(_ptr, unBrowserHandle); + } public virtual void /*void*/ ISteamHTMLSurface_AllowStartRequest( uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowed ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamHTMLSurface _ptr is null!" ); @@ -3716,17 +4145,17 @@ public virtual IntPtr ISteamController_GetGlyphForActionOrigin( ControllerAction return Native.SteamAPI_ISteamInventory_GetNumItemsWithPrices(_ptr); } - public virtual bool /*bool*/ ISteamInventory_GetItemsWithPrices( IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pPrices, uint /*uint32*/ unArrayLength ) + public virtual bool /*bool*/ ISteamInventory_GetItemsWithPrices( IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pCurrentPrices, IntPtr /*uint64 **/ pBasePrices, uint /*uint32*/ unArrayLength ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInventory _ptr is null!" ); - return Native.SteamAPI_ISteamInventory_GetItemsWithPrices(_ptr, pArrayItemDefs, pPrices, unArrayLength); + return Native.SteamAPI_ISteamInventory_GetItemsWithPrices(_ptr, pArrayItemDefs, pCurrentPrices, pBasePrices, unArrayLength); } - public virtual bool /*bool*/ ISteamInventory_GetItemPrice( int iDefinition, out ulong /*uint64 **/ pPrice ) + public virtual bool /*bool*/ ISteamInventory_GetItemPrice( int iDefinition, out ulong /*uint64 **/ pCurrentPrice, out ulong /*uint64 **/ pBasePrice ) { if ( _ptr == IntPtr.Zero ) throw new System.Exception( "ISteamInventory _ptr is null!" ); - return Native.SteamAPI_ISteamInventory_GetItemPrice(_ptr, iDefinition, out pPrice); + return Native.SteamAPI_ISteamInventory_GetItemPrice(_ptr, iDefinition, out pCurrentPrice, out pBasePrice); } public virtual SteamInventoryUpdateHandle_t /*(SteamInventoryUpdateHandle_t)*/ ISteamInventory_StartUpdateProperties() { @@ -4248,6 +4677,7 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern IntPtr /*class ISteamNetworking **/ SteamAPI_ISteamClient_GetISteamNetworking( IntPtr ISteamClient, int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "steam_api64.dll" )] internal static extern IntPtr /*class ISteamRemoteStorage **/ SteamAPI_ISteamClient_GetISteamRemoteStorage( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "steam_api64.dll" )] internal static extern IntPtr /*class ISteamScreenshots **/ SteamAPI_ISteamClient_GetISteamScreenshots( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr /*class ISteamGameSearch **/ SteamAPI_ISteamClient_GetISteamGameSearch( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "steam_api64.dll" )] internal static extern uint /*uint32*/ SteamAPI_ISteamClient_GetIPCCallCount( IntPtr ISteamClient ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamClient_SetWarningMessageHook( IntPtr ISteamClient, IntPtr /*SteamAPIWarningMessageHook_t*/ pFunction ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamClient_BShutdownIfAllPipesClosed( IntPtr ISteamClient ); @@ -4261,6 +4691,8 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern IntPtr /*class ISteamInventory **/ SteamAPI_ISteamClient_GetISteamInventory( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "steam_api64.dll" )] internal static extern IntPtr /*class ISteamVideo **/ SteamAPI_ISteamClient_GetISteamVideo( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); [DllImport( "steam_api64.dll" )] internal static extern IntPtr /*class ISteamParentalSettings **/ SteamAPI_ISteamClient_GetISteamParentalSettings( IntPtr ISteamClient, int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr /*class ISteamInput **/ SteamAPI_ISteamClient_GetISteamInput( IntPtr ISteamClient, int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr /*class ISteamParties **/ SteamAPI_ISteamClient_GetISteamParties( IntPtr ISteamClient, int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion ); // // ISteamUser @@ -4294,6 +4726,7 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUser_BIsTwoFactorEnabled( IntPtr ISteamUser ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUser_BIsPhoneIdentifying( IntPtr ISteamUser ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUser_BIsPhoneRequiringVerification( IntPtr ISteamUser ); + [DllImport( "steam_api64.dll" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamUser_GetMarketEligibility( IntPtr ISteamUser ); // // ISteamFriends @@ -4328,7 +4761,7 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_SetInGameVoiceSpeaking( IntPtr ISteamFriends, ulong steamIDUser, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bSpeaking ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlay( IntPtr ISteamFriends, string /*const char **/ pchDialog ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToUser( IntPtr ISteamFriends, string /*const char **/ pchDialog, ulong steamID ); - [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage( IntPtr ISteamFriends, string /*const char **/ pchURL ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage( IntPtr ISteamFriends, string /*const char **/ pchURL, ActivateGameOverlayToWebPageMode /*EActivateGameOverlayToWebPageMode*/ eMode ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayToStore( IntPtr ISteamFriends, uint nAppID, OverlayToStoreFlag /*EOverlayToStoreFlag*/ eFlag ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_SetPlayedWith( IntPtr ISteamFriends, ulong steamIDUserPlayedWith ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog( IntPtr ISteamFriends, ulong steamIDLobby ); @@ -4370,6 +4803,7 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamFriends_EnumerateFollowingList( IntPtr ISteamFriends, uint /*uint32*/ unStartIndex ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamFriends_IsClanPublic( IntPtr ISteamFriends, ulong steamIDClan ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamFriends_IsClanOfficialGameGroup( IntPtr ISteamFriends, ulong steamIDClan ); + [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages( IntPtr ISteamFriends ); // // ISteamUtils @@ -4467,6 +4901,40 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern HServerQuery /*(HServerQuery)*/ SteamAPI_ISteamMatchmakingServers_ServerRules( IntPtr ISteamMatchmakingServers, uint /*uint32*/ unIP, ushort /*uint16*/ usPort, IntPtr /*class ISteamMatchmakingRulesResponse **/ pRequestServersResponse ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamMatchmakingServers_CancelServerQuery( IntPtr ISteamMatchmakingServers, int hServerQuery ); + // + // ISteamGameSearch + // + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_AddGameSearchParams( IntPtr ISteamGameSearch, string /*const char **/ pchKeyToFind, string /*const char **/ pchValuesToFind ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SearchForGameWithLobby( IntPtr ISteamGameSearch, ulong steamIDLobby, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SearchForGameSolo( IntPtr ISteamGameSearch, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_AcceptGame( IntPtr ISteamGameSearch ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_DeclineGame( IntPtr ISteamGameSearch ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_RetrieveConnectionDetails( IntPtr ISteamGameSearch, ulong steamIDHost, IntPtr /*char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_EndGameSearch( IntPtr ISteamGameSearch ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SetGameHostParams( IntPtr ISteamGameSearch, string /*const char **/ pchKey, string /*const char **/ pchValue ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SetConnectionDetails( IntPtr ISteamGameSearch, string /*const char **/ pchConnectionDetails, int /*int*/ cubConnectionDetails ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_RequestPlayersForGame( IntPtr ISteamGameSearch, int /*int*/ nPlayerMin, int /*int*/ nPlayerMax, int /*int*/ nMaxTeamSize ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_HostConfirmGameStart( IntPtr ISteamGameSearch, ulong /*uint64*/ ullUniqueGameID ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame( IntPtr ISteamGameSearch ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_SubmitPlayerResult( IntPtr ISteamGameSearch, ulong /*uint64*/ ullUniqueGameID, ulong steamIDPlayer, PlayerResult_t /*EPlayerResult_t*/ EPlayerResult ); + [DllImport( "steam_api64.dll" )] internal static extern GameSearchErrorCode_t /*EGameSearchErrorCode_t*/ SteamAPI_ISteamGameSearch_EndGame( IntPtr ISteamGameSearch, ulong /*uint64*/ ullUniqueGameID ); + + // + // ISteamParties + // + [DllImport( "steam_api64.dll" )] internal static extern uint /*uint32*/ SteamAPI_ISteamParties_GetNumActiveBeacons( IntPtr ISteamParties ); + [DllImport( "steam_api64.dll" )] internal static extern PartyBeaconID_t /*(PartyBeaconID_t)*/ SteamAPI_ISteamParties_GetBeaconByIndex( IntPtr ISteamParties, uint /*uint32*/ unIndex ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetBeaconDetails( IntPtr ISteamParties, ulong ulBeaconID, out ulong pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pLocation, System.Text.StringBuilder /*char **/ pchMetadata, int /*int*/ cchMetadata ); + [DllImport( "steam_api64.dll" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamParties_JoinParty( IntPtr ISteamParties, ulong ulBeaconID ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetNumAvailableBeaconLocations( IntPtr ISteamParties, IntPtr /*uint32 **/ puNumLocations ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetAvailableBeaconLocations( IntPtr ISteamParties, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pLocationList, uint /*uint32*/ uMaxNumLocations ); + [DllImport( "steam_api64.dll" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamParties_CreateBeacon( IntPtr ISteamParties, uint /*uint32*/ unOpenSlots, ref SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t **/ pBeaconLocation, string /*const char **/ pchConnectString, string /*const char **/ pchMetadata ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamParties_OnReservationCompleted( IntPtr ISteamParties, ulong ulBeacon, ulong steamIDUser ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamParties_CancelReservation( IntPtr ISteamParties, ulong ulBeacon, ulong steamIDUser ); + [DllImport( "steam_api64.dll" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamParties_ChangeNumOpenSlots( IntPtr ISteamParties, ulong ulBeacon, uint /*uint32*/ unOpenSlots ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_DestroyBeacon( IntPtr ISteamParties, ulong ulBeacon ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamParties_GetBeaconLocationData( IntPtr ISteamParties, SteamPartyBeaconLocation_t /*struct SteamPartyBeaconLocation_t*/ BeaconLocation, SteamPartyBeaconLocationData /*ESteamPartyBeaconLocationData*/ eData, System.Text.StringBuilder /*char **/ pchDataStringOut, int /*int*/ cchDataStringOut ); + // // ISteamRemoteStorage // @@ -4602,6 +5070,8 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamApps_GetAppBuildId( IntPtr ISteamApps ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys( IntPtr ISteamApps ); [DllImport( "steam_api64.dll" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamApps_GetFileDetails( IntPtr ISteamApps, string /*const char **/ pszFileName ); + [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamApps_GetLaunchCommandLine( IntPtr ISteamApps, System.Text.StringBuilder /*char **/ pszCommandLine, int /*int*/ cubCommandLine ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( IntPtr ISteamApps ); // // ISteamNetworking @@ -4720,6 +5190,43 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS( IntPtr ISteamHTTP, uint hRequest, uint /*uint32*/ unMilliseconds ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut( IntPtr ISteamHTTP, uint hRequest, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbWasTimedOut ); + // + // ISteamInput + // + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamInput_Init( IntPtr ISteamInput ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamInput_Shutdown( IntPtr ISteamInput ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamInput_RunFrame( IntPtr ISteamInput ); + [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetConnectedControllers( IntPtr ISteamInput, IntPtr /*InputHandle_t **/ handlesOut ); + [DllImport( "steam_api64.dll" )] internal static extern InputActionSetHandle_t /*(InputActionSetHandle_t)*/ SteamAPI_ISteamInput_GetActionSetHandle( IntPtr ISteamInput, string /*const char **/ pszActionSetName ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamInput_ActivateActionSet( IntPtr ISteamInput, ulong inputHandle, ulong actionSetHandle ); + [DllImport( "steam_api64.dll" )] internal static extern InputActionSetHandle_t /*(InputActionSetHandle_t)*/ SteamAPI_ISteamInput_GetCurrentActionSet( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamInput_ActivateActionSetLayer( IntPtr ISteamInput, ulong inputHandle, ulong actionSetLayerHandle ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamInput_DeactivateActionSetLayer( IntPtr ISteamInput, ulong inputHandle, ulong actionSetLayerHandle ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamInput_DeactivateAllActionSetLayers( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetActiveActionSetLayers( IntPtr ISteamInput, ulong inputHandle, IntPtr /*InputActionSetHandle_t **/ handlesOut ); + [DllImport( "steam_api64.dll" )] internal static extern InputDigitalActionHandle_t /*(InputDigitalActionHandle_t)*/ SteamAPI_ISteamInput_GetDigitalActionHandle( IntPtr ISteamInput, string /*const char **/ pszActionName ); + [DllImport( "steam_api64.dll" )] internal static extern InputDigitalActionData_t /*struct InputDigitalActionData_t*/ SteamAPI_ISteamInput_GetDigitalActionData( IntPtr ISteamInput, ulong inputHandle, ulong digitalActionHandle ); + [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetDigitalActionOrigins( IntPtr ISteamInput, ulong inputHandle, ulong actionSetHandle, ulong digitalActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ); + [DllImport( "steam_api64.dll" )] internal static extern InputAnalogActionHandle_t /*(InputAnalogActionHandle_t)*/ SteamAPI_ISteamInput_GetAnalogActionHandle( IntPtr ISteamInput, string /*const char **/ pszActionName ); + [DllImport( "steam_api64.dll" )] internal static extern InputAnalogActionData_t /*struct InputAnalogActionData_t*/ SteamAPI_ISteamInput_GetAnalogActionData( IntPtr ISteamInput, ulong inputHandle, ulong analogActionHandle ); + [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetAnalogActionOrigins( IntPtr ISteamInput, ulong inputHandle, ulong actionSetHandle, ulong analogActionHandle, out InputActionOrigin /*EInputActionOrigin **/ originsOut ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr SteamAPI_ISteamInput_GetGlyphForActionOrigin( IntPtr ISteamInput, InputActionOrigin /*EInputActionOrigin*/ eOrigin ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr SteamAPI_ISteamInput_GetStringForActionOrigin( IntPtr ISteamInput, InputActionOrigin /*EInputActionOrigin*/ eOrigin ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamInput_StopAnalogActionMomentum( IntPtr ISteamInput, ulong inputHandle, ulong eAction ); + [DllImport( "steam_api64.dll" )] internal static extern InputMotionData_t /*struct InputMotionData_t*/ SteamAPI_ISteamInput_GetMotionData( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamInput_TriggerVibration( IntPtr ISteamInput, ulong inputHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamInput_SetLEDColor( IntPtr ISteamInput, ulong inputHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamInput_TriggerHapticPulse( IntPtr ISteamInput, ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamInput_TriggerRepeatedHapticPulse( IntPtr ISteamInput, ulong inputHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamInput_ShowBindingPanel( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "steam_api64.dll" )] internal static extern SteamInputType /*ESteamInputType*/ SteamAPI_ISteamInput_GetInputTypeForHandle( IntPtr ISteamInput, ulong inputHandle ); + [DllImport( "steam_api64.dll" )] internal static extern InputHandle_t /*(InputHandle_t)*/ SteamAPI_ISteamInput_GetControllerForGamepadIndex( IntPtr ISteamInput, int /*int*/ nIndex ); + [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamInput_GetGamepadIndexForController( IntPtr ISteamInput, ulong ulinputHandle ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr SteamAPI_ISteamInput_GetStringForXboxOrigin( IntPtr ISteamInput, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr SteamAPI_ISteamInput_GetGlyphForXboxOrigin( IntPtr ISteamInput, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "steam_api64.dll" )] internal static extern InputActionOrigin /*EInputActionOrigin*/ SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin( IntPtr ISteamInput, ulong inputHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "steam_api64.dll" )] internal static extern InputActionOrigin /*EInputActionOrigin*/ SteamAPI_ISteamInput_TranslateActionOrigin( IntPtr ISteamInput, SteamInputType /*ESteamInputType*/ eDestinationInputType, InputActionOrigin /*EInputActionOrigin*/ eSourceOrigin ); + // // ISteamController // @@ -4727,7 +5234,6 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_Shutdown( IntPtr ISteamController ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamController_RunFrame( IntPtr ISteamController ); [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetConnectedControllers( IntPtr ISteamController, IntPtr /*ControllerHandle_t **/ handlesOut ); - [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowBindingPanel( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "steam_api64.dll" )] internal static extern ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ SteamAPI_ISteamController_GetActionSetHandle( IntPtr ISteamController, string /*const char **/ pszActionSetName ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamController_ActivateActionSet( IntPtr ISteamController, ulong controllerHandle, ulong actionSetHandle ); [DllImport( "steam_api64.dll" )] internal static extern ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ SteamAPI_ISteamController_GetCurrentActionSet( IntPtr ISteamController, ulong controllerHandle ); @@ -4736,30 +5242,34 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamController_DeactivateAllActionSetLayers( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetActiveActionSetLayers( IntPtr ISteamController, ulong controllerHandle, IntPtr /*ControllerActionSetHandle_t **/ handlesOut ); [DllImport( "steam_api64.dll" )] internal static extern ControllerDigitalActionHandle_t /*(ControllerDigitalActionHandle_t)*/ SteamAPI_ISteamController_GetDigitalActionHandle( IntPtr ISteamController, string /*const char **/ pszActionName ); - [DllImport( "steam_api64.dll" )] internal static extern ControllerDigitalActionData_t /*struct ControllerDigitalActionData_t*/ SteamAPI_ISteamController_GetDigitalActionData( IntPtr ISteamController, ulong controllerHandle, ulong digitalActionHandle ); + [DllImport( "steam_api64.dll" )] internal static extern InputDigitalActionData_t /*struct InputDigitalActionData_t*/ SteamAPI_ISteamController_GetDigitalActionData( IntPtr ISteamController, ulong controllerHandle, ulong digitalActionHandle ); [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetDigitalActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong actionSetHandle, ulong digitalActionHandle, out ControllerActionOrigin /*EControllerActionOrigin **/ originsOut ); [DllImport( "steam_api64.dll" )] internal static extern ControllerAnalogActionHandle_t /*(ControllerAnalogActionHandle_t)*/ SteamAPI_ISteamController_GetAnalogActionHandle( IntPtr ISteamController, string /*const char **/ pszActionName ); - [DllImport( "steam_api64.dll" )] internal static extern ControllerAnalogActionData_t /*struct ControllerAnalogActionData_t*/ SteamAPI_ISteamController_GetAnalogActionData( IntPtr ISteamController, ulong controllerHandle, ulong analogActionHandle ); + [DllImport( "steam_api64.dll" )] internal static extern InputAnalogActionData_t /*struct InputAnalogActionData_t*/ SteamAPI_ISteamController_GetAnalogActionData( IntPtr ISteamController, ulong controllerHandle, ulong analogActionHandle ); [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetAnalogActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong actionSetHandle, ulong analogActionHandle, out ControllerActionOrigin /*EControllerActionOrigin **/ originsOut ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr SteamAPI_ISteamController_GetStringForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamController_StopAnalogActionMomentum( IntPtr ISteamController, ulong controllerHandle, ulong eAction ); + [DllImport( "steam_api64.dll" )] internal static extern InputMotionData_t /*struct InputMotionData_t*/ SteamAPI_ISteamController_GetMotionData( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamController_TriggerHapticPulse( IntPtr ISteamController, ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamController_TriggerRepeatedHapticPulse( IntPtr ISteamController, ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamController_TriggerVibration( IntPtr ISteamController, ulong controllerHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamController_SetLEDColor( IntPtr ISteamController, ulong controllerHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags ); - [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetGamepadIndexForController( IntPtr ISteamController, ulong ulControllerHandle ); - [DllImport( "steam_api64.dll" )] internal static extern ControllerHandle_t /*(ControllerHandle_t)*/ SteamAPI_ISteamController_GetControllerForGamepadIndex( IntPtr ISteamController, int /*int*/ nIndex ); - [DllImport( "steam_api64.dll" )] internal static extern ControllerMotionData_t /*struct ControllerMotionData_t*/ SteamAPI_ISteamController_GetMotionData( IntPtr ISteamController, ulong controllerHandle ); - [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowDigitalActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong digitalActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ); - [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowAnalogActionOrigins( IntPtr ISteamController, ulong controllerHandle, ulong analogActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition ); - [DllImport( "steam_api64.dll" )] internal static extern IntPtr SteamAPI_ISteamController_GetStringForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); - [DllImport( "steam_api64.dll" )] internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForActionOrigin( IntPtr ISteamController, ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamController_ShowBindingPanel( IntPtr ISteamController, ulong controllerHandle ); [DllImport( "steam_api64.dll" )] internal static extern SteamInputType /*ESteamInputType*/ SteamAPI_ISteamController_GetInputTypeForHandle( IntPtr ISteamController, ulong controllerHandle ); + [DllImport( "steam_api64.dll" )] internal static extern ControllerHandle_t /*(ControllerHandle_t)*/ SteamAPI_ISteamController_GetControllerForGamepadIndex( IntPtr ISteamController, int /*int*/ nIndex ); + [DllImport( "steam_api64.dll" )] internal static extern int /*int*/ SteamAPI_ISteamController_GetGamepadIndexForController( IntPtr ISteamController, ulong ulControllerHandle ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr SteamAPI_ISteamController_GetStringForXboxOrigin( IntPtr ISteamController, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "steam_api64.dll" )] internal static extern IntPtr SteamAPI_ISteamController_GetGlyphForXboxOrigin( IntPtr ISteamController, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "steam_api64.dll" )] internal static extern ControllerActionOrigin /*EControllerActionOrigin*/ SteamAPI_ISteamController_GetActionOriginFromXboxOrigin( IntPtr ISteamController, ulong controllerHandle, XboxOrigin /*EXboxOrigin*/ eOrigin ); + [DllImport( "steam_api64.dll" )] internal static extern ControllerActionOrigin /*EControllerActionOrigin*/ SteamAPI_ISteamController_TranslateActionOrigin( IntPtr ISteamController, SteamInputType /*ESteamInputType*/ eDestinationInputType, ControllerActionOrigin /*EControllerActionOrigin*/ eSourceOrigin ); // // ISteamUGC // [DllImport( "steam_api64.dll" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( IntPtr ISteamUGC, uint unAccountID, UserUGCList /*EUserUGCList*/ eListType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingUGCType, UserUGCListSortOrder /*EUserUGCListSortOrder*/ eSortOrder, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ); [DllImport( "steam_api64.dll" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryAllUGCRequest( IntPtr ISteamUGC, UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage ); + [DllImport( "steam_api64.dll" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0( IntPtr ISteamUGC, UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, string /*const char **/ pchCursor ); [DllImport( "steam_api64.dll" )] internal static extern UGCQueryHandle_t /*(UGCQueryHandle_t)*/ SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest( IntPtr ISteamUGC, IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ unNumPublishedFileIDs ); [DllImport( "steam_api64.dll" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamUGC_SendQueryUGCRequest( IntPtr ISteamUGC, ulong handle ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_GetQueryUGCResult( IntPtr ISteamUGC, ulong handle, uint /*uint32*/ index, ref SteamUGCDetails_t /*struct SteamUGCDetails_t **/ pDetails ); @@ -4800,6 +5310,7 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetItemTags( IntPtr ISteamUGC, ulong updateHandle, ref SteamParamStringArray_t /*const struct SteamParamStringArray_t **/ pTags ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetItemContent( IntPtr ISteamUGC, ulong handle, string /*const char **/ pszContentFolder ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetItemPreview( IntPtr ISteamUGC, ulong handle, string /*const char **/ pszPreviewFile ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_SetAllowLegacyUpload( IntPtr ISteamUGC, ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowLegacyUpload ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_RemoveItemKeyValueTags( IntPtr ISteamUGC, ulong handle, string /*const char **/ pchKey ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_AddItemKeyValueTag( IntPtr ISteamUGC, ulong handle, string /*const char **/ pchKey, string /*const char **/ pchValue ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamUGC_AddItemPreviewFile( IntPtr ISteamUGC, ulong handle, string /*const char **/ pszPreviewFile, ItemPreviewType /*EItemPreviewType*/ type ); @@ -4863,7 +5374,7 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_MouseDoubleClick( IntPtr ISteamHTMLSurface, uint unBrowserHandle, HTMLMouseButton /*ISteamHTMLSurface::EHTMLMouseButton*/ eMouseButton ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_MouseMove( IntPtr ISteamHTMLSurface, uint unBrowserHandle, int /*int*/ x, int /*int*/ y ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_MouseWheel( IntPtr ISteamHTMLSurface, uint unBrowserHandle, int /*int32*/ nDelta ); - [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyDown( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyDown( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bIsSystemKey ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyUp( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_KeyChar( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ cUnicodeChar, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetHorizontalScroll( IntPtr ISteamHTMLSurface, uint unBrowserHandle, uint /*uint32*/ nAbsolutePixelScroll ); @@ -4879,6 +5390,7 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetPageScaleFactor( IntPtr ISteamHTMLSurface, uint unBrowserHandle, float /*float*/ flZoom, int /*int*/ nPointX, int /*int*/ nPointY ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetBackgroundMode( IntPtr ISteamHTMLSurface, uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bBackgroundMode ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor( IntPtr ISteamHTMLSurface, uint unBrowserHandle, float /*float*/ flDPIScaling ); + [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_OpenDeveloperTools( IntPtr ISteamHTMLSurface, uint unBrowserHandle ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_AllowStartRequest( IntPtr ISteamHTMLSurface, uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowed ); [DllImport( "steam_api64.dll" )] internal static extern void /*void*/ SteamAPI_ISteamHTMLSurface_JSDialogResponse( IntPtr ISteamHTMLSurface, uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bResult ); @@ -4913,8 +5425,8 @@ internal static unsafe class Native [DllImport( "steam_api64.dll" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamInventory_StartPurchase( IntPtr ISteamInventory, int[] pArrayItemDefs, uint[] /*const uint32 **/ punArrayQuantity, uint /*uint32*/ unArrayLength ); [DllImport( "steam_api64.dll" )] internal static extern SteamAPICall_t /*(SteamAPICall_t)*/ SteamAPI_ISteamInventory_RequestPrices( IntPtr ISteamInventory ); [DllImport( "steam_api64.dll" )] internal static extern uint /*uint32*/ SteamAPI_ISteamInventory_GetNumItemsWithPrices( IntPtr ISteamInventory ); - [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemsWithPrices( IntPtr ISteamInventory, IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pPrices, uint /*uint32*/ unArrayLength ); - [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemPrice( IntPtr ISteamInventory, int iDefinition, out ulong /*uint64 **/ pPrice ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemsWithPrices( IntPtr ISteamInventory, IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pCurrentPrices, IntPtr /*uint64 **/ pBasePrices, uint /*uint32*/ unArrayLength ); + [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_GetItemPrice( IntPtr ISteamInventory, int iDefinition, out ulong /*uint64 **/ pCurrentPrice, out ulong /*uint64 **/ pBasePrice ); [DllImport( "steam_api64.dll" )] internal static extern SteamInventoryUpdateHandle_t /*(SteamInventoryUpdateHandle_t)*/ SteamAPI_ISteamInventory_StartUpdateProperties( IntPtr ISteamInventory ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_RemoveProperty( IntPtr ISteamInventory, ulong handle, ulong nItemID, string /*const char **/ pchPropertyName ); [DllImport( "steam_api64.dll" )] internal static extern bool /*bool*/ SteamAPI_ISteamInventory_SetProperty( IntPtr ISteamInventory, ulong handle, ulong nItemID, string /*const char **/ pchPropertyName, string /*const char **/ pchPropertyValue ); diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamApps.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamApps.cs index 748f708..ce2e4ba 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.SteamApps.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamApps.cs @@ -91,6 +91,12 @@ public bool BIsSubscribedApp( AppId_t appID /*AppId_t*/ ) return platform.ISteamApps_BIsSubscribedApp( appID.Value ); } + // bool + public bool BIsSubscribedFromFamilySharing() + { + return platform.ISteamApps_BIsSubscribedFromFamilySharing(); + } + // bool public bool BIsSubscribedFromFreeWeekend() { @@ -193,6 +199,18 @@ public uint GetInstalledDepots( AppId_t appID /*AppId_t*/, IntPtr pvecDepots /*D return platform.ISteamApps_GetInstalledDepots( appID.Value, (IntPtr) pvecDepots, cMaxDepots ); } + // int + // with: Detect_StringFetch True + public string GetLaunchCommandLine() + { + int bSuccess = default( int ); + System.Text.StringBuilder pszCommandLine_sb = Helpers.TakeStringBuilder(); + int cubCommandLine = 4096; + bSuccess = platform.ISteamApps_GetLaunchCommandLine( pszCommandLine_sb, cubCommandLine ); + if ( bSuccess <= 0 ) return null; + return pszCommandLine_sb.ToString(); + } + // string // with: Detect_StringReturn public string GetLaunchQueryParam( string pchKey /*const char **/ ) diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamClient.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamClient.cs index 99fc297..96d22c0 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.SteamClient.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamClient.cs @@ -109,6 +109,14 @@ public SteamFriends GetISteamFriends( HSteamUser hSteamUser /*HSteamUser*/, HSte return new SteamFriends( steamworks, interface_pointer ); } + // ISteamGameSearch * + public SteamGameSearch GetISteamGameSearch( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ ) + { + IntPtr interface_pointer; + interface_pointer = platform.ISteamClient_GetISteamGameSearch( hSteamuser.Value, hSteamPipe.Value, pchVersion ); + return new SteamGameSearch( steamworks, interface_pointer ); + } + // ISteamGameServer * public SteamGameServer GetISteamGameServer( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ ) { @@ -147,6 +155,14 @@ public SteamHTTP GetISteamHTTP( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe return new SteamHTTP( steamworks, interface_pointer ); } + // ISteamInput * + public SteamInput GetISteamInput( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ ) + { + IntPtr interface_pointer; + interface_pointer = platform.ISteamClient_GetISteamInput( hSteamUser.Value, hSteamPipe.Value, pchVersion ); + return new SteamInput( steamworks, interface_pointer ); + } + // ISteamInventory * public SteamInventory GetISteamInventory( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ ) { @@ -203,6 +219,14 @@ public SteamParentalSettings GetISteamParentalSettings( HSteamUser hSteamuser /* return new SteamParentalSettings( steamworks, interface_pointer ); } + // ISteamParties * + public SteamParties GetISteamParties( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ ) + { + IntPtr interface_pointer; + interface_pointer = platform.ISteamClient_GetISteamParties( hSteamUser.Value, hSteamPipe.Value, pchVersion ); + return new SteamParties( steamworks, interface_pointer ); + } + // ISteamRemoteStorage * public SteamRemoteStorage GetISteamRemoteStorage( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ ) { diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamController.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamController.cs index c3e3523..9a23212 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.SteamController.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamController.cs @@ -65,6 +65,12 @@ public void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle /* platform.ISteamController_DeactivateAllActionSetLayers( controllerHandle.Value ); } + // ControllerActionOrigin + public ControllerActionOrigin GetActionOriginFromXboxOrigin( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, XboxOrigin eOrigin /*EXboxOrigin*/ ) + { + return platform.ISteamController_GetActionOriginFromXboxOrigin( controllerHandle.Value, eOrigin ); + } + // ControllerActionSetHandle_t public ControllerActionSetHandle_t GetActionSetHandle( string pszActionSetName /*const char **/ ) { @@ -77,8 +83,8 @@ public int GetActiveActionSetLayers( ControllerHandle_t controllerHandle /*Contr return platform.ISteamController_GetActiveActionSetLayers( controllerHandle.Value, (IntPtr) handlesOut ); } - // ControllerAnalogActionData_t - public ControllerAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerAnalogActionHandle_t analogActionHandle /*ControllerAnalogActionHandle_t*/ ) + // InputAnalogActionData_t + public InputAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerAnalogActionHandle_t analogActionHandle /*ControllerAnalogActionHandle_t*/ ) { return platform.ISteamController_GetAnalogActionData( controllerHandle.Value, analogActionHandle.Value ); } @@ -113,8 +119,8 @@ public ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t contr return platform.ISteamController_GetCurrentActionSet( controllerHandle.Value ); } - // ControllerDigitalActionData_t - public ControllerDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerDigitalActionHandle_t digitalActionHandle /*ControllerDigitalActionHandle_t*/ ) + // InputDigitalActionData_t + public InputDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerDigitalActionHandle_t digitalActionHandle /*ControllerDigitalActionHandle_t*/ ) { return platform.ISteamController_GetDigitalActionData( controllerHandle.Value, digitalActionHandle.Value ); } @@ -146,14 +152,23 @@ public string GetGlyphForActionOrigin( ControllerActionOrigin eOrigin /*EControl return Marshal.PtrToStringAnsi( string_pointer ); } + // string + // with: Detect_StringReturn + public string GetGlyphForXboxOrigin( XboxOrigin eOrigin /*EXboxOrigin*/ ) + { + IntPtr string_pointer; + string_pointer = platform.ISteamController_GetGlyphForXboxOrigin( eOrigin ); + return Marshal.PtrToStringAnsi( string_pointer ); + } + // SteamInputType public SteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle /*ControllerHandle_t*/ ) { return platform.ISteamController_GetInputTypeForHandle( controllerHandle.Value ); } - // ControllerMotionData_t - public ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle /*ControllerHandle_t*/ ) + // InputMotionData_t + public InputMotionData_t GetMotionData( ControllerHandle_t controllerHandle /*ControllerHandle_t*/ ) { return platform.ISteamController_GetMotionData( controllerHandle.Value ); } @@ -167,6 +182,15 @@ public string GetStringForActionOrigin( ControllerActionOrigin eOrigin /*EContro return Marshal.PtrToStringAnsi( string_pointer ); } + // string + // with: Detect_StringReturn + public string GetStringForXboxOrigin( XboxOrigin eOrigin /*EXboxOrigin*/ ) + { + IntPtr string_pointer; + string_pointer = platform.ISteamController_GetStringForXboxOrigin( eOrigin ); + return Marshal.PtrToStringAnsi( string_pointer ); + } + // bool public bool Init() { @@ -185,24 +209,12 @@ public void SetLEDColor( ControllerHandle_t controllerHandle /*ControllerHandle_ platform.ISteamController_SetLEDColor( controllerHandle.Value, nColorR, nColorG, nColorB, nFlags ); } - // bool - public bool ShowAnalogActionOrigins( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerAnalogActionHandle_t analogActionHandle /*ControllerAnalogActionHandle_t*/, float flScale /*float*/, float flXPosition /*float*/, float flYPosition /*float*/ ) - { - return platform.ISteamController_ShowAnalogActionOrigins( controllerHandle.Value, analogActionHandle.Value, flScale, flXPosition, flYPosition ); - } - // bool public bool ShowBindingPanel( ControllerHandle_t controllerHandle /*ControllerHandle_t*/ ) { return platform.ISteamController_ShowBindingPanel( controllerHandle.Value ); } - // bool - public bool ShowDigitalActionOrigins( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerDigitalActionHandle_t digitalActionHandle /*ControllerDigitalActionHandle_t*/, float flScale /*float*/, float flXPosition /*float*/, float flYPosition /*float*/ ) - { - return platform.ISteamController_ShowDigitalActionOrigins( controllerHandle.Value, digitalActionHandle.Value, flScale, flXPosition, flYPosition ); - } - // bool public bool Shutdown() { @@ -215,6 +227,12 @@ public void StopAnalogActionMomentum( ControllerHandle_t controllerHandle /*Cont platform.ISteamController_StopAnalogActionMomentum( controllerHandle.Value, eAction.Value ); } + // ControllerActionOrigin + public ControllerActionOrigin TranslateActionOrigin( SteamInputType eDestinationInputType /*ESteamInputType*/, ControllerActionOrigin eSourceOrigin /*EControllerActionOrigin*/ ) + { + return platform.ISteamController_TranslateActionOrigin( eDestinationInputType, eSourceOrigin ); + } + // void public void TriggerHapticPulse( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, SteamControllerPad eTargetPad /*ESteamControllerPad*/, ushort usDurationMicroSec /*unsigned short*/ ) { diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamFriends.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamFriends.cs index 5505398..a63df52 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.SteamFriends.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamFriends.cs @@ -66,9 +66,9 @@ public void ActivateGameOverlayToUser( string pchDialog /*const char **/, CSteam } // void - public void ActivateGameOverlayToWebPage( string pchURL /*const char **/ ) + public void ActivateGameOverlayToWebPage( string pchURL /*const char **/, ActivateGameOverlayToWebPageMode eMode /*EActivateGameOverlayToWebPageMode*/ ) { - platform.ISteamFriends_ActivateGameOverlayToWebPage( pchURL ); + platform.ISteamFriends_ActivateGameOverlayToWebPage( pchURL, eMode ); } // void @@ -350,6 +350,12 @@ public int GetMediumFriendAvatar( CSteamID steamIDFriend /*class CSteamID*/ ) return platform.ISteamFriends_GetMediumFriendAvatar( steamIDFriend.Value ); } + // int + public int GetNumChatsWithUnreadPriorityMessages() + { + return platform.ISteamFriends_GetNumChatsWithUnreadPriorityMessages(); + } + // string // with: Detect_StringReturn public string GetPersonaName() diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamGameSearch.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamGameSearch.cs new file mode 100644 index 0000000..61df010 --- /dev/null +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamGameSearch.cs @@ -0,0 +1,137 @@ +using System; +using System.Runtime.InteropServices; +using System.Linq; + +namespace SteamNative +{ + internal unsafe class SteamGameSearch : IDisposable + { + // + // Holds a platform specific implentation + // + internal Platform.Interface platform; + internal Facepunch.Steamworks.BaseSteamworks steamworks; + + // + // Constructor decides which implementation to use based on current platform + // + internal SteamGameSearch( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer ) + { + this.steamworks = steamworks; + + if ( Platform.IsWindows ) platform = new Platform.Windows( pointer ); + else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer ); + else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer ); + } + + // + // Class is invalid if we don't have a valid implementation + // + public bool IsValid{ get{ return platform != null && platform.IsValid; } } + + // + // When shutting down clear all the internals to avoid accidental use + // + public virtual void Dispose() + { + if ( platform != null ) + { + platform.Dispose(); + platform = null; + } + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t AcceptGame() + { + return platform.ISteamGameSearch_AcceptGame(); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t AddGameSearchParams( string pchKeyToFind /*const char **/, string pchValuesToFind /*const char **/ ) + { + return platform.ISteamGameSearch_AddGameSearchParams( pchKeyToFind, pchValuesToFind ); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t CancelRequestPlayersForGame() + { + return platform.ISteamGameSearch_CancelRequestPlayersForGame(); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t DeclineGame() + { + return platform.ISteamGameSearch_DeclineGame(); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t EndGame( ulong ullUniqueGameID /*uint64*/ ) + { + return platform.ISteamGameSearch_EndGame( ullUniqueGameID ); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t EndGameSearch() + { + return platform.ISteamGameSearch_EndGameSearch(); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t HostConfirmGameStart( ulong ullUniqueGameID /*uint64*/ ) + { + return platform.ISteamGameSearch_HostConfirmGameStart( ullUniqueGameID ); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t RequestPlayersForGame( int nPlayerMin /*int*/, int nPlayerMax /*int*/, int nMaxTeamSize /*int*/ ) + { + return platform.ISteamGameSearch_RequestPlayersForGame( nPlayerMin, nPlayerMax, nMaxTeamSize ); + } + + // GameSearchErrorCode_t + // with: Detect_StringFetch False + public GameSearchErrorCode_t RetrieveConnectionDetails( CSteamID steamIDHost /*class CSteamID*/, out string pchConnectionDetails /*char **/ ) + { + GameSearchErrorCode_t bSuccess = default( GameSearchErrorCode_t ); + pchConnectionDetails = string.Empty; + System.Text.StringBuilder pchConnectionDetails_sb = Helpers.TakeStringBuilder(); + int cubConnectionDetails = 4096; + bSuccess = platform.ISteamGameSearch_RetrieveConnectionDetails( steamIDHost.Value, pchConnectionDetails_sb, cubConnectionDetails ); + if ( !bSuccess ) return bSuccess; + pchConnectionDetails = pchConnectionDetails_sb.ToString(); + return bSuccess; + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t SearchForGameSolo( int nPlayerMin /*int*/, int nPlayerMax /*int*/ ) + { + return platform.ISteamGameSearch_SearchForGameSolo( nPlayerMin, nPlayerMax ); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t SearchForGameWithLobby( CSteamID steamIDLobby /*class CSteamID*/, int nPlayerMin /*int*/, int nPlayerMax /*int*/ ) + { + return platform.ISteamGameSearch_SearchForGameWithLobby( steamIDLobby.Value, nPlayerMin, nPlayerMax ); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t SetConnectionDetails( string pchConnectionDetails /*const char **/, int cubConnectionDetails /*int*/ ) + { + return platform.ISteamGameSearch_SetConnectionDetails( pchConnectionDetails, cubConnectionDetails ); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t SetGameHostParams( string pchKey /*const char **/, string pchValue /*const char **/ ) + { + return platform.ISteamGameSearch_SetGameHostParams( pchKey, pchValue ); + } + + // GameSearchErrorCode_t + public GameSearchErrorCode_t SubmitPlayerResult( ulong ullUniqueGameID /*uint64*/, CSteamID steamIDPlayer /*class CSteamID*/, PlayerResult_t EPlayerResult /*EPlayerResult_t*/ ) + { + return platform.ISteamGameSearch_SubmitPlayerResult( ullUniqueGameID, steamIDPlayer.Value, EPlayerResult ); + } + + } +} diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamHTMLSurface.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamHTMLSurface.cs index 60cda23..3fdb4a2 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.SteamHTMLSurface.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamHTMLSurface.cs @@ -126,9 +126,9 @@ public void KeyChar( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, uint cUnicod } // void - public void KeyDown( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, uint nNativeKeyCode /*uint32*/, HTMLKeyModifiers eHTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ ) + public void KeyDown( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, uint nNativeKeyCode /*uint32*/, HTMLKeyModifiers eHTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/, bool bIsSystemKey /*bool*/ ) { - platform.ISteamHTMLSurface_KeyDown( unBrowserHandle.Value, nNativeKeyCode, eHTMLKeyModifiers ); + platform.ISteamHTMLSurface_KeyDown( unBrowserHandle.Value, nNativeKeyCode, eHTMLKeyModifiers, bIsSystemKey ); } // void @@ -173,6 +173,12 @@ public void MouseWheel( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, int nDelt platform.ISteamHTMLSurface_MouseWheel( unBrowserHandle.Value, nDelta ); } + // void + public void OpenDeveloperTools( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ ) + { + platform.ISteamHTMLSurface_OpenDeveloperTools( unBrowserHandle.Value ); + } + // void public void PasteFromClipboard( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ ) { diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamInput.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamInput.cs new file mode 100644 index 0000000..ab58a36 --- /dev/null +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamInput.cs @@ -0,0 +1,255 @@ +using System; +using System.Runtime.InteropServices; +using System.Linq; + +namespace SteamNative +{ + internal unsafe class SteamInput : IDisposable + { + // + // Holds a platform specific implentation + // + internal Platform.Interface platform; + internal Facepunch.Steamworks.BaseSteamworks steamworks; + + // + // Constructor decides which implementation to use based on current platform + // + internal SteamInput( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer ) + { + this.steamworks = steamworks; + + if ( Platform.IsWindows ) platform = new Platform.Windows( pointer ); + else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer ); + else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer ); + } + + // + // Class is invalid if we don't have a valid implementation + // + public bool IsValid{ get{ return platform != null && platform.IsValid; } } + + // + // When shutting down clear all the internals to avoid accidental use + // + public virtual void Dispose() + { + if ( platform != null ) + { + platform.Dispose(); + platform = null; + } + } + + // void + public void ActivateActionSet( InputHandle_t inputHandle /*InputHandle_t*/, InputActionSetHandle_t actionSetHandle /*InputActionSetHandle_t*/ ) + { + platform.ISteamInput_ActivateActionSet( inputHandle.Value, actionSetHandle.Value ); + } + + // void + public void ActivateActionSetLayer( InputHandle_t inputHandle /*InputHandle_t*/, InputActionSetHandle_t actionSetLayerHandle /*InputActionSetHandle_t*/ ) + { + platform.ISteamInput_ActivateActionSetLayer( inputHandle.Value, actionSetLayerHandle.Value ); + } + + // void + public void DeactivateActionSetLayer( InputHandle_t inputHandle /*InputHandle_t*/, InputActionSetHandle_t actionSetLayerHandle /*InputActionSetHandle_t*/ ) + { + platform.ISteamInput_DeactivateActionSetLayer( inputHandle.Value, actionSetLayerHandle.Value ); + } + + // void + public void DeactivateAllActionSetLayers( InputHandle_t inputHandle /*InputHandle_t*/ ) + { + platform.ISteamInput_DeactivateAllActionSetLayers( inputHandle.Value ); + } + + // InputActionOrigin + public InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle /*InputHandle_t*/, XboxOrigin eOrigin /*EXboxOrigin*/ ) + { + return platform.ISteamInput_GetActionOriginFromXboxOrigin( inputHandle.Value, eOrigin ); + } + + // InputActionSetHandle_t + public InputActionSetHandle_t GetActionSetHandle( string pszActionSetName /*const char **/ ) + { + return platform.ISteamInput_GetActionSetHandle( pszActionSetName ); + } + + // int + public int GetActiveActionSetLayers( InputHandle_t inputHandle /*InputHandle_t*/, IntPtr handlesOut /*InputActionSetHandle_t **/ ) + { + return platform.ISteamInput_GetActiveActionSetLayers( inputHandle.Value, (IntPtr) handlesOut ); + } + + // InputAnalogActionData_t + public InputAnalogActionData_t GetAnalogActionData( InputHandle_t inputHandle /*InputHandle_t*/, InputAnalogActionHandle_t analogActionHandle /*InputAnalogActionHandle_t*/ ) + { + return platform.ISteamInput_GetAnalogActionData( inputHandle.Value, analogActionHandle.Value ); + } + + // InputAnalogActionHandle_t + public InputAnalogActionHandle_t GetAnalogActionHandle( string pszActionName /*const char **/ ) + { + return platform.ISteamInput_GetAnalogActionHandle( pszActionName ); + } + + // int + public int GetAnalogActionOrigins( InputHandle_t inputHandle /*InputHandle_t*/, InputActionSetHandle_t actionSetHandle /*InputActionSetHandle_t*/, InputAnalogActionHandle_t analogActionHandle /*InputAnalogActionHandle_t*/, out InputActionOrigin originsOut /*EInputActionOrigin **/ ) + { + return platform.ISteamInput_GetAnalogActionOrigins( inputHandle.Value, actionSetHandle.Value, analogActionHandle.Value, out originsOut ); + } + + // int + public int GetConnectedControllers( IntPtr handlesOut /*InputHandle_t **/ ) + { + return platform.ISteamInput_GetConnectedControllers( (IntPtr) handlesOut ); + } + + // InputHandle_t + public InputHandle_t GetControllerForGamepadIndex( int nIndex /*int*/ ) + { + return platform.ISteamInput_GetControllerForGamepadIndex( nIndex ); + } + + // InputActionSetHandle_t + public InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle /*InputHandle_t*/ ) + { + return platform.ISteamInput_GetCurrentActionSet( inputHandle.Value ); + } + + // InputDigitalActionData_t + public InputDigitalActionData_t GetDigitalActionData( InputHandle_t inputHandle /*InputHandle_t*/, InputDigitalActionHandle_t digitalActionHandle /*InputDigitalActionHandle_t*/ ) + { + return platform.ISteamInput_GetDigitalActionData( inputHandle.Value, digitalActionHandle.Value ); + } + + // InputDigitalActionHandle_t + public InputDigitalActionHandle_t GetDigitalActionHandle( string pszActionName /*const char **/ ) + { + return platform.ISteamInput_GetDigitalActionHandle( pszActionName ); + } + + // int + public int GetDigitalActionOrigins( InputHandle_t inputHandle /*InputHandle_t*/, InputActionSetHandle_t actionSetHandle /*InputActionSetHandle_t*/, InputDigitalActionHandle_t digitalActionHandle /*InputDigitalActionHandle_t*/, out InputActionOrigin originsOut /*EInputActionOrigin **/ ) + { + return platform.ISteamInput_GetDigitalActionOrigins( inputHandle.Value, actionSetHandle.Value, digitalActionHandle.Value, out originsOut ); + } + + // int + public int GetGamepadIndexForController( InputHandle_t ulinputHandle /*InputHandle_t*/ ) + { + return platform.ISteamInput_GetGamepadIndexForController( ulinputHandle.Value ); + } + + // string + // with: Detect_StringReturn + public string GetGlyphForActionOrigin( InputActionOrigin eOrigin /*EInputActionOrigin*/ ) + { + IntPtr string_pointer; + string_pointer = platform.ISteamInput_GetGlyphForActionOrigin( eOrigin ); + return Marshal.PtrToStringAnsi( string_pointer ); + } + + // string + // with: Detect_StringReturn + public string GetGlyphForXboxOrigin( XboxOrigin eOrigin /*EXboxOrigin*/ ) + { + IntPtr string_pointer; + string_pointer = platform.ISteamInput_GetGlyphForXboxOrigin( eOrigin ); + return Marshal.PtrToStringAnsi( string_pointer ); + } + + // SteamInputType + public SteamInputType GetInputTypeForHandle( InputHandle_t inputHandle /*InputHandle_t*/ ) + { + return platform.ISteamInput_GetInputTypeForHandle( inputHandle.Value ); + } + + // InputMotionData_t + public InputMotionData_t GetMotionData( InputHandle_t inputHandle /*InputHandle_t*/ ) + { + return platform.ISteamInput_GetMotionData( inputHandle.Value ); + } + + // string + // with: Detect_StringReturn + public string GetStringForActionOrigin( InputActionOrigin eOrigin /*EInputActionOrigin*/ ) + { + IntPtr string_pointer; + string_pointer = platform.ISteamInput_GetStringForActionOrigin( eOrigin ); + return Marshal.PtrToStringAnsi( string_pointer ); + } + + // string + // with: Detect_StringReturn + public string GetStringForXboxOrigin( XboxOrigin eOrigin /*EXboxOrigin*/ ) + { + IntPtr string_pointer; + string_pointer = platform.ISteamInput_GetStringForXboxOrigin( eOrigin ); + return Marshal.PtrToStringAnsi( string_pointer ); + } + + // bool + public bool Init() + { + return platform.ISteamInput_Init(); + } + + // void + public void RunFrame() + { + platform.ISteamInput_RunFrame(); + } + + // void + public void SetLEDColor( InputHandle_t inputHandle /*InputHandle_t*/, byte nColorR /*uint8*/, byte nColorG /*uint8*/, byte nColorB /*uint8*/, uint nFlags /*unsigned int*/ ) + { + platform.ISteamInput_SetLEDColor( inputHandle.Value, nColorR, nColorG, nColorB, nFlags ); + } + + // bool + public bool ShowBindingPanel( InputHandle_t inputHandle /*InputHandle_t*/ ) + { + return platform.ISteamInput_ShowBindingPanel( inputHandle.Value ); + } + + // bool + public bool Shutdown() + { + return platform.ISteamInput_Shutdown(); + } + + // void + public void StopAnalogActionMomentum( InputHandle_t inputHandle /*InputHandle_t*/, InputAnalogActionHandle_t eAction /*InputAnalogActionHandle_t*/ ) + { + platform.ISteamInput_StopAnalogActionMomentum( inputHandle.Value, eAction.Value ); + } + + // InputActionOrigin + public InputActionOrigin TranslateActionOrigin( SteamInputType eDestinationInputType /*ESteamInputType*/, InputActionOrigin eSourceOrigin /*EInputActionOrigin*/ ) + { + return platform.ISteamInput_TranslateActionOrigin( eDestinationInputType, eSourceOrigin ); + } + + // void + public void TriggerHapticPulse( InputHandle_t inputHandle /*InputHandle_t*/, SteamControllerPad eTargetPad /*ESteamControllerPad*/, ushort usDurationMicroSec /*unsigned short*/ ) + { + platform.ISteamInput_TriggerHapticPulse( inputHandle.Value, eTargetPad, usDurationMicroSec ); + } + + // void + public void TriggerRepeatedHapticPulse( InputHandle_t inputHandle /*InputHandle_t*/, SteamControllerPad eTargetPad /*ESteamControllerPad*/, ushort usDurationMicroSec /*unsigned short*/, ushort usOffMicroSec /*unsigned short*/, ushort unRepeat /*unsigned short*/, uint nFlags /*unsigned int*/ ) + { + platform.ISteamInput_TriggerRepeatedHapticPulse( inputHandle.Value, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags ); + } + + // void + public void TriggerVibration( InputHandle_t inputHandle /*InputHandle_t*/, ushort usLeftSpeed /*unsigned short*/, ushort usRightSpeed /*unsigned short*/ ) + { + platform.ISteamInput_TriggerVibration( inputHandle.Value, usLeftSpeed, usRightSpeed ); + } + + } +} diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamInventory.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamInventory.cs index fe8cdbe..68e29be 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.SteamInventory.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamInventory.cs @@ -148,9 +148,9 @@ public bool GetItemDefinitionProperty( SteamItemDef_t iDefinition /*SteamItemDef } // bool - public bool GetItemPrice( SteamItemDef_t iDefinition /*SteamItemDef_t*/, out ulong pPrice /*uint64 **/ ) + public bool GetItemPrice( SteamItemDef_t iDefinition /*SteamItemDef_t*/, out ulong pCurrentPrice /*uint64 **/, out ulong pBasePrice /*uint64 **/ ) { - return platform.ISteamInventory_GetItemPrice( iDefinition.Value, out pPrice ); + return platform.ISteamInventory_GetItemPrice( iDefinition.Value, out pCurrentPrice, out pBasePrice ); } // bool @@ -160,9 +160,9 @@ public bool GetItemsByID( ref SteamInventoryResult_t pResultHandle /*SteamInvent } // bool - public bool GetItemsWithPrices( IntPtr pArrayItemDefs /*SteamItemDef_t **/, IntPtr pPrices /*uint64 **/, uint unArrayLength /*uint32*/ ) + public bool GetItemsWithPrices( IntPtr pArrayItemDefs /*SteamItemDef_t **/, IntPtr pCurrentPrices /*uint64 **/, IntPtr pBasePrices /*uint64 **/, uint unArrayLength /*uint32*/ ) { - return platform.ISteamInventory_GetItemsWithPrices( (IntPtr) pArrayItemDefs, (IntPtr) pPrices, unArrayLength ); + return platform.ISteamInventory_GetItemsWithPrices( (IntPtr) pArrayItemDefs, (IntPtr) pCurrentPrices, (IntPtr) pBasePrices, unArrayLength ); } // uint diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamParties.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamParties.cs new file mode 100644 index 0000000..3489a19 --- /dev/null +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamParties.cs @@ -0,0 +1,151 @@ +using System; +using System.Runtime.InteropServices; +using System.Linq; + +namespace SteamNative +{ + internal unsafe class SteamParties : IDisposable + { + // + // Holds a platform specific implentation + // + internal Platform.Interface platform; + internal Facepunch.Steamworks.BaseSteamworks steamworks; + + // + // Constructor decides which implementation to use based on current platform + // + internal SteamParties( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer ) + { + this.steamworks = steamworks; + + if ( Platform.IsWindows ) platform = new Platform.Windows( pointer ); + else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer ); + else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer ); + } + + // + // Class is invalid if we don't have a valid implementation + // + public bool IsValid{ get{ return platform != null && platform.IsValid; } } + + // + // When shutting down clear all the internals to avoid accidental use + // + public virtual void Dispose() + { + if ( platform != null ) + { + platform.Dispose(); + platform = null; + } + } + + // void + public void CancelReservation( PartyBeaconID_t ulBeacon /*PartyBeaconID_t*/, CSteamID steamIDUser /*class CSteamID*/ ) + { + platform.ISteamParties_CancelReservation( ulBeacon.Value, steamIDUser.Value ); + } + + // SteamAPICall_t + public CallbackHandle ChangeNumOpenSlots( PartyBeaconID_t ulBeacon /*PartyBeaconID_t*/, uint unOpenSlots /*uint32*/, Action CallbackFunction = null /*Action*/ ) + { + SteamAPICall_t callback = 0; + callback = platform.ISteamParties_ChangeNumOpenSlots( ulBeacon.Value, unOpenSlots ); + + if ( CallbackFunction == null ) return null; + if ( callback == 0 ) return null; + + return ChangeNumOpenSlotsCallback_t.CallResult( steamworks, callback, CallbackFunction ); + } + + // SteamAPICall_t + public CallbackHandle CreateBeacon( uint unOpenSlots /*uint32*/, ref SteamPartyBeaconLocation_t pBeaconLocation /*struct SteamPartyBeaconLocation_t **/, string pchConnectString /*const char **/, string pchMetadata /*const char **/, Action CallbackFunction = null /*Action*/ ) + { + SteamAPICall_t callback = 0; + callback = platform.ISteamParties_CreateBeacon( unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata ); + + if ( CallbackFunction == null ) return null; + if ( callback == 0 ) return null; + + return CreateBeaconCallback_t.CallResult( steamworks, callback, CallbackFunction ); + } + + // bool + public bool DestroyBeacon( PartyBeaconID_t ulBeacon /*PartyBeaconID_t*/ ) + { + return platform.ISteamParties_DestroyBeacon( ulBeacon.Value ); + } + + // bool + public bool GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t pLocationList /*struct SteamPartyBeaconLocation_t **/, uint uMaxNumLocations /*uint32*/ ) + { + return platform.ISteamParties_GetAvailableBeaconLocations( ref pLocationList, uMaxNumLocations ); + } + + // PartyBeaconID_t + public PartyBeaconID_t GetBeaconByIndex( uint unIndex /*uint32*/ ) + { + return platform.ISteamParties_GetBeaconByIndex( unIndex ); + } + + // bool + // with: Detect_StringFetch False + public bool GetBeaconDetails( PartyBeaconID_t ulBeaconID /*PartyBeaconID_t*/, out CSteamID pSteamIDBeaconOwner /*class CSteamID **/, ref SteamPartyBeaconLocation_t pLocation /*struct SteamPartyBeaconLocation_t **/, out string pchMetadata /*char **/ ) + { + bool bSuccess = default( bool ); + pchMetadata = string.Empty; + System.Text.StringBuilder pchMetadata_sb = Helpers.TakeStringBuilder(); + int cchMetadata = 4096; + bSuccess = platform.ISteamParties_GetBeaconDetails( ulBeaconID.Value, out pSteamIDBeaconOwner.Value, ref pLocation, pchMetadata_sb, cchMetadata ); + if ( !bSuccess ) return bSuccess; + pchMetadata = pchMetadata_sb.ToString(); + return bSuccess; + } + + // bool + // with: Detect_StringFetch False + public bool GetBeaconLocationData( SteamPartyBeaconLocation_t BeaconLocation /*struct SteamPartyBeaconLocation_t*/, SteamPartyBeaconLocationData eData /*ESteamPartyBeaconLocationData*/, out string pchDataStringOut /*char **/ ) + { + bool bSuccess = default( bool ); + pchDataStringOut = string.Empty; + System.Text.StringBuilder pchDataStringOut_sb = Helpers.TakeStringBuilder(); + int cchDataStringOut = 4096; + bSuccess = platform.ISteamParties_GetBeaconLocationData( BeaconLocation, eData, pchDataStringOut_sb, cchDataStringOut ); + if ( !bSuccess ) return bSuccess; + pchDataStringOut = pchDataStringOut_sb.ToString(); + return bSuccess; + } + + // uint + public uint GetNumActiveBeacons() + { + return platform.ISteamParties_GetNumActiveBeacons(); + } + + // bool + public bool GetNumAvailableBeaconLocations( IntPtr puNumLocations /*uint32 **/ ) + { + return platform.ISteamParties_GetNumAvailableBeaconLocations( (IntPtr) puNumLocations ); + } + + // SteamAPICall_t + public CallbackHandle JoinParty( PartyBeaconID_t ulBeaconID /*PartyBeaconID_t*/, Action CallbackFunction = null /*Action*/ ) + { + SteamAPICall_t callback = 0; + callback = platform.ISteamParties_JoinParty( ulBeaconID.Value ); + + if ( CallbackFunction == null ) return null; + if ( callback == 0 ) return null; + + return JoinPartyCallback_t.CallResult( steamworks, callback, CallbackFunction ); + } + + // void + public void OnReservationCompleted( PartyBeaconID_t ulBeacon /*PartyBeaconID_t*/, CSteamID steamIDUser /*class CSteamID*/ ) + { + platform.ISteamParties_OnReservationCompleted( ulBeacon.Value, steamIDUser.Value ); + } + + } +} diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamUGC.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamUGC.cs index e17ac87..331567c 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.SteamUGC.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamUGC.cs @@ -137,6 +137,12 @@ public UGCQueryHandle_t CreateQueryAllUGCRequest( UGCQuery eQueryType /*EUGCQuer return platform.ISteamUGC_CreateQueryAllUGCRequest( eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID.Value, nConsumerAppID.Value, unPage ); } + // UGCQueryHandle_t + public UGCQueryHandle_t CreateQueryAllUGCRequest0( UGCQuery eQueryType /*EUGCQuery*/, UGCMatchingUGCType eMatchingeMatchingUGCTypeFileType /*EUGCMatchingUGCType*/, AppId_t nCreatorAppID /*AppId_t*/, AppId_t nConsumerAppID /*AppId_t*/, string pchCursor /*const char **/ ) + { + return platform.ISteamUGC_CreateQueryAllUGCRequest0( eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID.Value, nConsumerAppID.Value, pchCursor ); + } + // with: Detect_VectorReturn // UGCQueryHandle_t public UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t[] pvecPublishedFileID /*PublishedFileId_t **/ ) @@ -416,6 +422,12 @@ public bool SetAllowCachedResponse( UGCQueryHandle_t handle /*UGCQueryHandle_t*/ return platform.ISteamUGC_SetAllowCachedResponse( handle.Value, unMaxAgeSeconds ); } + // bool + public bool SetAllowLegacyUpload( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, bool bAllowLegacyUpload /*bool*/ ) + { + return platform.ISteamUGC_SetAllowLegacyUpload( handle.Value, bAllowLegacyUpload ); + } + // bool public bool SetCloudFileNameFilter( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, string pMatchCloudFileName /*const char **/ ) { diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.SteamUser.cs b/Facepunch.Steamworks/SteamNative/SteamNative.SteamUser.cs index 05c94f4..b5ca0eb 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.SteamUser.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.SteamUser.cs @@ -137,6 +137,18 @@ public HSteamUser GetHSteamUser() return platform.ISteamUser_GetHSteamUser(); } + // SteamAPICall_t + public CallbackHandle GetMarketEligibility( Action CallbackFunction = null /*Action*/ ) + { + SteamAPICall_t callback = 0; + callback = platform.ISteamUser_GetMarketEligibility(); + + if ( CallbackFunction == null ) return null; + if ( callback == 0 ) return null; + + return MarketEligibilityResponse_t.CallResult( steamworks, callback, CallbackFunction ); + } + // int public int GetPlayerSteamLevel() { diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Structs.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Structs.cs index a37a3c1..c7e1e42 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Structs.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Structs.cs @@ -1612,6 +1612,193 @@ internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.S } } + [StructLayout( LayoutKind.Sequential, Pack = 8 )] + internal struct MarketEligibilityResponse_t + { + internal const int CallbackId = CallbackIdentifiers.SteamUser + 66; + [MarshalAs(UnmanagedType.I1)] + internal bool Allowed; // m_bAllowed _Bool + internal MarketNotAllowedReasonFlags NotAllowedReason; // m_eNotAllowedReason enum EMarketNotAllowedReasonFlags + internal uint TAllowedAtTime; // m_rtAllowedAtTime RTime32 + internal int CdaySteamGuardRequiredDays; // m_cdaySteamGuardRequiredDays int + internal int CdayNewDeviceCooldown; // m_cdayNewDeviceCooldown int + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static MarketEligibilityResponse_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (MarketEligibilityResponse_t) Marshal.PtrToStructure( p, typeof(MarketEligibilityResponse_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(MarketEligibilityResponse_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + [MarshalAs(UnmanagedType.I1)] + internal bool Allowed; // m_bAllowed _Bool + internal MarketNotAllowedReasonFlags NotAllowedReason; // m_eNotAllowedReason enum EMarketNotAllowedReasonFlags + internal uint TAllowedAtTime; // m_rtAllowedAtTime RTime32 + internal int CdaySteamGuardRequiredDays; // m_cdaySteamGuardRequiredDays int + internal int CdayNewDeviceCooldown; // m_cdayNewDeviceCooldown int + + // + // Easily convert from PackSmall to MarketEligibilityResponse_t + // + public static implicit operator MarketEligibilityResponse_t ( MarketEligibilityResponse_t.PackSmall d ) + { + return new MarketEligibilityResponse_t() + { + Allowed = d.Allowed, + NotAllowedReason = d.NotAllowedReason, + TAllowedAtTime = d.TAllowedAtTime, + CdaySteamGuardRequiredDays = d.CdaySteamGuardRequiredDays, + CdayNewDeviceCooldown = d.CdayNewDeviceCooldown, + }; + } + } + + internal static CallResult CallResult( Facepunch.Steamworks.BaseSteamworks steamworks, SteamAPICall_t call, Action CallbackFunction ) + { + return new CallResult( steamworks, call, CallbackFunction, FromPointer, StructSize(), CallbackId ); + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + [StructLayout( LayoutKind.Sequential, Pack = 4 )] internal struct FriendGameInfo_t { @@ -5757,6 +5944,50 @@ public static implicit operator gameserveritem_t ( gameserveritem_t.PackSmall d } } + [StructLayout( LayoutKind.Sequential, Pack = 8 )] + internal struct SteamPartyBeaconLocation_t + { + internal SteamPartyBeaconLocationType Type; // m_eType enum ESteamPartyBeaconLocationType + internal ulong LocationID; // m_ulLocationID uint64 + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static SteamPartyBeaconLocation_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (SteamPartyBeaconLocation_t) Marshal.PtrToStructure( p, typeof(SteamPartyBeaconLocation_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamPartyBeaconLocation_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal SteamPartyBeaconLocationType Type; // m_eType enum ESteamPartyBeaconLocationType + internal ulong LocationID; // m_ulLocationID uint64 + + // + // Easily convert from PackSmall to SteamPartyBeaconLocation_t + // + public static implicit operator SteamPartyBeaconLocation_t ( SteamPartyBeaconLocation_t.PackSmall d ) + { + return new SteamPartyBeaconLocation_t() + { + Type = d.Type, + LocationID = d.LocationID, + }; + } + } + } + [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct FavoritesListChanged_t { @@ -7872,6 +8103,1963 @@ internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.S } } + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct SearchForGameProgressCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamGameSearch + 1; + internal ulong LSearchID; // m_ullSearchID uint64 + internal Result Result; // m_eResult enum EResult + internal ulong LobbyID; // m_lobbyID class CSteamID + internal ulong SteamIDEndedSearch; // m_steamIDEndedSearch class CSteamID + internal int SecondsRemainingEstimate; // m_nSecondsRemainingEstimate int32 + internal int CPlayersSearching; // m_cPlayersSearching int32 + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static SearchForGameProgressCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (SearchForGameProgressCallback_t) Marshal.PtrToStructure( p, typeof(SearchForGameProgressCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(SearchForGameProgressCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal ulong LSearchID; // m_ullSearchID uint64 + internal Result Result; // m_eResult enum EResult + internal ulong LobbyID; // m_lobbyID class CSteamID + internal ulong SteamIDEndedSearch; // m_steamIDEndedSearch class CSteamID + internal int SecondsRemainingEstimate; // m_nSecondsRemainingEstimate int32 + internal int CPlayersSearching; // m_cPlayersSearching int32 + + // + // Easily convert from PackSmall to SearchForGameProgressCallback_t + // + public static implicit operator SearchForGameProgressCallback_t ( SearchForGameProgressCallback_t.PackSmall d ) + { + return new SearchForGameProgressCallback_t() + { + LSearchID = d.LSearchID, + Result = d.Result, + LobbyID = d.LobbyID, + SteamIDEndedSearch = d.SteamIDEndedSearch, + SecondsRemainingEstimate = d.SecondsRemainingEstimate, + CPlayersSearching = d.CPlayersSearching, + }; + } + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct SearchForGameResultCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamGameSearch + 2; + internal ulong LSearchID; // m_ullSearchID uint64 + internal Result Result; // m_eResult enum EResult + internal int CountPlayersInGame; // m_nCountPlayersInGame int32 + internal int CountAcceptedGame; // m_nCountAcceptedGame int32 + internal ulong SteamIDHost; // m_steamIDHost class CSteamID + [MarshalAs(UnmanagedType.I1)] + internal bool FinalCallback; // m_bFinalCallback _Bool + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static SearchForGameResultCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (SearchForGameResultCallback_t) Marshal.PtrToStructure( p, typeof(SearchForGameResultCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(SearchForGameResultCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal ulong LSearchID; // m_ullSearchID uint64 + internal Result Result; // m_eResult enum EResult + internal int CountPlayersInGame; // m_nCountPlayersInGame int32 + internal int CountAcceptedGame; // m_nCountAcceptedGame int32 + internal ulong SteamIDHost; // m_steamIDHost class CSteamID + [MarshalAs(UnmanagedType.I1)] + internal bool FinalCallback; // m_bFinalCallback _Bool + + // + // Easily convert from PackSmall to SearchForGameResultCallback_t + // + public static implicit operator SearchForGameResultCallback_t ( SearchForGameResultCallback_t.PackSmall d ) + { + return new SearchForGameResultCallback_t() + { + LSearchID = d.LSearchID, + Result = d.Result, + CountPlayersInGame = d.CountPlayersInGame, + CountAcceptedGame = d.CountAcceptedGame, + SteamIDHost = d.SteamIDHost, + FinalCallback = d.FinalCallback, + }; + } + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 8 )] + internal struct RequestPlayersForGameProgressCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamGameSearch + 11; + internal Result Result; // m_eResult enum EResult + internal ulong LSearchID; // m_ullSearchID uint64 + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static RequestPlayersForGameProgressCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (RequestPlayersForGameProgressCallback_t) Marshal.PtrToStructure( p, typeof(RequestPlayersForGameProgressCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(RequestPlayersForGameProgressCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal Result Result; // m_eResult enum EResult + internal ulong LSearchID; // m_ullSearchID uint64 + + // + // Easily convert from PackSmall to RequestPlayersForGameProgressCallback_t + // + public static implicit operator RequestPlayersForGameProgressCallback_t ( RequestPlayersForGameProgressCallback_t.PackSmall d ) + { + return new RequestPlayersForGameProgressCallback_t() + { + Result = d.Result, + LSearchID = d.LSearchID, + }; + } + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct RequestPlayersForGameResultCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamGameSearch + 12; + internal Result Result; // m_eResult enum EResult + internal ulong LSearchID; // m_ullSearchID uint64 + internal ulong SteamIDPlayerFound; // m_SteamIDPlayerFound class CSteamID + internal ulong SteamIDLobby; // m_SteamIDLobby class CSteamID + internal PlayerAcceptState_t PlayerAcceptState; // m_ePlayerAcceptState PlayerAcceptState_t + internal int PlayerIndex; // m_nPlayerIndex int32 + internal int TotalPlayersFound; // m_nTotalPlayersFound int32 + internal int TotalPlayersAcceptedGame; // m_nTotalPlayersAcceptedGame int32 + internal int SuggestedTeamIndex; // m_nSuggestedTeamIndex int32 + internal ulong LUniqueGameID; // m_ullUniqueGameID uint64 + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static RequestPlayersForGameResultCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (RequestPlayersForGameResultCallback_t) Marshal.PtrToStructure( p, typeof(RequestPlayersForGameResultCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(RequestPlayersForGameResultCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal Result Result; // m_eResult enum EResult + internal ulong LSearchID; // m_ullSearchID uint64 + internal ulong SteamIDPlayerFound; // m_SteamIDPlayerFound class CSteamID + internal ulong SteamIDLobby; // m_SteamIDLobby class CSteamID + internal PlayerAcceptState_t PlayerAcceptState; // m_ePlayerAcceptState PlayerAcceptState_t + internal int PlayerIndex; // m_nPlayerIndex int32 + internal int TotalPlayersFound; // m_nTotalPlayersFound int32 + internal int TotalPlayersAcceptedGame; // m_nTotalPlayersAcceptedGame int32 + internal int SuggestedTeamIndex; // m_nSuggestedTeamIndex int32 + internal ulong LUniqueGameID; // m_ullUniqueGameID uint64 + + // + // Easily convert from PackSmall to RequestPlayersForGameResultCallback_t + // + public static implicit operator RequestPlayersForGameResultCallback_t ( RequestPlayersForGameResultCallback_t.PackSmall d ) + { + return new RequestPlayersForGameResultCallback_t() + { + Result = d.Result, + LSearchID = d.LSearchID, + SteamIDPlayerFound = d.SteamIDPlayerFound, + SteamIDLobby = d.SteamIDLobby, + PlayerAcceptState = d.PlayerAcceptState, + PlayerIndex = d.PlayerIndex, + TotalPlayersFound = d.TotalPlayersFound, + TotalPlayersAcceptedGame = d.TotalPlayersAcceptedGame, + SuggestedTeamIndex = d.SuggestedTeamIndex, + LUniqueGameID = d.LUniqueGameID, + }; + } + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 8 )] + internal struct RequestPlayersForGameFinalResultCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamGameSearch + 13; + internal Result Result; // m_eResult enum EResult + internal ulong LSearchID; // m_ullSearchID uint64 + internal ulong LUniqueGameID; // m_ullUniqueGameID uint64 + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static RequestPlayersForGameFinalResultCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (RequestPlayersForGameFinalResultCallback_t) Marshal.PtrToStructure( p, typeof(RequestPlayersForGameFinalResultCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(RequestPlayersForGameFinalResultCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal Result Result; // m_eResult enum EResult + internal ulong LSearchID; // m_ullSearchID uint64 + internal ulong LUniqueGameID; // m_ullUniqueGameID uint64 + + // + // Easily convert from PackSmall to RequestPlayersForGameFinalResultCallback_t + // + public static implicit operator RequestPlayersForGameFinalResultCallback_t ( RequestPlayersForGameFinalResultCallback_t.PackSmall d ) + { + return new RequestPlayersForGameFinalResultCallback_t() + { + Result = d.Result, + LSearchID = d.LSearchID, + LUniqueGameID = d.LUniqueGameID, + }; + } + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct SubmitPlayerResultResultCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamGameSearch + 14; + internal Result Result; // m_eResult enum EResult + internal ulong UllUniqueGameID; // ullUniqueGameID uint64 + internal ulong SteamIDPlayer; // steamIDPlayer class CSteamID + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static SubmitPlayerResultResultCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (SubmitPlayerResultResultCallback_t) Marshal.PtrToStructure( p, typeof(SubmitPlayerResultResultCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(SubmitPlayerResultResultCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal Result Result; // m_eResult enum EResult + internal ulong UllUniqueGameID; // ullUniqueGameID uint64 + internal ulong SteamIDPlayer; // steamIDPlayer class CSteamID + + // + // Easily convert from PackSmall to SubmitPlayerResultResultCallback_t + // + public static implicit operator SubmitPlayerResultResultCallback_t ( SubmitPlayerResultResultCallback_t.PackSmall d ) + { + return new SubmitPlayerResultResultCallback_t() + { + Result = d.Result, + UllUniqueGameID = d.UllUniqueGameID, + SteamIDPlayer = d.SteamIDPlayer, + }; + } + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 8 )] + internal struct EndGameResultCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamGameSearch + 15; + internal Result Result; // m_eResult enum EResult + internal ulong UllUniqueGameID; // ullUniqueGameID uint64 + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static EndGameResultCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (EndGameResultCallback_t) Marshal.PtrToStructure( p, typeof(EndGameResultCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(EndGameResultCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal Result Result; // m_eResult enum EResult + internal ulong UllUniqueGameID; // ullUniqueGameID uint64 + + // + // Easily convert from PackSmall to EndGameResultCallback_t + // + public static implicit operator EndGameResultCallback_t ( EndGameResultCallback_t.PackSmall d ) + { + return new EndGameResultCallback_t() + { + Result = d.Result, + UllUniqueGameID = d.UllUniqueGameID, + }; + } + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct JoinPartyCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamParties + 1; + internal Result Result; // m_eResult enum EResult + internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t + internal ulong SteamIDBeaconOwner; // m_SteamIDBeaconOwner class CSteamID + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + internal string ConnectString; // m_rgchConnectString char [256] + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static JoinPartyCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (JoinPartyCallback_t) Marshal.PtrToStructure( p, typeof(JoinPartyCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(JoinPartyCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal Result Result; // m_eResult enum EResult + internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t + internal ulong SteamIDBeaconOwner; // m_SteamIDBeaconOwner class CSteamID + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + internal string ConnectString; // m_rgchConnectString char [256] + + // + // Easily convert from PackSmall to JoinPartyCallback_t + // + public static implicit operator JoinPartyCallback_t ( JoinPartyCallback_t.PackSmall d ) + { + return new JoinPartyCallback_t() + { + Result = d.Result, + BeaconID = d.BeaconID, + SteamIDBeaconOwner = d.SteamIDBeaconOwner, + ConnectString = d.ConnectString, + }; + } + } + + internal static CallResult CallResult( Facepunch.Steamworks.BaseSteamworks steamworks, SteamAPICall_t call, Action CallbackFunction ) + { + return new CallResult( steamworks, call, CallbackFunction, FromPointer, StructSize(), CallbackId ); + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 8 )] + internal struct CreateBeaconCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamParties + 2; + internal Result Result; // m_eResult enum EResult + internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static CreateBeaconCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (CreateBeaconCallback_t) Marshal.PtrToStructure( p, typeof(CreateBeaconCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(CreateBeaconCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal Result Result; // m_eResult enum EResult + internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t + + // + // Easily convert from PackSmall to CreateBeaconCallback_t + // + public static implicit operator CreateBeaconCallback_t ( CreateBeaconCallback_t.PackSmall d ) + { + return new CreateBeaconCallback_t() + { + Result = d.Result, + BeaconID = d.BeaconID, + }; + } + } + + internal static CallResult CallResult( Facepunch.Steamworks.BaseSteamworks steamworks, SteamAPICall_t call, Action CallbackFunction ) + { + return new CallResult( steamworks, call, CallbackFunction, FromPointer, StructSize(), CallbackId ); + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct ReservationNotificationCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamParties + 3; + internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t + internal ulong SteamIDJoiner; // m_steamIDJoiner class CSteamID + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static ReservationNotificationCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (ReservationNotificationCallback_t) Marshal.PtrToStructure( p, typeof(ReservationNotificationCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(ReservationNotificationCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t + internal ulong SteamIDJoiner; // m_steamIDJoiner class CSteamID + + // + // Easily convert from PackSmall to ReservationNotificationCallback_t + // + public static implicit operator ReservationNotificationCallback_t ( ReservationNotificationCallback_t.PackSmall d ) + { + return new ReservationNotificationCallback_t() + { + BeaconID = d.BeaconID, + SteamIDJoiner = d.SteamIDJoiner, + }; + } + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 8 )] + internal struct ChangeNumOpenSlotsCallback_t + { + internal const int CallbackId = CallbackIdentifiers.SteamParties + 4; + internal Result Result; // m_eResult enum EResult + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static ChangeNumOpenSlotsCallback_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (ChangeNumOpenSlotsCallback_t) Marshal.PtrToStructure( p, typeof(ChangeNumOpenSlotsCallback_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(ChangeNumOpenSlotsCallback_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal Result Result; // m_eResult enum EResult + + // + // Easily convert from PackSmall to ChangeNumOpenSlotsCallback_t + // + public static implicit operator ChangeNumOpenSlotsCallback_t ( ChangeNumOpenSlotsCallback_t.PackSmall d ) + { + return new ChangeNumOpenSlotsCallback_t() + { + Result = d.Result, + }; + } + } + + internal static CallResult CallResult( Facepunch.Steamworks.BaseSteamworks steamworks, SteamAPICall_t call, Action CallbackFunction ) + { + return new CallResult( steamworks, call, CallbackFunction, FromPointer, StructSize(), CallbackId ); + } + + internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) + { + var handle = new CallbackHandle( steamworks ); + + // + // Create the functions we need for the vtable + // + if ( Facepunch.Steamworks.Config.UseThisCall ) + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); + var vTable = new Callback.VTableWinThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); + var vTable = new Callback.VTableThis + { + ResultA = OnResultThis, + ResultB = OnResultWithInfoThis, + GetSize = OnGetSizeThis, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + else + { + // + // Create the VTable by manually allocating the memory and copying across + // + if ( Platform.IsWindows ) + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); + var vTable = new Callback.VTableWin + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + else + { + handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); + var vTable = new Callback.VTable + { + ResultA = OnResult, + ResultB = OnResultWithInfo, + GetSize = OnGetSize, + }; + handle.FuncA = GCHandle.Alloc( vTable.ResultA ); + handle.FuncB = GCHandle.Alloc( vTable.ResultB ); + handle.FuncC = GCHandle.Alloc( vTable.GetSize ); + Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); + } + } + + // + // Create the callback object + // + var cb = new Callback(); + cb.vTablePtr = handle.vTablePtr; + cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; + cb.CallbackId = CallbackId; + + // + // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native + // + handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); + + // + // Register the callback with Steam + // + steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); + + steamworks.RegisterCallbackHandle( handle ); + } + + [MonoPInvokeCallback] + internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } + [MonoPInvokeCallback] + internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } + [MonoPInvokeCallback] + internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } + [MonoPInvokeCallback] + internal static int OnGetSize(){ return StructSize(); } + + [MonoPInvokeCallback] + internal static void OnResult( IntPtr param ) + { + OnResultWithInfo( param, false, 0 ); + } + + [MonoPInvokeCallback] + internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) + { + if ( failure ) return; + + var value = FromPointer( param ); + + if ( Facepunch.Steamworks.Client.Instance != null ) + Facepunch.Steamworks.Client.Instance.OnCallback( value ); + + if ( Facepunch.Steamworks.Server.Instance != null ) + Facepunch.Steamworks.Server.Instance.OnCallback( value ); + } + } + [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct SteamParamStringArray_t { @@ -16811,7 +18999,6 @@ internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.S [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct VolumeHasChanged_t { - internal const int CallbackId = CallbackIdentifiers.SteamMusic + 2; internal float NewVolume; // m_flNewVolume float // @@ -16848,138 +19035,11 @@ public static implicit operator VolumeHasChanged_t ( VolumeHasChanged_t.PackSma }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct MusicPlayerWantsShuffled_t { - internal const int CallbackId = CallbackIdentifiers.SteamMusicRemote + 9; [MarshalAs(UnmanagedType.I1)] internal bool Shuffled; // m_bShuffled _Bool @@ -17018,138 +19078,11 @@ public static implicit operator MusicPlayerWantsShuffled_t ( MusicPlayerWantsSh }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct MusicPlayerWantsLooped_t { - internal const int CallbackId = CallbackIdentifiers.SteamMusicRemote + 10; [MarshalAs(UnmanagedType.I1)] internal bool Looped; // m_bLooped _Bool @@ -17188,138 +19121,11 @@ public static implicit operator MusicPlayerWantsLooped_t ( MusicPlayerWantsLoop }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct MusicPlayerWantsVolume_t { - internal const int CallbackId = CallbackIdentifiers.SteamMusic + 11; internal float NewVolume; // m_flNewVolume float // @@ -17356,138 +19162,11 @@ public static implicit operator MusicPlayerWantsVolume_t ( MusicPlayerWantsVolu }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct MusicPlayerSelectsQueueEntry_t { - internal const int CallbackId = CallbackIdentifiers.SteamMusic + 12; internal int NID; // nID int // @@ -17524,138 +19203,11 @@ public static implicit operator MusicPlayerSelectsQueueEntry_t ( MusicPlayerSel }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct MusicPlayerSelectsPlaylistEntry_t { - internal const int CallbackId = CallbackIdentifiers.SteamMusic + 13; internal int NID; // nID int // @@ -17692,138 +19244,11 @@ public static implicit operator MusicPlayerSelectsPlaylistEntry_t ( MusicPlayer }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct MusicPlayerWantsPlayingRepeatStatus_t { - internal const int CallbackId = CallbackIdentifiers.SteamMusicRemote + 14; internal int PlayingRepeatStatus; // m_nPlayingRepeatStatus int // @@ -17860,132 +19285,6 @@ public static implicit operator MusicPlayerWantsPlayingRepeatStatus_t ( MusicPl }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] @@ -18518,174 +19817,6 @@ internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.S } } - [StructLayout( LayoutKind.Sequential, Pack = 8 )] - internal struct ControllerAnalogActionData_t - { - internal ControllerSourceMode EMode; // eMode enum EControllerSourceMode - internal float X; // x float - internal float Y; // y float - [MarshalAs(UnmanagedType.I1)] - internal bool BActive; // bActive _Bool - - // - // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. - // - internal static ControllerAnalogActionData_t FromPointer( IntPtr p ) - { - if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); - return (ControllerAnalogActionData_t) Marshal.PtrToStructure( p, typeof(ControllerAnalogActionData_t) ); - } - - // - // Get the size of the structure we're going to be using. - // - internal static int StructSize() - { - if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); - return System.Runtime.InteropServices.Marshal.SizeOf( typeof(ControllerAnalogActionData_t) ); - } - - [StructLayout( LayoutKind.Sequential, Pack = 4 )] - internal struct PackSmall - { - internal ControllerSourceMode EMode; // eMode enum EControllerSourceMode - internal float X; // x float - internal float Y; // y float - [MarshalAs(UnmanagedType.I1)] - internal bool BActive; // bActive _Bool - - // - // Easily convert from PackSmall to ControllerAnalogActionData_t - // - public static implicit operator ControllerAnalogActionData_t ( ControllerAnalogActionData_t.PackSmall d ) - { - return new ControllerAnalogActionData_t() - { - EMode = d.EMode, - X = d.X, - Y = d.Y, - BActive = d.BActive, - }; - } - } - } - - [StructLayout( LayoutKind.Sequential, Pack = 8 )] - internal struct ControllerDigitalActionData_t - { - [MarshalAs(UnmanagedType.I1)] - internal bool BState; // bState _Bool - [MarshalAs(UnmanagedType.I1)] - internal bool BActive; // bActive _Bool - - // - // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. - // - internal static ControllerDigitalActionData_t FromPointer( IntPtr p ) - { - if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); - return (ControllerDigitalActionData_t) Marshal.PtrToStructure( p, typeof(ControllerDigitalActionData_t) ); - } - - // - // Get the size of the structure we're going to be using. - // - internal static int StructSize() - { - if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); - return System.Runtime.InteropServices.Marshal.SizeOf( typeof(ControllerDigitalActionData_t) ); - } - - [StructLayout( LayoutKind.Sequential, Pack = 4 )] - internal struct PackSmall - { - [MarshalAs(UnmanagedType.I1)] - internal bool BState; // bState _Bool - [MarshalAs(UnmanagedType.I1)] - internal bool BActive; // bActive _Bool - - // - // Easily convert from PackSmall to ControllerDigitalActionData_t - // - public static implicit operator ControllerDigitalActionData_t ( ControllerDigitalActionData_t.PackSmall d ) - { - return new ControllerDigitalActionData_t() - { - BState = d.BState, - BActive = d.BActive, - }; - } - } - } - - [StructLayout( LayoutKind.Sequential, Pack = 8 )] - internal struct ControllerMotionData_t - { - internal float RotQuatX; // rotQuatX float - internal float RotQuatY; // rotQuatY float - internal float RotQuatZ; // rotQuatZ float - internal float RotQuatW; // rotQuatW float - internal float PosAccelX; // posAccelX float - internal float PosAccelY; // posAccelY float - internal float PosAccelZ; // posAccelZ float - internal float RotVelX; // rotVelX float - internal float RotVelY; // rotVelY float - internal float RotVelZ; // rotVelZ float - - // - // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. - // - internal static ControllerMotionData_t FromPointer( IntPtr p ) - { - if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); - return (ControllerMotionData_t) Marshal.PtrToStructure( p, typeof(ControllerMotionData_t) ); - } - - // - // Get the size of the structure we're going to be using. - // - internal static int StructSize() - { - if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); - return System.Runtime.InteropServices.Marshal.SizeOf( typeof(ControllerMotionData_t) ); - } - - [StructLayout( LayoutKind.Sequential, Pack = 4 )] - internal struct PackSmall - { - internal float RotQuatX; // rotQuatX float - internal float RotQuatY; // rotQuatY float - internal float RotQuatZ; // rotQuatZ float - internal float RotQuatW; // rotQuatW float - internal float PosAccelX; // posAccelX float - internal float PosAccelY; // posAccelY float - internal float PosAccelZ; // posAccelZ float - internal float RotVelX; // rotVelX float - internal float RotVelY; // rotVelY float - internal float RotVelZ; // rotVelZ float - - // - // Easily convert from PackSmall to ControllerMotionData_t - // - public static implicit operator ControllerMotionData_t ( ControllerMotionData_t.PackSmall d ) - { - return new ControllerMotionData_t() - { - RotQuatX = d.RotQuatX, - RotQuatY = d.RotQuatY, - RotQuatZ = d.RotQuatZ, - RotQuatW = d.RotQuatW, - PosAccelX = d.PosAccelX, - PosAccelY = d.PosAccelY, - PosAccelZ = d.PosAccelZ, - RotVelX = d.RotVelX, - RotVelY = d.RotVelY, - RotVelZ = d.RotVelZ, - }; - } - } - } - [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct SteamUGCDetails_t { @@ -18828,6 +19959,8 @@ internal struct SteamUGCQueryCompleted_t internal uint TotalMatchingResults; // m_unTotalMatchingResults uint32 [MarshalAs(UnmanagedType.I1)] internal bool CachedData; // m_bCachedData _Bool + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + internal string NextCursor; // m_rgchNextCursor char [256] // // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. @@ -18856,6 +19989,8 @@ internal struct PackSmall internal uint TotalMatchingResults; // m_unTotalMatchingResults uint32 [MarshalAs(UnmanagedType.I1)] internal bool CachedData; // m_bCachedData _Bool + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + internal string NextCursor; // m_rgchNextCursor char [256] // // Easily convert from PackSmall to SteamUGCQueryCompleted_t @@ -18869,6 +20004,7 @@ public static implicit operator SteamUGCQueryCompleted_t ( SteamUGCQueryComplet NumResultsReturned = d.NumResultsReturned, TotalMatchingResults = d.TotalMatchingResults, CachedData = d.CachedData, + NextCursor = d.NextCursor, }; } } @@ -21695,7 +22831,6 @@ internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.S [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct SteamAppInstalled_t { - internal const int CallbackId = CallbackIdentifiers.SteamAppList + 1; internal uint AppID; // m_nAppID AppId_t // @@ -21732,138 +22867,11 @@ public static implicit operator SteamAppInstalled_t ( SteamAppInstalled_t.PackS }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct SteamAppUninstalled_t { - internal const int CallbackId = CallbackIdentifiers.SteamAppList + 2; internal uint AppID; // m_nAppID AppId_t // @@ -21900,138 +22908,11 @@ public static implicit operator SteamAppUninstalled_t ( SteamAppUninstalled_t.P }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_BrowserReady_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 1; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser // @@ -22073,132 +22954,6 @@ internal static CallResult CallResult( Facepunch.Steamworks { return new CallResult( steamworks, call, CallbackFunction, FromPointer, StructSize(), CallbackId ); } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] @@ -22374,7 +23129,6 @@ public static implicit operator HTML_CloseBrowser_t ( HTML_CloseBrowser_t.PackS [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_URLChanged_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 5; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchURL; // pchURL const char * internal string PchPostData; // pchPostData const char * @@ -22430,138 +23184,11 @@ public static implicit operator HTML_URLChanged_t ( HTML_URLChanged_t.PackSmall }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_FinishedRequest_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 6; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchURL; // pchURL const char * internal string PchPageTitle; // pchPageTitle const char * @@ -22604,138 +23231,11 @@ public static implicit operator HTML_FinishedRequest_t ( HTML_FinishedRequest_t }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_OpenLinkInNewTab_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 7; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchURL; // pchURL const char * @@ -22775,138 +23275,11 @@ public static implicit operator HTML_OpenLinkInNewTab_t ( HTML_OpenLinkInNewTab }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_ChangedTitle_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 8; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchTitle; // pchTitle const char * @@ -22946,138 +23319,11 @@ public static implicit operator HTML_ChangedTitle_t ( HTML_ChangedTitle_t.PackS }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_SearchResults_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 9; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal uint UnResults; // unResults uint32 internal uint UnCurrentMatch; // unCurrentMatch uint32 @@ -23120,138 +23366,11 @@ public static implicit operator HTML_SearchResults_t ( HTML_SearchResults_t.Pac }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_CanGoBackAndForward_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 10; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser [MarshalAs(UnmanagedType.I1)] internal bool BCanGoBack; // bCanGoBack _Bool @@ -23298,138 +23417,11 @@ public static implicit operator HTML_CanGoBackAndForward_t ( HTML_CanGoBackAndF }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_HorizontalScroll_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 11; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal uint UnScrollMax; // unScrollMax uint32 internal uint UnScrollCurrent; // unScrollCurrent uint32 @@ -23483,138 +23475,11 @@ public static implicit operator HTML_HorizontalScroll_t ( HTML_HorizontalScroll }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_VerticalScroll_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 12; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal uint UnScrollMax; // unScrollMax uint32 internal uint UnScrollCurrent; // unScrollCurrent uint32 @@ -23668,138 +23533,11 @@ public static implicit operator HTML_VerticalScroll_t ( HTML_VerticalScroll_t.P }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_LinkAtPosition_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 13; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal uint X; // x uint32 internal uint Y; // y uint32 @@ -23855,138 +23593,11 @@ public static implicit operator HTML_LinkAtPosition_t ( HTML_LinkAtPosition_t.P }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_JSAlert_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 14; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchMessage; // pchMessage const char * @@ -24026,138 +23637,11 @@ public static implicit operator HTML_JSAlert_t ( HTML_JSAlert_t.PackSmall d ) }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_JSConfirm_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 15; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchMessage; // pchMessage const char * @@ -24197,138 +23681,11 @@ public static implicit operator HTML_JSConfirm_t ( HTML_JSConfirm_t.PackSmall d }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_FileOpenDialog_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 16; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchTitle; // pchTitle const char * internal string PchInitialFile; // pchInitialFile const char * @@ -24371,145 +23728,18 @@ public static implicit operator HTML_FileOpenDialog_t ( HTML_FileOpenDialog_t.P }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_NewWindow_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 21; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchURL; // pchURL const char * internal uint UnX; // unX uint32 internal uint UnY; // unY uint32 internal uint UnWide; // unWide uint32 internal uint UnTall; // unTall uint32 - internal uint UnNewWindow_BrowserHandle; // unNewWindow_BrowserHandle HHTMLBrowser + internal uint UnNewWindow_BrowserHandle_IGNORE; // unNewWindow_BrowserHandle_IGNORE HHTMLBrowser // // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. @@ -24538,7 +23768,7 @@ internal struct PackSmall internal uint UnY; // unY uint32 internal uint UnWide; // unWide uint32 internal uint UnTall; // unTall uint32 - internal uint UnNewWindow_BrowserHandle; // unNewWindow_BrowserHandle HHTMLBrowser + internal uint UnNewWindow_BrowserHandle_IGNORE; // unNewWindow_BrowserHandle_IGNORE HHTMLBrowser // // Easily convert from PackSmall to HTML_NewWindow_t @@ -24553,142 +23783,15 @@ public static implicit operator HTML_NewWindow_t ( HTML_NewWindow_t.PackSmall d UnY = d.UnY, UnWide = d.UnWide, UnTall = d.UnTall, - UnNewWindow_BrowserHandle = d.UnNewWindow_BrowserHandle, + UnNewWindow_BrowserHandle_IGNORE = d.UnNewWindow_BrowserHandle_IGNORE, }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_SetCursor_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 22; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal uint EMouseCursor; // eMouseCursor uint32 @@ -24728,138 +23831,11 @@ public static implicit operator HTML_SetCursor_t ( HTML_SetCursor_t.PackSmall d }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_StatusText_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 23; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchMsg; // pchMsg const char * @@ -24899,138 +23875,11 @@ public static implicit operator HTML_StatusText_t ( HTML_StatusText_t.PackSmall }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_ShowToolTip_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 24; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchMsg; // pchMsg const char * @@ -25070,138 +23919,11 @@ public static implicit operator HTML_ShowToolTip_t ( HTML_ShowToolTip_t.PackSma }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_UpdateToolTip_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 25; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal string PchMsg; // pchMsg const char * @@ -25241,138 +23963,11 @@ public static implicit operator HTML_UpdateToolTip_t ( HTML_UpdateToolTip_t.Pac }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_HideToolTip_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 26; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser // @@ -25409,138 +24004,11 @@ public static implicit operator HTML_HideToolTip_t ( HTML_HideToolTip_t.PackSma }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct HTML_BrowserRestarted_t { - internal const int CallbackId = CallbackIdentifiers.SteamHTMLSurface + 27; internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser internal uint UnOldBrowserHandle; // unOldBrowserHandle HHTMLBrowser @@ -25580,132 +24048,6 @@ public static implicit operator HTML_BrowserRestarted_t ( HTML_BrowserRestarted }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] @@ -26641,7 +24983,6 @@ internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.S [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct BroadcastUploadStop_t { - internal const int CallbackId = CallbackIdentifiers.ClientVideo + 5; internal BroadcastUploadResult Result; // m_eResult enum EBroadcastUploadResult // @@ -26678,138 +25019,11 @@ public static implicit operator BroadcastUploadStop_t ( BroadcastUploadStop_t.P }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct GetVideoURLResult_t { - internal const int CallbackId = CallbackIdentifiers.ClientVideo + 11; internal Result Result; // m_eResult enum EResult internal uint VideoAppID; // m_unVideoAppID AppId_t [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] @@ -26854,138 +25068,11 @@ public static implicit operator GetVideoURLResult_t ( GetVideoURLResult_t.PackS }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct GetOPFSettingsResult_t { - internal const int CallbackId = CallbackIdentifiers.ClientVideo + 24; internal Result Result; // m_eResult enum EResult internal uint VideoAppID; // m_unVideoAppID AppId_t @@ -27025,132 +25112,6 @@ public static implicit operator GetOPFSettingsResult_t ( GetOPFSettingsResult_t }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 4 )] @@ -29617,6 +27578,162 @@ internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.S } } + [StructLayout( LayoutKind.Sequential, Pack = 8 )] + internal struct InputAnalogActionData_t + { + internal InputSourceMode EMode; // eMode EInputSourceMode + internal float X; // x float + internal float Y; // y float + [MarshalAs(UnmanagedType.I1)] + internal bool BActive; // bActive bool + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static InputAnalogActionData_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (InputAnalogActionData_t) Marshal.PtrToStructure( p, typeof(InputAnalogActionData_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(InputAnalogActionData_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal InputSourceMode EMode; // eMode EInputSourceMode + internal float X; // x float + internal float Y; // y float + [MarshalAs(UnmanagedType.I1)] + internal bool BActive; // bActive bool + + // + // Easily convert from PackSmall to InputAnalogActionData_t + // + public static implicit operator InputAnalogActionData_t ( InputAnalogActionData_t.PackSmall d ) + { + return new InputAnalogActionData_t() + { + EMode = d.EMode, + X = d.X, + Y = d.Y, + BActive = d.BActive, + }; + } + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 8 )] + internal struct InputMotionData_t + { + internal InputSourceMode EMode; // eMode EInputSourceMode + internal float X; // x float + internal float Y; // y float + [MarshalAs(UnmanagedType.I1)] + internal bool BActive; // bActive bool + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static InputMotionData_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (InputMotionData_t) Marshal.PtrToStructure( p, typeof(InputMotionData_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(InputMotionData_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal InputSourceMode EMode; // eMode EInputSourceMode + internal float X; // x float + internal float Y; // y float + [MarshalAs(UnmanagedType.I1)] + internal bool BActive; // bActive bool + + // + // Easily convert from PackSmall to InputMotionData_t + // + public static implicit operator InputMotionData_t ( InputMotionData_t.PackSmall d ) + { + return new InputMotionData_t() + { + EMode = d.EMode, + X = d.X, + Y = d.Y, + BActive = d.BActive, + }; + } + } + } + + [StructLayout( LayoutKind.Sequential, Pack = 8 )] + internal struct InputDigitalActionData_t + { + internal InputSourceMode EMode; // eMode EInputSourceMode + internal float X; // x float + internal float Y; // y float + [MarshalAs(UnmanagedType.I1)] + internal bool BActive; // bActive bool + + // + // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. + // + internal static InputDigitalActionData_t FromPointer( IntPtr p ) + { + if ( Platform.PackSmall ) return (PackSmall) Marshal.PtrToStructure( p, typeof(PackSmall) ); + return (InputDigitalActionData_t) Marshal.PtrToStructure( p, typeof(InputDigitalActionData_t) ); + } + + // + // Get the size of the structure we're going to be using. + // + internal static int StructSize() + { + if ( Platform.PackSmall ) return System.Runtime.InteropServices.Marshal.SizeOf( typeof(PackSmall) ); + return System.Runtime.InteropServices.Marshal.SizeOf( typeof(InputDigitalActionData_t) ); + } + + [StructLayout( LayoutKind.Sequential, Pack = 4 )] + internal struct PackSmall + { + internal InputSourceMode EMode; // eMode EInputSourceMode + internal float X; // x float + internal float Y; // y float + [MarshalAs(UnmanagedType.I1)] + internal bool BActive; // bActive bool + + // + // Easily convert from PackSmall to InputDigitalActionData_t + // + public static implicit operator InputDigitalActionData_t ( InputDigitalActionData_t.PackSmall d ) + { + return new InputDigitalActionData_t() + { + EMode = d.EMode, + X = d.X, + Y = d.Y, + BActive = d.BActive, + }; + } + } + } + [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct SteamInventoryDefinitionUpdate_t { @@ -30115,7 +28232,6 @@ internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.S [StructLayout( LayoutKind.Sequential, Pack = 8 )] internal struct NewLaunchQueryParameters_t { - internal const int CallbackId = CallbackIdentifiers.SteamApps + 14; // // Read this struct from a pointer, usually from Native. It will automatically do the awesome stuff. @@ -30149,132 +28265,6 @@ public static implicit operator NewLaunchQueryParameters_t ( NewLaunchQueryPara }; } } - - internal static void Register( Facepunch.Steamworks.BaseSteamworks steamworks ) - { - var handle = new CallbackHandle( steamworks ); - - // - // Create the functions we need for the vtable - // - if ( Facepunch.Steamworks.Config.UseThisCall ) - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWinThis ) ) ); - var vTable = new Callback.VTableWinThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableThis ) ) ); - var vTable = new Callback.VTableThis - { - ResultA = OnResultThis, - ResultB = OnResultWithInfoThis, - GetSize = OnGetSizeThis, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - else - { - // - // Create the VTable by manually allocating the memory and copying across - // - if ( Platform.IsWindows ) - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTableWin ) ) ); - var vTable = new Callback.VTableWin - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - else - { - handle.vTablePtr = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( Callback.VTable ) ) ); - var vTable = new Callback.VTable - { - ResultA = OnResult, - ResultB = OnResultWithInfo, - GetSize = OnGetSize, - }; - handle.FuncA = GCHandle.Alloc( vTable.ResultA ); - handle.FuncB = GCHandle.Alloc( vTable.ResultB ); - handle.FuncC = GCHandle.Alloc( vTable.GetSize ); - Marshal.StructureToPtr( vTable, handle.vTablePtr, false ); - } - } - - // - // Create the callback object - // - var cb = new Callback(); - cb.vTablePtr = handle.vTablePtr; - cb.CallbackFlags = steamworks.IsGameServer ? (byte) SteamNative.Callback.Flags.GameServer : (byte) 0; - cb.CallbackId = CallbackId; - - // - // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native - // - handle.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned ); - - // - // Register the callback with Steam - // - steamworks.native.api.SteamAPI_RegisterCallback( handle.PinnedCallback.AddrOfPinnedObject(), CallbackId ); - - steamworks.RegisterCallbackHandle( handle ); - } - - [MonoPInvokeCallback] - internal static void OnResultThis( IntPtr self, IntPtr param ){ OnResult( param ); } - [MonoPInvokeCallback] - internal static void OnResultWithInfoThis( IntPtr self, IntPtr param, bool failure, SteamNative.SteamAPICall_t call ){ OnResultWithInfo( param, failure, call ); } - [MonoPInvokeCallback] - internal static int OnGetSizeThis( IntPtr self ){ return OnGetSize(); } - [MonoPInvokeCallback] - internal static int OnGetSize(){ return StructSize(); } - - [MonoPInvokeCallback] - internal static void OnResult( IntPtr param ) - { - OnResultWithInfo( param, false, 0 ); - } - - [MonoPInvokeCallback] - internal static void OnResultWithInfo( IntPtr param, bool failure, SteamNative.SteamAPICall_t call ) - { - if ( failure ) return; - - var value = FromPointer( param ); - - if ( Facepunch.Steamworks.Client.Instance != null ) - Facepunch.Steamworks.Client.Instance.OnCallback( value ); - - if ( Facepunch.Steamworks.Server.Instance != null ) - Facepunch.Steamworks.Server.Instance.OnCallback( value ); - } } [StructLayout( LayoutKind.Sequential, Pack = 8 )] @@ -31451,6 +29441,7 @@ internal static void RegisterCallbacks( Facepunch.Steamworks.BaseSteamworks stea GetAuthSessionTicketResponse_t.Register( steamworks ); GameWebCallback_t.Register( steamworks ); StoreAuthURLResponse_t.Register( steamworks ); + MarketEligibilityResponse_t.Register( steamworks ); PersonaStateChange_t.Register( steamworks ); GameOverlayActivated_t.Register( steamworks ); GameServerChangeRequested_t.Register( steamworks ); @@ -31485,6 +29476,17 @@ internal static void RegisterCallbacks( Facepunch.Steamworks.BaseSteamworks stea LobbyCreated_t.Register( steamworks ); PSNGameBootInviteResult_t.Register( steamworks ); FavoritesListAccountsUpdated_t.Register( steamworks ); + SearchForGameProgressCallback_t.Register( steamworks ); + SearchForGameResultCallback_t.Register( steamworks ); + RequestPlayersForGameProgressCallback_t.Register( steamworks ); + RequestPlayersForGameResultCallback_t.Register( steamworks ); + RequestPlayersForGameFinalResultCallback_t.Register( steamworks ); + SubmitPlayerResultResultCallback_t.Register( steamworks ); + EndGameResultCallback_t.Register( steamworks ); + JoinPartyCallback_t.Register( steamworks ); + CreateBeaconCallback_t.Register( steamworks ); + ReservationNotificationCallback_t.Register( steamworks ); + ChangeNumOpenSlotsCallback_t.Register( steamworks ); RemoteStorageAppSyncedClient_t.Register( steamworks ); RemoteStorageAppSyncedServer_t.Register( steamworks ); RemoteStorageAppSyncProgress_t.Register( steamworks ); @@ -31534,13 +29536,6 @@ internal static void RegisterCallbacks( Facepunch.Steamworks.BaseSteamworks stea P2PSessionConnectFail_t.Register( steamworks ); SocketStatusCallback_t.Register( steamworks ); ScreenshotReady_t.Register( steamworks ); - VolumeHasChanged_t.Register( steamworks ); - MusicPlayerWantsShuffled_t.Register( steamworks ); - MusicPlayerWantsLooped_t.Register( steamworks ); - MusicPlayerWantsVolume_t.Register( steamworks ); - MusicPlayerSelectsQueueEntry_t.Register( steamworks ); - MusicPlayerSelectsPlaylistEntry_t.Register( steamworks ); - MusicPlayerWantsPlayingRepeatStatus_t.Register( steamworks ); HTTPRequestCompleted_t.Register( steamworks ); HTTPRequestHeadersReceived_t.Register( steamworks ); HTTPRequestDataReceived_t.Register( steamworks ); @@ -31560,36 +29555,11 @@ internal static void RegisterCallbacks( Facepunch.Steamworks.BaseSteamworks stea RemoveAppDependencyResult_t.Register( steamworks ); GetAppDependenciesResult_t.Register( steamworks ); DeleteItemResult_t.Register( steamworks ); - SteamAppInstalled_t.Register( steamworks ); - SteamAppUninstalled_t.Register( steamworks ); - HTML_BrowserReady_t.Register( steamworks ); - HTML_URLChanged_t.Register( steamworks ); - HTML_FinishedRequest_t.Register( steamworks ); - HTML_OpenLinkInNewTab_t.Register( steamworks ); - HTML_ChangedTitle_t.Register( steamworks ); - HTML_SearchResults_t.Register( steamworks ); - HTML_CanGoBackAndForward_t.Register( steamworks ); - HTML_HorizontalScroll_t.Register( steamworks ); - HTML_VerticalScroll_t.Register( steamworks ); - HTML_LinkAtPosition_t.Register( steamworks ); - HTML_JSAlert_t.Register( steamworks ); - HTML_JSConfirm_t.Register( steamworks ); - HTML_FileOpenDialog_t.Register( steamworks ); - HTML_NewWindow_t.Register( steamworks ); - HTML_SetCursor_t.Register( steamworks ); - HTML_StatusText_t.Register( steamworks ); - HTML_ShowToolTip_t.Register( steamworks ); - HTML_UpdateToolTip_t.Register( steamworks ); - HTML_HideToolTip_t.Register( steamworks ); - HTML_BrowserRestarted_t.Register( steamworks ); SteamInventoryResultReady_t.Register( steamworks ); SteamInventoryFullUpdate_t.Register( steamworks ); SteamInventoryEligiblePromoItemDefIDs_t.Register( steamworks ); SteamInventoryStartPurchaseResult_t.Register( steamworks ); SteamInventoryRequestPricesResult_t.Register( steamworks ); - BroadcastUploadStop_t.Register( steamworks ); - GetVideoURLResult_t.Register( steamworks ); - GetOPFSettingsResult_t.Register( steamworks ); GSClientApprove_t.Register( steamworks ); GSClientDeny_t.Register( steamworks ); GSClientKick_t.Register( steamworks ); @@ -31607,7 +29577,6 @@ internal static void RegisterCallbacks( Facepunch.Steamworks.BaseSteamworks stea SteamInventoryDefinitionUpdate_t.Register( steamworks ); SteamParentalSettingsChanged_t.Register( steamworks ); SteamServersConnected_t.Register( steamworks ); - NewLaunchQueryParameters_t.Register( steamworks ); GCMessageAvailable_t.Register( steamworks ); GCMessageFailed_t.Register( steamworks ); ScreenshotRequested_t.Register( steamworks ); diff --git a/Facepunch.Steamworks/SteamNative/SteamNative.Types.cs b/Facepunch.Steamworks/SteamNative/SteamNative.Types.cs index 4cbb9d3..ebccc7d 100644 --- a/Facepunch.Steamworks/SteamNative/SteamNative.Types.cs +++ b/Facepunch.Steamworks/SteamNative/SteamNative.Types.cs @@ -244,6 +244,21 @@ public static implicit operator ulong( SiteId_t value ) } } + internal struct PartyBeaconID_t + { + public ulong Value; + + public static implicit operator PartyBeaconID_t( ulong value ) + { + return new PartyBeaconID_t(){ Value = value }; + } + + public static implicit operator ulong( PartyBeaconID_t value ) + { + return value.Value; + } + } + internal struct HAuthTicket { public uint Value; @@ -514,6 +529,66 @@ public static implicit operator uint( HTTPCookieContainerHandle value ) } } + internal struct InputHandle_t + { + public ulong Value; + + public static implicit operator InputHandle_t( ulong value ) + { + return new InputHandle_t(){ Value = value }; + } + + public static implicit operator ulong( InputHandle_t value ) + { + return value.Value; + } + } + + internal struct InputActionSetHandle_t + { + public ulong Value; + + public static implicit operator InputActionSetHandle_t( ulong value ) + { + return new InputActionSetHandle_t(){ Value = value }; + } + + public static implicit operator ulong( InputActionSetHandle_t value ) + { + return value.Value; + } + } + + internal struct InputDigitalActionHandle_t + { + public ulong Value; + + public static implicit operator InputDigitalActionHandle_t( ulong value ) + { + return new InputDigitalActionHandle_t(){ Value = value }; + } + + public static implicit operator ulong( InputDigitalActionHandle_t value ) + { + return value.Value; + } + } + + internal struct InputAnalogActionHandle_t + { + public ulong Value; + + public static implicit operator InputAnalogActionHandle_t( ulong value ) + { + return new InputAnalogActionHandle_t(){ Value = value }; + } + + public static implicit operator ulong( InputAnalogActionHandle_t value ) + { + return value.Value; + } + } + internal struct ControllerHandle_t { public ulong Value; diff --git a/Generator/CodeWriter/Struct.cs b/Generator/CodeWriter/Struct.cs index a79ecad..d247c87 100644 --- a/Generator/CodeWriter/Struct.cs +++ b/Generator/CodeWriter/Struct.cs @@ -27,8 +27,9 @@ public class TypeDef "CCallResult", "CCallback", "ValvePackingSentinel_t", - "CCallbackBase" - }; + "CCallbackBase", + "CSteamGameServerAPIContext" + }; public readonly static string[] ForceLargePackStructs = new string[] { diff --git a/Generator/steam_api_missing.json b/Generator/steam_api_missing.json index 642d738..eb03a78 100644 --- a/Generator/steam_api_missing.json +++ b/Generator/steam_api_missing.json @@ -16,6 +16,74 @@ ] }, + { + "struct": "InputAnalogActionData_t", + "fields": + [ + { + "fieldname": "eMode", + "fieldtype": "EInputSourceMode" + }, + { + "fieldname": "x", + "fieldtype": "float" + }, + { + "fieldname": "y", + "fieldtype": "float" + }, + { + "fieldname": "bActive", + "fieldtype": "bool" + } + ] + }, + + { + "struct": "InputMotionData_t", + "fields": + [ + { + "fieldname": "eMode", + "fieldtype": "EInputSourceMode" + }, + { + "fieldname": "x", + "fieldtype": "float" + }, + { + "fieldname": "y", + "fieldtype": "float" + }, + { + "fieldname": "bActive", + "fieldtype": "bool" + } + ] + }, + + { + "struct": "InputDigitalActionData_t", + "fields": + [ + { + "fieldname": "eMode", + "fieldtype": "EInputSourceMode" + }, + { + "fieldname": "x", + "fieldtype": "float" + }, + { + "fieldname": "y", + "fieldtype": "float" + }, + { + "fieldname": "bActive", + "fieldtype": "bool" + } + ] + }, { "struct": "SteamInventoryDefinitionUpdate_t" diff --git a/Generator/steam_sdk/steam_api.json b/Generator/steam_sdk/steam_api.json index 43de069..163ad17 100644 --- a/Generator/steam_sdk/steam_api.json +++ b/Generator/steam_sdk/steam_api.json @@ -2072,8 +2072,11 @@ { "fieldname": "m_ullSearchID", "fieldtype": "uint64"}, { "fieldname": "m_SteamIDPlayerFound", "fieldtype": "class CSteamID"}, { "fieldname": "m_SteamIDLobby", "fieldtype": "class CSteamID"}, -{ "fieldname": "m_ePlayerAcceptState", "fieldtype": "enum RequestPlayersForGameResultCallback_t::PlayerAcceptState_t"}, -{ "fieldname": "m_nPlayerIndex", "fieldtype": "int32"}, +{ "fieldname": "m_ePlayerAcceptState", "fieldtype": "PlayerAcceptState_t"}, + { + "fieldname": "m_nPlayerIndex", + "fieldtype": "int32" + }, { "fieldname": "m_nTotalPlayersFound", "fieldtype": "int32"}, { "fieldname": "m_nTotalPlayersAcceptedGame", "fieldtype": "int32"}, { "fieldname": "m_nSuggestedTeamIndex", "fieldtype": "int32"},