/*
- * $Id$
+ * $Id: rb_ecore.c 60 2004-08-10 14:12:36Z tilman $
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
#include <Ecore.h>
+#define __RB_ECORE_C
#include "rb_ecore.h"
#include "rb_timer.h"
#include "rb_idler.h"
-static VALUE m_init (VALUE self)
-{
- return INT2FIX (ecore_init ());
-}
+VALUE mEcore;
+/*
+ * call-seq:
+ * Ecore.main_loop_begin
+ *
+ * Starts the Ecore main loop.
+ */
static VALUE m_main_loop_begin (VALUE self)
{
ecore_main_loop_begin ();
return Qnil;
}
+/*
+ * call-seq:
+ * Ecore.main_loop_iterate
+ *
+ * Run one iteration of the Ecore main loop.
+ */
static VALUE m_main_loop_iterate (VALUE self)
{
ecore_main_loop_iterate ();
return Qnil;
}
+/*
+ * call-seq:
+ * Ecore.main_loop_quit
+ *
+ * Stops the Ecore main loop.
+ */
static VALUE m_main_loop_quit (VALUE self)
{
ecore_main_loop_quit ();
return Qnil;
}
-static VALUE m_shutdown (VALUE self)
-{
- rb_gc_start ();
-
- return INT2FIX (ecore_shutdown ());
-}
-
void Init_ecore (void)
{
mEcore = rb_define_module ("Ecore");
- rb_define_module_function (mEcore, "init",
- m_init, 0);
rb_define_module_function (mEcore, "main_loop_begin",
m_main_loop_begin, 0);
rb_define_module_function (mEcore, "main_loop_iterate",
m_main_loop_iterate, 0);
rb_define_module_function (mEcore, "main_loop_quit",
m_main_loop_quit, 0);
- rb_define_module_function (mEcore, "shutdown",
- m_shutdown, 0);
Init_Timer ();
Init_Idler ();