Class: SDL2::Event::ControllerDevice
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::ControllerDevice
- Defined in:
- event.c,
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.
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
894 895 896 897 898 899 900 |
# File 'event.c', line 894
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);
}
|