SteamStructs.cs 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. // This file is provided under The MIT License as part of Steamworks.NET.
  2. // Copyright (c) 2013-2019 Riley Labrecque
  3. // Please see the included LICENSE.txt for additional information.
  4. // This file is automatically generated.
  5. // Changes to this file will be reverted when you update Steamworks.NET
  6. #if UNITY_ANDROID || UNITY_IOS || UNITY_TIZEN || UNITY_TVOS || UNITY_WEBGL || UNITY_WSA || UNITY_PS4 || UNITY_WII || UNITY_XBOXONE || UNITY_SWITCH
  7. #define DISABLESTEAMWORKS
  8. #endif
  9. #if !DISABLESTEAMWORKS
  10. using System.Runtime.InteropServices;
  11. using IntPtr = System.IntPtr;
  12. namespace Steamworks {
  13. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  14. public struct ControllerAnalogActionData_t {
  15. // Type of data coming from this action, this will match what got specified in the action set
  16. public EControllerSourceMode eMode;
  17. // The current state of this action; will be delta updates for mouse actions
  18. public float x, y;
  19. // Whether or not this action is currently available to be bound in the active action set
  20. public byte bActive;
  21. }
  22. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  23. public struct ControllerDigitalActionData_t {
  24. // The current state of this action; will be true if currently pressed
  25. public byte bState;
  26. // Whether or not this action is currently available to be bound in the active action set
  27. public byte bActive;
  28. }
  29. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
  30. public struct ControllerMotionData_t {
  31. // Sensor-fused absolute rotation; will drift in heading
  32. public float rotQuatX;
  33. public float rotQuatY;
  34. public float rotQuatZ;
  35. public float rotQuatW;
  36. // Positional acceleration
  37. public float posAccelX;
  38. public float posAccelY;
  39. public float posAccelZ;
  40. // Angular velocity
  41. public float rotVelX;
  42. public float rotVelY;
  43. public float rotVelZ;
  44. }
  45. // friend game played information
  46. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
  47. public struct FriendGameInfo_t {
  48. public CGameID m_gameID;
  49. public uint m_unGameIP;
  50. public ushort m_usGamePort;
  51. public ushort m_usQueryPort;
  52. public CSteamID m_steamIDLobby;
  53. }
  54. //-----------------------------------------------------------------------------
  55. // Purpose: information about user sessions
  56. //-----------------------------------------------------------------------------
  57. public struct FriendSessionStateInfo_t {
  58. public uint m_uiOnlineSessionInstances;
  59. public byte m_uiPublishedToFriendsSessionInstance;
  60. }
  61. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  62. public struct InputAnalogActionData_t {
  63. // Type of data coming from this action, this will match what got specified in the action set
  64. public EInputSourceMode eMode;
  65. // The current state of this action; will be delta updates for mouse actions
  66. public float x, y;
  67. // Whether or not this action is currently available to be bound in the active action set
  68. public byte bActive;
  69. }
  70. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  71. public struct InputDigitalActionData_t {
  72. // The current state of this action; will be true if currently pressed
  73. public byte bState;
  74. // Whether or not this action is currently available to be bound in the active action set
  75. public byte bActive;
  76. }
  77. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
  78. public struct InputMotionData_t {
  79. // Sensor-fused absolute rotation; will drift in heading
  80. public float rotQuatX;
  81. public float rotQuatY;
  82. public float rotQuatZ;
  83. public float rotQuatW;
  84. // Positional acceleration
  85. public float posAccelX;
  86. public float posAccelY;
  87. public float posAccelZ;
  88. // Angular velocity
  89. public float rotVelX;
  90. public float rotVelY;
  91. public float rotVelZ;
  92. }
  93. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
  94. public struct SteamItemDetails_t {
  95. public SteamItemInstanceID_t m_itemId;
  96. public SteamItemDef_t m_iDefinition;
  97. public ushort m_unQuantity;
  98. public ushort m_unFlags; // see ESteamItemFlags
  99. }
  100. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
  101. public struct SteamPartyBeaconLocation_t {
  102. public ESteamPartyBeaconLocationType m_eType;
  103. public ulong m_ulLocationID;
  104. }
  105. // connection state to a specified user, returned by GetP2PSessionState()
  106. // this is under-the-hood info about what's going on with a SendP2PPacket(), shouldn't be needed except for debuggin
  107. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
  108. public struct P2PSessionState_t {
  109. public byte m_bConnectionActive; // true if we've got an active open connection
  110. public byte m_bConnecting; // true if we're currently trying to establish a connection
  111. public byte m_eP2PSessionError; // last error recorded (see enum above)
  112. public byte m_bUsingRelay; // true if it's going through a relay server (TURN)
  113. public int m_nBytesQueuedForSend;
  114. public int m_nPacketsQueuedForSend;
  115. public uint m_nRemoteIP; // potential IP:Port of remote host. Could be TURN server.
  116. public ushort m_nRemotePort; // Only exists for compatibility with older authentication api's
  117. }
  118. //-----------------------------------------------------------------------------
  119. // Purpose: Structure that contains an array of const char * strings and the number of those strings
  120. //-----------------------------------------------------------------------------
  121. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
  122. public struct SteamParamStringArray_t {
  123. public IntPtr m_ppStrings;
  124. public int m_nNumStrings;
  125. }
  126. // Details for a single published file/UGC
  127. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
  128. public struct SteamUGCDetails_t {
  129. public PublishedFileId_t m_nPublishedFileId;
  130. public EResult m_eResult; // The result of the operation.
  131. public EWorkshopFileType m_eFileType; // Type of the file
  132. public AppId_t m_nCreatorAppID; // ID of the app that created this file.
  133. public AppId_t m_nConsumerAppID; // ID of the app that will consume this file.
  134. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Constants.k_cchPublishedDocumentTitleMax)]
  135. public string m_rgchTitle; // title of document
  136. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Constants.k_cchPublishedDocumentDescriptionMax)]
  137. public string m_rgchDescription; // description of document
  138. public ulong m_ulSteamIDOwner; // Steam ID of the user who created this content.
  139. public uint m_rtimeCreated; // time when the published file was created
  140. public uint m_rtimeUpdated; // time when the published file was last updated
  141. public uint m_rtimeAddedToUserList; // time when the user added the published file to their list (not always applicable)
  142. public ERemoteStoragePublishedFileVisibility m_eVisibility; // visibility
  143. [MarshalAs(UnmanagedType.I1)]
  144. public bool m_bBanned; // whether the file was banned
  145. [MarshalAs(UnmanagedType.I1)]
  146. public bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop
  147. [MarshalAs(UnmanagedType.I1)]
  148. public bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer
  149. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Constants.k_cchTagListMax)]
  150. public string m_rgchTags; // comma separated list of all tags associated with this file
  151. // file/url information
  152. public UGCHandle_t m_hFile; // The handle of the primary file
  153. public UGCHandle_t m_hPreviewFile; // The handle of the preview file
  154. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Constants.k_cchFilenameMax)]
  155. public string m_pchFileName; // The cloud filename of the primary file
  156. public int m_nFileSize; // Size of the primary file
  157. public int m_nPreviewFileSize; // Size of the preview file
  158. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Constants.k_cchPublishedFileURLMax)]
  159. public string m_rgchURL; // URL (for a video or a website)
  160. // voting information
  161. public uint m_unVotesUp; // number of votes up
  162. public uint m_unVotesDown; // number of votes down
  163. public float m_flScore; // calculated score
  164. // collection details
  165. public uint m_unNumChildren;
  166. }
  167. // structure that contains client callback data
  168. // see callbacks documentation for more details
  169. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
  170. public struct CallbackMsg_t {
  171. public int m_hSteamUser;
  172. public int m_iCallback;
  173. public IntPtr m_pubParam;
  174. public int m_cubParam;
  175. }
  176. // a single entry in a leaderboard, as returned by GetDownloadedLeaderboardEntry()
  177. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)]
  178. public struct LeaderboardEntry_t {
  179. public CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info
  180. public int m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard
  181. public int m_nScore; // score as set in the leaderboard
  182. public int m_cDetails; // number of int32 details available for this entry
  183. public UGCHandle_t m_hUGC; // handle for UGC attached to the entry
  184. }
  185. /// Store key/value pair used in matchmaking queries.
  186. ///
  187. /// Actually, the name Key/Value is a bit misleading. The "key" is better
  188. /// understood as "filter operation code" and the "value" is the operand to this
  189. /// filter operation. The meaning of the operand depends upon the filter.
  190. [StructLayout(LayoutKind.Sequential)]
  191. public struct MatchMakingKeyValuePair_t {
  192. MatchMakingKeyValuePair_t(string strKey, string strValue) {
  193. m_szKey = strKey;
  194. m_szValue = strValue;
  195. }
  196. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
  197. public string m_szKey;
  198. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
  199. public string m_szValue;
  200. }
  201. }
  202. #endif // !DISABLESTEAMWORKS