pub struct Joystick {
pub raw: *mut SDL_Joystick,
}
Fields§
§raw: *mut SDL_Joystick
Implementations§
Source§impl Joystick
impl Joystick
pub fn open(index: isize) -> Result<Joystick, String>
pub fn get_index(&self) -> isize
pub fn get_num_axes(&self) -> isize
pub fn get_num_balls(&self) -> isize
pub fn get_num_hats(&self) -> isize
pub fn get_axis(&self, axis: isize) -> i16
pub fn get_hat(&self, hat: isize) -> u8
pub fn get_ball(&self, ball: isize) -> (isize, isize)
Trait Implementations§
impl StructuralPartialEq for Joystick
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