pub struct Joystick {
pub id: JoystickId,
pub glfw: Glfw,
}Expand description
A joystick handle.
Fields§
§id: JoystickId§glfw: GlfwImplementations§
Source§impl Joystick
impl Joystick
Sourcepub fn is_present(&self) -> bool
pub fn is_present(&self) -> bool
Wrapper for glfwJoystickPresent.
Wrapper for glfwGetJoystickButtons.
Sourcepub fn get_hats(&self) -> Vec<JoystickHats>
pub fn get_hats(&self) -> Vec<JoystickHats>
Wrapper for glfwGetJoystickHats.
Sourcepub fn is_gamepad(&self) -> bool
pub fn is_gamepad(&self) -> bool
Wrapper for glfwJoystickIsGamepad.
Sourcepub fn get_gamepad_name(&self) -> Option<String>
pub fn get_gamepad_name(&self) -> Option<String>
Wrapper for glfwGetGamepadName.
Sourcepub fn get_gamepad_state(&self) -> Option<GamepadState>
pub fn get_gamepad_state(&self) -> Option<GamepadState>
Wrapper for glfwGetGamepadState.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Joystick
impl RefUnwindSafe for Joystick
impl !Send for Joystick
impl !Sync for Joystick
impl Unpin for Joystick
impl UnwindSafe for Joystick
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more