diff options
| author | Matthew Collins <[email protected]> | 2018-02-17 16:28:14 +0000 |
|---|---|---|
| committer | Matthew Collins <[email protected]> | 2018-02-17 16:28:14 +0000 |
| commit | d7e26de692f77ee18d20e5fa314c0eef2d34ce57 (patch) | |
| tree | 9b0eafbd45cd89ab33bf8235acbdd4289a0379af /src/utils.rs | |
| parent | Fix use of deprecated method (diff) | |
| download | archived-steamworks-rs-d7e26de692f77ee18d20e5fa314c0eef2d34ce57.tar.xz archived-steamworks-rs-d7e26de692f77ee18d20e5fa314c0eef2d34ce57.zip | |
Add some basic docs to parts of the api
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils.rs b/src/utils.rs index f95719f..2ad34f1 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,18 +1,24 @@ use super::*; +/// Access to the steam utils interface pub struct Utils { pub(crate) utils: *mut sys::ISteamUtils, pub(crate) _client: Arc<ClientInner>, } impl Utils { + /// Returns the app ID of the current process pub fn app_id(&self) -> AppId { unsafe { AppId(sys::SteamAPI_ISteamUtils_GetAppID(self.utils)) } } + /// Returns the language the steam client is currently + /// running in. + /// + /// Generally you want `Apps::current_game_language` instead of this pub fn ui_language(&self) -> Cow<str> { unsafe { let lang = sys::SteamAPI_ISteamUtils_GetSteamUILanguage(self.utils); |