Class: SDL2::Event::Multigesture
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::Multigesture
- Defined in:
- ext/sdl2_ext/event.c,
ext/sdl2_ext/event.c
Overview
This class represents multiple finger gesture events.
Instance Attribute Summary collapse
-
#d_dist ⇒ Float
amount of fingers pinched.
-
#d_theta ⇒ Float
rotation of fingers.
-
#num_fingers ⇒ Integer
number of fingers involved.
-
#touch_id ⇒ Integer
the touch device id.
-
#x ⇒ Float
the x-axis location of the touch event, normalized (0…1).
-
#y ⇒ Float
the y-axis location of the touch event, normalized (0…1).
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
#d_dist ⇒ Float
amount of fingers pinched
#d_theta ⇒ Float
rotation of fingers
#num_fingers ⇒ Integer
number of fingers involved
#touch_id ⇒ Integer
the touch device id
#x ⇒ Float
the x-axis location of the touch event, normalized (0…1)
#y ⇒ Float
the y-axis location of the touch event, normalized (0…1)
Instance Method Details
#inspect ⇒ String
Returns inspection string.
1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 |
# File 'ext/sdl2_ext/event.c', line 1043
static VALUE EvMultigesture_inspect(VALUE self)
{
SDL_Event* ev; Data_Get_Struct(self, SDL_Event, ev);
return rb_sprintf("<%s: type=%u timestamp=%u"
" touch_id=%d d_theta=%f d_dist=%f"
" x=%f y=%f num_fingers=%d>",
rb_obj_classname(self), ev->common.type, ev->common.timestamp,
(int)ev->mgesture.touchId, ev->mgesture.dTheta, ev->mgesture.dDist,
ev->mgesture.x, ev->mgesture.y, ev->mgesture.numFingers);
}
|