Ejemplo n.º 1
0
static VALUE
rg_shape_combine_region(VALUE self, VALUE shape_region, VALUE offset_x, VALUE offset_y)
{
    gdk_window_shape_combine_region(_SELF(self),
                                    NIL_P(shape_region) ? NULL : RVAL2CRREGION(shape_region),
                                    INT2NUM(offset_x), INT2NUM(offset_y));
    return self;
}
Ejemplo n.º 2
0
static VALUE
rg_input_shape_combine_region(VALUE self, VALUE shape_region, VALUE offset_x, VALUE offset_y)
{
    gdk_window_input_shape_combine_region(_SELF(self),
                                          RVAL2CRREGION(shape_region),
                                          NUM2INT(offset_x),
                                          NUM2INT(offset_y));
    return self;
}
Ejemplo n.º 3
0
static VALUE
rg_move_region(VALUE self, VALUE region, VALUE dx, VALUE dy)
{
    gdk_window_move_region(_SELF(self),
                           RVAL2CRREGION(region),
                           NUM2INT(dx),
                           NUM2INT(dy));
    return self;
}
Ejemplo n.º 4
0
static VALUE
rg_begin_paint(VALUE self, VALUE area)
{
    if (rb_obj_is_kind_of(area, GTYPE2CLASS(GDK_TYPE_RECTANGLE))){
        gdk_window_begin_paint_rect(_SELF(self), 
                                    RVAL2GDKRECTANGLE(area));
    } else {
        gdk_window_begin_paint_region(_SELF(self), RVAL2CRREGION(area));
    }
    return self;
}
Ejemplo n.º 5
0
static VALUE
rg_invalidate_maybe_recurse(VALUE self, VALUE region)
{
    VALUE func = (VALUE)NULL;
    if (rb_block_given_p()){
        func = rb_block_proc();
        G_RELATIVE(self, func);
    }
    gdk_window_invalidate_maybe_recurse(_SELF(self),
                                        RVAL2CRREGION(region),
                                        (GdkWindowChildFunc)invalidate_child_func_wrap,
                                        (gpointer)func);
    return self;
}
Ejemplo n.º 6
0
static VALUE
rg_invalidate(VALUE self, VALUE area, VALUE invalidate_children)
{
    if (rb_obj_is_kind_of(area, GTYPE2CLASS(GDK_TYPE_RECTANGLE))){
        gdk_window_invalidate_rect(_SELF(self),
                                   RVAL2GDKRECTANGLE(area),
                                   RVAL2CBOOL(invalidate_children));
    } else {
        gdk_window_invalidate_region(_SELF(self),
                                     RVAL2CRREGION(area),
                                     RVAL2CBOOL(invalidate_children));
    }
    return self;
}
Ejemplo n.º 7
0
static VALUE
gdkeventexpose_set_region(VALUE self, VALUE region)
{
    RVAL2GDKEVENT(self)->expose.region = RVAL2CRREGION(region);
    return self;
}