Class: Rjoystick::Event

Inherits:
Object
  • Object
show all
Defined in:
ext/rjoystick.c

Constant Summary collapse

JSBUTTON =
INT2FIX(JS_EVENT_BUTTON)
JSAXIS =
INT2FIX(JS_EVENT_AXIS)

Instance Method Summary collapse

Instance Method Details

#numberObject



164
165
166
167
168
169
# File 'ext/rjoystick.c', line 164

VALUE js_event_number(VALUE klass)
{
	int *fd;
	Data_Get_Struct(klass, int, fd);
	return INT2FIX((fd && *fd >= 0) ? jse[*fd].number : -1);
}

#timeObject



178
179
180
181
182
183
# File 'ext/rjoystick.c', line 178

VALUE js_event_time(VALUE klass)
{
	int *fd;
	Data_Get_Struct(klass, int, fd);
	return INT2FIX((fd && *fd >= 0) ? jse[*fd].time : -1);
}

#typeObject



171
172
173
174
175
176
# File 'ext/rjoystick.c', line 171

VALUE js_event_type(VALUE klass)
{
	int *fd;
	Data_Get_Struct(klass, int, fd);
	return INT2FIX((fd && *fd >= 0) ? jse[*fd].type : -1);
}

#valueObject



185
186
187
188
189
190
# File 'ext/rjoystick.c', line 185

VALUE js_event_value(VALUE klass)
{
	int *fd;
	Data_Get_Struct(klass, int, fd);
	return INT2FIX((fd && *fd >= 0) ? jse[*fd].value : -1);
}