aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorMatthew Collins <[email protected]>2018-02-17 16:28:14 +0000
committerMatthew Collins <[email protected]>2018-02-17 16:28:14 +0000
commitd7e26de692f77ee18d20e5fa314c0eef2d34ce57 (patch)
tree9b0eafbd45cd89ab33bf8235acbdd4289a0379af /src/utils.rs
parentFix use of deprecated method (diff)
downloadarchived-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.rs6
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);