Class: SDL2::Event::JoyDevice

Inherits:
SDL2::Event show all
Defined in:
event.c,
event.c

Overview

This class represents joystick device events (joystick connected events and joystick disconnected events).

Direct Known Subclasses

JoyDeviceAdded, JoyDeviceRemoved

Instance Attribute Summary

Attributes inherited from SDL2::Event

#timestamp, #type

Instance Method Summary collapse

Methods inherited from SDL2::Event

enable=, enabled?, poll, #window

Instance Method Details

#inspectString

Returns inspection string

Returns:

  • (String)

    inspection string



776
777
778
779
780
781
782
# File 'event.c', line 776

static VALUE EvJoyDevice_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->jdevice.which);
}