Class: SDL2::Event::JoyBallMotion
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::JoyBallMotion
- Defined in:
- ext/sdl2_ext/event.c,
ext/sdl2_ext/event.c
Overview
This class represents the joystick trackball motion events.
Instance Attribute Summary collapse
-
#ball ⇒ Integer
the joystick trackball index.
-
#which ⇒ Integer
the joystick index.
-
#xrel ⇒ Integer
the relative motion in the x direction.
-
#yrel ⇒ Integer
the relative motion in the y direction.
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
#ball ⇒ Integer
the joystick trackball index
#which ⇒ Integer
the joystick index
#xrel ⇒ Integer
the relative motion in the x direction
#yrel ⇒ Integer
the relative motion in the y direction
Instance Method Details
#inspect ⇒ String
Returns inspection string.
730 731 732 733 734 735 736 737 |
# File 'ext/sdl2_ext/event.c', line 730
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);
}
|