Class: SDL2::Event::JoyBallMotion
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::JoyBallMotion
- Defined in:
- event.c,
event.c
Overview
This class represents the joystick trackball motion events.
Instance Attribute Summary (collapse)
-
- (Integer) ball
the joystick trackball index.
-
- (Integer) which
the joystick index.
-
- (Integer) xrel
the relative motion in the x direction.
-
- (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) ball
the joystick trackball index
- (Integer) which
the joystick index
- (Integer) xrel
the relative motion in the x direction
- (Integer) yrel
the relative motion in the y direction
Instance Method Details
- (String) inspect
Returns 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);
}
|