Module: Gdk::Input
- Defined in:
- ext/gtk2/rbgdkinput.c
Class Method Summary collapse
Class Method Details
.add(filedescriptor, gdk_input_condition) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'ext/gtk2/rbgdkinput.c', line 27
static VALUE
input_add(VALUE self, VALUE filedescriptor, VALUE gdk_input_condition)
{
VALUE id;
VALUE func;
func = rb_block_proc();
id = INT2FIX(gdk_input_add(NUM2INT(rb_funcall(filedescriptor,
rb_intern("to_i"), 0)),
RVAL2GFLAGS(gdk_input_condition, GDK_TYPE_INPUT_CONDITION),
(GdkInputFunction)exec_input,
(gpointer)func));
G_RELATIVE2(self, func, id_relative_callbacks, id);
return id;
}
|
.remove(id) ⇒ Object
43 44 45 46 47 48 49 |
# File 'ext/gtk2/rbgdkinput.c', line 43
static VALUE
input_remove(VALUE self, VALUE id)
{
gdk_input_remove(NUM2INT(id));
G_REMOVE_RELATIVE(self, id_relative_callbacks, id);
return id;
}
|