pub struct Buttons<Api = Default>(/* private fields */);Expand description
Buttons
Implementations§
Source§impl Buttons<Default>
impl Buttons<Default>
Sourcepub fn Default() -> Self
pub fn Default() -> Self
Creates default Buttons without type parameter requirement.
Uses ZST api::Default.
Source§impl Buttons<Cache>
impl Buttons<Cache>
Sourcepub fn Cached() -> Self
pub fn Cached() -> Self
Creates Buttons without type parameter requirement.
Uses api::Cache.
Source§impl<Api: Api> Buttons<Api>
impl<Api: Api> Buttons<Api>
Sourcepub fn get(&self) -> State
pub fn get(&self) -> State
Returns the current buttons State.
Equivalent to sys::ffi::playdate_sys::getButtonState.
Sourcepub fn get_to(&self, state: &mut State)
pub fn get_to(&self, state: &mut State)
Writes the current buttons state to given State.
Updates all (current, pushed and released).
Equivalent to sys::ffi::playdate_sys::getButtonState.
Sourcepub fn get_to_raw(
&self,
current: &mut PDButtons,
pushed: &mut PDButtons,
released: &mut PDButtons,
)
pub fn get_to_raw( &self, current: &mut PDButtons, pushed: &mut PDButtons, released: &mut PDButtons, )
Writes the current buttons state to given references.
Equivalent to sys::ffi::playdate_sys::getButtonState.
Sourcepub fn current(&self) -> PDButtons
pub fn current(&self) -> PDButtons
Equivalent to sys::ffi::playdate_sys::getButtonState.
Requests & returns only current part of state, see Self::current
Sourcepub fn pushed(&self) -> PDButtons
pub fn pushed(&self) -> PDButtons
Equivalent to sys::ffi::playdate_sys::getButtonState.
Requests & returns only current part of state, see Self::pushed
Sourcepub fn released(&self) -> PDButtons
pub fn released(&self) -> PDButtons
Equivalent to sys::ffi::playdate_sys::getButtonState.
Requests & returns only current part of state, see Self::released
Trait Implementations§
impl<Api: Copy> Copy for Buttons<Api>
Auto Trait Implementations§
impl<Api> Freeze for Buttons<Api>where
Api: Freeze,
impl<Api> RefUnwindSafe for Buttons<Api>where
Api: RefUnwindSafe,
impl<Api> Send for Buttons<Api>where
Api: Send,
impl<Api> Sync for Buttons<Api>where
Api: Sync,
impl<Api> Unpin for Buttons<Api>where
Api: Unpin,
impl<Api> UnwindSafe for Buttons<Api>where
Api: UnwindSafe,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
§impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.