Struct sdl2::mouse::MouseUtil [] [src]

pub struct MouseUtil {
    // some fields omitted
}

Mouse utility functions. Access with Sdl::mouse().

let sdl_context = sdl2::init().unwrap();

// Hide the cursor
sdl_context.mouse().show_cursor(false);

Methods

impl MouseUtil
[src]

fn focused_window_id(&self) -> Option<u32>

Gets the id of the window which currently has mouse focus.

fn mouse_state(&self) -> (MouseState, i32, i32)

fn relative_mouse_state(&self) -> (MouseState, i32, i32)

fn warp_mouse_in_window(&self, window: &WindowRef, x: i32, y: i32)

fn set_relative_mouse_mode(&self, on: bool)

fn relative_mouse_mode(&self) -> bool

fn is_cursor_showing(&self) -> bool

fn show_cursor(&self, show: bool)