Class: SDL2::Event::MouseMotion
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::MouseMotion
- Defined in:
- event.c,
event.c
Overview
This class represents mouse motion events.
Instance Attribute Summary (collapse)
-
- (Integer) state
the current mouse state.
-
- (Integer) which
the mouse index.
-
- (Integer) window_id
the window id with mouse focus.
-
- (Integer) x
the x coordinate of the mouse pointer, relative to window.
-
- (Integer) xrel
the relative motion in the x direction.
-
- (Integer) y
the y coordinate of the mouse pointer, relative to window.
-
- (Integer) yrel
the relative motion in the y direction.
Attributes inherited from SDL2::Event
Instance Method Summary (collapse)
-
- (String) inspect
Inspection string.
Methods inherited from SDL2::Event
enable=, enabled?, poll, #window
Instance Attribute Details
- (Integer) state
TODO:
use SDL2::Mouse::State
the current mouse state
- (Integer) which
the mouse index
- (Integer) window_id
the window id with mouse focus
- (Integer) x
the x coordinate of the mouse pointer, relative to window
- (Integer) xrel
the relative motion in the x direction
- (Integer) y
the y coordinate of the mouse pointer, relative to window
- (Integer) yrel
the relative motion in the y direction
Instance Method Details
- (String) inspect
Returns inspection string
570 571 572 573 574 575 576 577 578 579 |
# File 'event.c', line 570
static VALUE EvMouseMotion_inspect(VALUE self)
{
SDL_Event* ev; Data_Get_Struct(self, SDL_Event, ev);
return rb_sprintf("<%s: type=%u timestamp=%u"
" window_id=%u which=%u state=%u"
" x=%d y=%d xrel=%d yrel=%d>",
rb_obj_classname(self), ev->common.type, ev->common.timestamp,
ev->motion.windowID, ev->motion.which, ev->motion.state,
ev->motion.x, ev->motion.y, ev->motion.xrel, ev->motion.yrel);
}
|