From ab841e74c1011d7fdc2e793aae70578957a5bcc6 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Wed, 8 Feb 2006 21:13:34 +0000 Subject: [PATCH] Added EvasObject#clip and EvasObject#clip=. --- src/rb_evas_object.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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=", -- 2.30.2