Example #1
0
static VALUE
rg_start_editing(VALUE self, VALUE event)
{
    gtk_cell_editable_start_editing(_SELF(self), 
                                    NIL_P(event) ? NULL : RVAL2GEV(event));
    return self;
}
Example #2
0
static VALUE
rg_m_get_event_widget(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
{
    VALUE event;
    rb_scan_args(argc, argv, "01", &event);

    return GOBJ2RVAL(gtk_get_event_widget(NIL_P(event) ? NULL :RVAL2GEV(event)));
}
Example #3
0
static VALUE
rg_event(VALUE self, VALUE event_object, VALUE event, VALUE iter)
{
    gboolean ret = gtk_text_tag_event(RVAL2GTKTEXTTAG(self), 
                                      RVAL2GOBJ(event_object),
                                      RVAL2GEV(event),
                                      RVAL2GTKTEXTITER(iter));
    return CBOOL2RVAL(ret);
}
Example #4
0
static VALUE
rg_m_begin(G_GNUC_UNUSED VALUE self, VALUE widget, VALUE target_list, VALUE actions, VALUE button, VALUE event)
{
    return GOBJ2RVAL(gtk_drag_begin(RVAL2WIDGET(widget),
                                    RVAL2BOXED(target_list, GTK_TYPE_TARGET_LIST),
                                    RVAL2GFLAGS(actions, GDK_TYPE_DRAG_ACTION),
                                    NUM2INT(button),
                                    RVAL2GEV(event)));
}
Example #5
0
static VALUE
event(VALUE self, VALUE event_object, VALUE event, VALUE iter)
{
    gboolean ret = gtk_text_tag_event(GTK_TEXT_TAG(RVAL2GOBJ(self)), 
                                      RVAL2GOBJ(event_object),
                                      RVAL2GEV(event),
                                      (GtkTextIter*)RVAL2BOXED(iter, GTK_TYPE_TEXT_ITER));
    return CBOOL2RVAL(ret);
}
Example #6
0
static VALUE
rg_start_editing(VALUE self, VALUE event, VALUE widget, VALUE path, VALUE background_area, VALUE cell_area, VALUE flags)
{
    GtkCellEditable* edit =
    gtk_cell_renderer_start_editing(_SELF(self), (GdkEvent*)RVAL2GEV(event),
                               GTK_WIDGET(RVAL2GOBJ(widget)),
                               RVAL2CSTR(path), RVAL2RECT(background_area),
                               RVAL2RECT(cell_area), 
                               RVAL2GFLAGS(flags, GTK_TYPE_CELL_RENDERER_STATE));
    return edit ? GOBJ2RVAL(edit) : Qnil;
}
Example #7
0
static VALUE
rg_activate(VALUE self, VALUE event, VALUE widget, VALUE path, VALUE background_area, VALUE cell_area, VALUE flags)
{
    gboolean ret =
    gtk_cell_renderer_activate(_SELF(self), (GdkEvent*)RVAL2GEV(event),
                               GTK_WIDGET(RVAL2GOBJ(widget)),
                               RVAL2CSTR(path), RVAL2RECT(background_area),
                               RVAL2RECT(cell_area), 
                               RVAL2GFLAGS(flags, GTK_TYPE_CELL_RENDERER_STATE));
    return CBOOL2RVAL(ret);
}
Example #8
0
static VALUE
rg_send_expose(VALUE self, VALUE event)
{
    return INT2NUM(gtk_widget_send_expose(_SELF(self), RVAL2GEV(event)));
}
Example #9
0
static VALUE
rg_event(VALUE self, VALUE event)
{
    return CBOOL2RVAL(gtk_widget_event(_SELF(self), RVAL2GEV(event)));
}
Example #10
0
static VALUE
rg_s_propagate_event(G_GNUC_UNUSED VALUE self, VALUE widget, VALUE event)
{
    gtk_propagate_event(RVAL2GTKWIDGET(widget), RVAL2GEV(event));
    return Qnil;
}
Example #11
0
static VALUE
rg_s_main_do_event(G_GNUC_UNUSED VALUE self, VALUE event)
{
    gtk_main_do_event(RVAL2GEV(event));
    return event;
}
Example #12
0
static VALUE
rg_put_event(VALUE self, VALUE event)
{
    gdk_display_put_event(_SELF(self), RVAL2GEV(event));
    return self;
}
Example #13
0
static VALUE
rg_filter_keypress(VALUE self, VALUE event)
{
    return CBOOL2RVAL(gtk_im_context_filter_keypress(_SELF(self), (GdkEventKey*)RVAL2GEV(event)));
}