From 00f264be8c2bfff677382b316c7a88cb8b0a21f4 Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Sat, 5 Aug 2023 20:04:49 +0200 Subject: [PATCH] Module doc aliases --- ctru-rs/src/applets/swkbd.rs | 1 + ctru-rs/src/services/am.rs | 2 ++ ctru-rs/src/services/cam.rs | 1 + ctru-rs/src/services/cfgu.rs | 1 + ctru-rs/src/services/fs.rs | 1 + ctru-rs/src/services/gfx.rs | 1 + ctru-rs/src/services/hid.rs | 3 +++ ctru-rs/src/services/ndsp/mod.rs | 1 + ctru-rs/src/services/romfs.rs | 2 ++ ctru-rs/src/services/soc.rs | 2 ++ 10 files changed, 15 insertions(+) diff --git a/ctru-rs/src/applets/swkbd.rs b/ctru-rs/src/applets/swkbd.rs index 36413c6..9eda97e 100644 --- a/ctru-rs/src/applets/swkbd.rs +++ b/ctru-rs/src/applets/swkbd.rs @@ -3,6 +3,7 @@ //! This applet opens a virtual keyboard on the console's bottom screen which lets the user write UTF-16 valid text. // TODO: Implement remaining functionality (password mode, filter callbacks, etc.). Also improve "max text length" API. Improve `number of buttons` API when creating a new SoftwareKeyboard. // TODO: Split the Parental PIN lock operations into a different type. +#[doc(alias = "keyboard")] use bitflags::bitflags; use ctru_sys::{ diff --git a/ctru-rs/src/services/am.rs b/ctru-rs/src/services/am.rs index ee5a480..c120541 100644 --- a/ctru-rs/src/services/am.rs +++ b/ctru-rs/src/services/am.rs @@ -5,6 +5,8 @@ //! - Install compatible applications to the console. //! //! TODO: [`ctru-rs`](crate) doesn't support installing or uninstalling titles yet. +#[doc(alias = "app")] +#[doc(alias = "manager")] use crate::error::ResultCode; use crate::services::fs::FsMediaType; diff --git a/ctru-rs/src/services/cam.rs b/ctru-rs/src/services/cam.rs index 1e64322..57966f8 100644 --- a/ctru-rs/src/services/cam.rs +++ b/ctru-rs/src/services/cam.rs @@ -2,6 +2,7 @@ //! //! The CAM service provides access to the built-in cameras. [`Camera`]s can return images //! in the form of byte vectors which can be displayed to the screen or used in other ways. +#[doc(alias = "camera")] use crate::error::{Error, ResultCode}; use crate::services::gspgpu::FramebufferFormat; diff --git a/ctru-rs/src/services/cfgu.rs b/ctru-rs/src/services/cfgu.rs index d63f227..9f90935 100644 --- a/ctru-rs/src/services/cfgu.rs +++ b/ctru-rs/src/services/cfgu.rs @@ -1,6 +1,7 @@ //! System Configuration service. //! //! This module contains basic methods to retrieve the console's system configuration. +#[doc(alias = "configuration")] use crate::error::ResultCode; diff --git a/ctru-rs/src/services/fs.rs b/ctru-rs/src/services/fs.rs index f168e32..d79d73f 100644 --- a/ctru-rs/src/services/fs.rs +++ b/ctru-rs/src/services/fs.rs @@ -3,6 +3,7 @@ //! This module contains basic methods to manipulate the contents of the 3DS's filesystem. //! Only the SD card is currently supported. You should prefer using `std::fs`. // TODO: Refactor service to accomodate for various changes (such as SMDH support). Properly document the public API. +#[doc(alias = "filesystem")] use bitflags::bitflags; use std::ffi::OsString; diff --git a/ctru-rs/src/services/gfx.rs b/ctru-rs/src/services/gfx.rs index 2769c85..73bb60a 100644 --- a/ctru-rs/src/services/gfx.rs +++ b/ctru-rs/src/services/gfx.rs @@ -2,6 +2,7 @@ //! //! The GFX service controls (in a somewhat high-level way) the console's LCD screens. //! The screens are subordinate to the GFX service handle and can be used by only one borrower at a time. +#[doc(alias = "graphics")] use std::cell::{Ref, RefCell, RefMut}; use std::marker::PhantomData; diff --git a/ctru-rs/src/services/hid.rs b/ctru-rs/src/services/hid.rs index a136a94..74c69c6 100644 --- a/ctru-rs/src/services/hid.rs +++ b/ctru-rs/src/services/hid.rs @@ -3,6 +3,9 @@ //! The HID service provides read access to user input such as [button presses](Hid::keys_down), [touch screen presses](Hid::touch_position), //! and [circle pad information](Hid::circlepad_position). It also provides information from the sound volume slider, the accelerometer, and the gyroscope. // TODO: Implement volume slider, accelerometer and gyroscope + any other missing functionality. +#[doc(alias = "input")] +#[doc(alias = "controller")] +#[doc(alias = "gamepad")] use crate::error::ResultCode; use bitflags::bitflags; diff --git a/ctru-rs/src/services/ndsp/mod.rs b/ctru-rs/src/services/ndsp/mod.rs index eb9328d..b109c98 100644 --- a/ctru-rs/src/services/ndsp/mod.rs +++ b/ctru-rs/src/services/ndsp/mod.rs @@ -3,6 +3,7 @@ //! The NDSP service is used to handle communications to the DSP processor present on the console's motherboard. //! Thanks to the DSP processor the program can play sound effects and music on the console's built-in speakers or to any audio device //! connected via the audio jack. +#[doc(alias = "audio")] pub mod wave; use wave::{Status, Wave}; diff --git a/ctru-rs/src/services/romfs.rs b/ctru-rs/src/services/romfs.rs index 7b686fa..7b0f34f 100644 --- a/ctru-rs/src/services/romfs.rs +++ b/ctru-rs/src/services/romfs.rs @@ -18,6 +18,8 @@ //! ``` //! //! Alternatively, you can include the RomFS archive manually when building with `3dsxtool`. +#[doc(alias = "embed")] +#[doc(alias = "filesystem")] use crate::error::ResultCode; use std::ffi::CStr; diff --git a/ctru-rs/src/services/soc.rs b/ctru-rs/src/services/soc.rs index 00a7a5c..b17cd86 100644 --- a/ctru-rs/src/services/soc.rs +++ b/ctru-rs/src/services/soc.rs @@ -2,6 +2,8 @@ //! //! By using this service the program enables the use of network sockets and utilities such as those found in `std::net`, which are completely inaccessible by default. //! As such, remember to hold a handle to this service handle while using any network functionality, or else the `std::net` methods will return generic OS errors. +#[doc(alias = "socket")] +#[doc(alias = "network")] use libc::memalign; use std::net::Ipv4Addr;