Removed init/shutdown methods.
[ruby-ecore.git] / src / ecore / rb_ecore.c
1 /*
2  * $Id: rb_ecore.c 53 2004-08-07 11:22:00Z tilman $
3  *
4  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include <ruby.h>
22
23 #include <Ecore.h>
24
25 #define __RB_ECORE_C
26 #include "rb_ecore.h"
27 #include "rb_timer.h"
28 #include "rb_idler.h"
29
30 VALUE mEcore;
31
32 static VALUE m_main_loop_begin (VALUE self)
33 {
34         ecore_main_loop_begin ();
35
36         return Qnil;
37 }
38
39 static VALUE m_main_loop_iterate (VALUE self)
40 {
41         ecore_main_loop_iterate ();
42
43         return Qnil;
44 }
45
46 static VALUE m_main_loop_quit (VALUE self)
47 {
48         ecore_main_loop_quit ();
49
50         return Qnil;
51 }
52
53 void Init_ecore (void)
54 {
55         mEcore = rb_define_module ("Ecore");
56
57         rb_define_module_function (mEcore, "main_loop_begin",
58                                    m_main_loop_begin, 0);
59         rb_define_module_function (mEcore, "main_loop_iterate",
60                                    m_main_loop_iterate, 0);
61         rb_define_module_function (mEcore, "main_loop_quit",
62                                    m_main_loop_quit, 0);
63
64         Init_Timer ();
65         Init_Idler ();
66 }
67