X-Git-Url: http://git.code-monkey.de/?p=ruby-evas.git;a=blobdiff_plain;f=src%2Frb_evas_object.c;h=22b03153f88988d5006940df84fd99239b16f914;hp=63cf9ba9cc3ff82af58d2648df7651cf2a4d3e90;hb=ab841e74c1011d7fdc2e793aae70578957a5bcc6;hpb=b8652316f7e476cc54a9091b81066a8393f0baa1 diff --git a/src/rb_evas_object.c b/src/rb_evas_object.c index 63cf9ba..22b0315 100644 --- a/src/rb_evas_object.c +++ b/src/rb_evas_object.c @@ -1,5 +1,5 @@ /* - * $Id: rb_evas_object.c 344 2005-05-08 14:37:30Z tilman $ + * $Id: rb_evas_object.c 350 2006-02-08 21:13:34Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -375,6 +375,23 @@ static VALUE c_set_color (VALUE self, VALUE r, VALUE g, VALUE b, return Qnil; } +static VALUE c_get_clip (VALUE self) +{ + GET_OBJ (self, RbEvasObject, e); + + return TO_EVAS_OBJECT (evas_object_clip_get (e->real)); +} + +static VALUE c_set_clip (VALUE self, VALUE clip) +{ + GET_OBJ (self, RbEvasObject, e); + GET_OBJ (clip, RbEvasObject, e2); + + evas_object_clip_set (e->real, e2->real); + + return Qnil; +} + /* * call-seq: * e.pass_events? => true or false @@ -569,6 +586,8 @@ void Init_EvasObject (void) rb_define_method (cEvasObject, "layer=", c_layer_set, 1); rb_define_method (cEvasObject, "get_color", c_get_color, 0); rb_define_method (cEvasObject, "set_color", c_set_color, 4); + rb_define_method (cEvasObject, "clip", c_get_clip, 0); + rb_define_method (cEvasObject, "clip=", c_set_clip, 1); rb_define_method (cEvasObject, "pass_events?", c_pass_events_get, 0); rb_define_method (cEvasObject, "pass_events=",