Class: SDL2::Event::ControllerDevice
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::ControllerDevice
- Defined in:
- ext/sdl2_ext/event.c,
ext/sdl2_ext/event.c
Overview
This class represents controller device events (connected/disconnected/remapped).
The event of this event doesn’t occur. Only the event of the following subclasses occur in Ruby/SDL2.
* {SDL2::Event::ControllerDeviceAdded}
* {SDL2::Event::ControllerDeviceRemoved}
* {SDL2::Event::ControllerDeviceRemapped}
Direct Known Subclasses
ControllerDeviceAdded, ControllerDeviceRemapped, ControllerDeviceRemoved
Instance Attribute Summary collapse
-
#which ⇒ Integer
the controller index.
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
#which ⇒ Integer
the controller index
Instance Method Details
#inspect ⇒ String
Returns inspection string.
895 896 897 898 899 900 901 |
# File 'ext/sdl2_ext/event.c', line 895
static VALUE ControllerDevice_inspect(VALUE self)
{
SDL_Event* ev; Data_Get_Struct(self, SDL_Event, ev);
return rb_sprintf("<%s: type=%u timestamp=%u which=%d>",
rb_obj_classname(self), ev->common.type, ev->common.timestamp,
ev->cdevice.which);
}
|