2 * $Id: rb_ecore.c 9 2004-06-19 19:53:47Z tilman $
4 * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
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.
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.
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
29 static VALUE m_init (VALUE self)
31 return INT2FIX (ecore_init ());
34 static VALUE m_main_loop_begin (VALUE self)
36 ecore_main_loop_begin ();
41 static VALUE m_main_loop_iterate (VALUE self)
43 ecore_main_loop_iterate ();
48 static VALUE m_main_loop_quit (VALUE self)
50 ecore_main_loop_quit ();
55 static VALUE m_shutdown (VALUE self)
59 return INT2FIX (ecore_shutdown ());
62 void Init_ecore (void)
64 mEcore = rb_define_module ("Ecore");
66 rb_define_module_function (mEcore, "init",
68 rb_define_module_function (mEcore, "main_loop_begin",
69 m_main_loop_begin, 0);
70 rb_define_module_function (mEcore, "main_loop_iterate",
71 m_main_loop_iterate, 0);
72 rb_define_module_function (mEcore, "main_loop_quit",
74 rb_define_module_function (mEcore, "shutdown",