Removed RCS-style IDs.
[ruby-evas.git] / src / rb_rectangle.c
1 /*
2  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #include <ruby.h>
20
21 #include <Evas.h>
22
23 #include "rb_evas_main.h"
24 #include "rb_evas.h"
25 #include "rb_evas_object.h"
26
27 /*
28  * call-seq:
29  *  Evas::Rectangle.new(evas) => rect
30  *
31  * Creates an Evas::Rectangle object.
32  */
33 static VALUE c_init (VALUE self, VALUE evas)
34 {
35         CHECK_CLASS (evas, cEvas);
36         GET_OBJ (evas, RbEvas, e);
37         GET_OBJ (self, RbEvasObject, rect);
38
39         rect->real = evas_object_rectangle_add (e->real);
40
41         rb_call_super (1, &evas);
42
43         return self;
44 }
45
46 void Init_Rectangle (void)
47 {
48         VALUE c = rb_define_class_under (mEvas, "Rectangle", cEvasObject);
49
50         rb_define_method (c, "initialize", c_init, 1);
51 }