Class: SDL2::Mouse::Cursor
- Inherits:
-
Object
- Object
- SDL2::Mouse::Cursor
- Defined in:
- mouse.c,
mouse.c
Overview
This class represents mouse cursor shape, and have some class-methods for a mouse cursor.
Class Method Summary (collapse)
-
+ (nil) hide
Hide the mouse cursor.
-
+ (nil) show
Show the mouse cursor.
-
+ (Boolean) shown?
Return true if the mouse cursor is shown.
-
+ (nil) warp(window, x, y)
Move the mouse cursor to the given position within the window.
-
+ (nil) warp_globally(x, y)
Move the mouse cursor to the given position within the desktop.
Class Method Details
+ (nil) hide
Hide the mouse cursor.
177 178 179 180 181 |
# File 'mouse.c', line 177
static VALUE Cursor_s_hide(VALUE self)
{
HANDLE_ERROR(SDL_ShowCursor(SDL_DISABLE));
return Qnil;
}
|
+ (nil) show
Show the mouse cursor.
167 168 169 170 171 |
# File 'mouse.c', line 167
static VALUE Cursor_s_show(VALUE self)
{
HANDLE_ERROR(SDL_ShowCursor(SDL_ENABLE));
return Qnil;
}
|
+ (Boolean) shown?
Return true if the mouse cursor is shown.
186 187 188 189 |
# File 'mouse.c', line 186
static VALUE Cursor_s_shown_p(VALUE self)
{
return INT2BOOL(HANDLE_ERROR(SDL_ShowCursor(SDL_QUERY)));
}
|
+ (nil) warp(window, x, y)
200 201 202 203 204 |
# File 'mouse.c', line 200
static VALUE Cursor_s_warp(VALUE self, VALUE window, VALUE x, VALUE y)
{
SDL_WarpMouseInWindow(Get_SDL_Window(window), NUM2INT(x), NUM2INT(y));
return Qnil;
}
|
+ (nil) warp_globally(x, y)
216 217 218 219 220 |
# File 'mouse.c', line 216
static VALUE Cursor_s_warp_globally(VALUE self, VALUE x, VALUE y)
{
SDL_WarpMouseGlobal(NUM2INT(x), NUM2INT(y));
return Qnil;
}
|