Class: SDL2::Event::MouseWheel
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::MouseWheel
- Defined in:
- event.c,
event.c
Overview
This class represents mouse wheel events.
Instance Attribute Summary (collapse)
-
- (Integer) which
the mouse index.
-
- (Integer) window_id
the window id with mouse focus.
-
- (Integer) x
the amount of scrolled horizontally, positive to the right and negative to the left.
-
- (Integer) y
the amount of scrolled vertically, positve away from the user and negative toward the user.
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) which
the mouse index
- (Integer) window_id
the window id with mouse focus
- (Integer) x
the amount of scrolled horizontally, positive to the right and negative to the left
- (Integer) y
the amount of scrolled vertically, positve away from the user and negative toward the user
Instance Method Details
- (String) inspect
Returns inspection string
609 610 611 612 613 614 615 616 |
# File 'event.c', line 609
static VALUE EvMouseWheel_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 x=%d y=%d>",
rb_obj_classname(self), ev->common.type, ev->common.timestamp,
ev->wheel.windowID, ev->wheel.which, ev->wheel.x, ev->wheel.y);
}
|