Class: SDL2::Event::JoyBallMotion

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

Overview

This class represents the joystick trackball motion 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

- (Integer) ball

the joystick trackball index

Returns:

  • (Integer)

- (Integer) which

the joystick index

Returns:

  • (Integer)

- (Integer) xrel

the relative motion in the x direction

Returns:

  • (Integer)

- (Integer) yrel

the relative motion in the y direction

Returns:

  • (Integer)

Instance Method Details

- (String) inspect

Returns inspection string

Returns:

  • (String)

    inspection string



722
723
724
725
726
727
728
729
# File 'event.c', line 722

static VALUE EvJoyBallMotion_inspect(VALUE self)
{
    SDL_Event* ev; Data_Get_Struct(self, SDL_Event, ev);
    return rb_sprintf("<%s: type=%u timestamp=%u"
                      " which=%d ball=%u xrel=%d yrel=%d>",
                      rb_obj_classname(self), ev->common.type, ev->common.timestamp,
                      ev->jball.which, ev->jball.ball, ev->jball.xrel, ev->jball.yrel);
}