Class: SDL2::Event::MouseWheel

Inherits:
SDL2::Event show all
Defined in:
event.c,
event.c

Overview

This class represents mouse wheel events.

Instance Attribute Summary collapse

Attributes inherited from SDL2::Event

#timestamp, #type

Instance Method Summary collapse

Methods inherited from SDL2::Event

enable=, enabled?, poll, #window

Instance Attribute Details

#whichInteger

the mouse index

Returns:

  • (Integer)

#window_idInteger

the window id with mouse focus

Returns:

  • (Integer)

#xInteger

the amount of scrolled horizontally, positive to the right and negative to the left

Returns:

  • (Integer)

#yInteger

the amount of scrolled vertically, positve away from the user and negative toward the user

Returns:

  • (Integer)

Instance Method Details

#inspectString

Returns inspection string

Returns:

  • (String)

    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);
}