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

- (Object) inspect



768
769
770
771
772
773
774
# File 'event.c', line 768

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);
}