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
-
#which ⇒ Integer
the mouse index.
-
#window_id ⇒ Integer
the window id with mouse focus.
-
#x ⇒ Integer
the amount of scrolled horizontally, positive to the right and negative to the left.
-
#y ⇒ Integer
the amount of scrolled vertically, positve away from the user and negative toward the user.
Attributes inherited from SDL2::Event
Instance Method Summary collapse
-
#inspect ⇒ String
Inspection string.
Methods inherited from SDL2::Event
enable=, enabled?, poll, #window
Instance Attribute Details
#which ⇒ Integer
the mouse index
#window_id ⇒ Integer
the window id with mouse focus
#x ⇒ Integer
the amount of scrolled horizontally, positive to the right and negative to the left
#y ⇒ Integer
the amount of scrolled vertically, positve away from the user and negative toward the user
Instance Method Details
#inspect ⇒ String
Returns inspection string
616 617 618 619 620 621 622 623 |
# File 'event.c', line 616
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);
}
|