pub struct InputPluginContext<'scope> { /* private fields */ }Expand description
Safe capabilities available during one input-plugin hook.
Implementations§
Source§impl<'scope> InputPluginContext<'scope>
impl<'scope> InputPluginContext<'scope>
Sourcepub const fn game(&self) -> &InputGameInfo
pub const fn game(&self) -> &InputGameInfo
Loading-game identity copied from the Input API initialization call.
Sourcepub const fn input_api_version(&self) -> InputApiVersion
pub const fn input_api_version(&self) -> InputApiVersion
Input API version selected by the SCS loader.
Sourcepub fn register_device(
&mut self,
spec: InputDeviceSpec,
) -> PluginResult<InputDeviceId>
pub fn register_device( &mut self, spec: InputDeviceSpec, ) -> PluginResult<InputDeviceId>
Declares one input device and returns its callback identity.
Registration remains explicit: the runtime does not infer a device from hook implementations or automatically install activity callbacks.
§Errors
Returns SdkError::NotNow outside InputPlugin::initialize.
Invalid names, empty or oversized input arrays, duplicate device/input
names, and an unrepresentable device ordinal return
SdkError::InvalidParameter or SdkError::AlreadyRegistered.
Auto Trait Implementations§
impl<'scope> !Send for InputPluginContext<'scope>
impl<'scope> !Sync for InputPluginContext<'scope>
impl<'scope> !UnwindSafe for InputPluginContext<'scope>
impl<'scope> Freeze for InputPluginContext<'scope>
impl<'scope> RefUnwindSafe for InputPluginContext<'scope>
impl<'scope> Unpin for InputPluginContext<'scope>
impl<'scope> UnsafeUnpin for InputPluginContext<'scope>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more