Class: Rjoystick::Event
- Inherits:
-
Object
- Object
- Rjoystick::Event
- Defined in:
- ext/rjoystick.c
Constant Summary collapse
- JSBUTTON =
INT2FIX(JS_EVENT_BUTTON)
- JSAXIS =
INT2FIX(JS_EVENT_AXIS)
- JSINIT =
INT2FIX(JS_EVENT_INIT)
Instance Method Summary collapse
Instance Method Details
#number ⇒ Object
194 195 196 197 198 199 |
# File 'ext/rjoystick.c', line 194
VALUE js_event_number(VALUE klass)
{
int *fd;
Data_Get_Struct(klass, int, fd);
return INT2FIX((fd && *fd >= 0) ? jse[*fd].number : -1);
}
|
#time ⇒ Object
208 209 210 211 212 213 |
# File 'ext/rjoystick.c', line 208
VALUE js_event_time(VALUE klass)
{
int *fd;
Data_Get_Struct(klass, int, fd);
return INT2FIX((fd && *fd >= 0) ? jse[*fd].time : 0);
}
|
#type ⇒ Object
201 202 203 204 205 206 |
# File 'ext/rjoystick.c', line 201
VALUE js_event_type(VALUE klass)
{
int *fd;
Data_Get_Struct(klass, int, fd);
return INT2FIX((fd && *fd >= 0) ? jse[*fd].type : -1);
}
|
#value ⇒ Object
215 216 217 218 219 220 |
# File 'ext/rjoystick.c', line 215
VALUE js_event_value(VALUE klass)
{
int *fd;
Data_Get_Struct(klass, int, fd);
return INT2FIX((fd && *fd >= 0) ? jse[*fd].value : -1);
}
|