projects
/
ruby-ecore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added EcoreEvas#name_class.
[ruby-ecore.git]
/
src
/
ecore
/
rb_ecore.c
diff --git
a/src/ecore/rb_ecore.c
b/src/ecore/rb_ecore.c
index 4d7190e6140f31c885470c7ca85c1c6d87cb6b4c..91d8a853db9c673a20bd1f6e8f1fbe897f06fd20 100644
(file)
--- a/
src/ecore/rb_ecore.c
+++ b/
src/ecore/rb_ecore.c
@@
-1,5
+1,5
@@
/*
/*
- * $Id: rb_ecore.c
146 2004-11-27 15:38:52
Z tilman $
+ * $Id: rb_ecore.c
342 2005-05-07 12:26:37
Z tilman $
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
@@
-27,6
+27,7
@@
#include "rb_timer.h"
#include "rb_animator.h"
#include "rb_idler.h"
#include "rb_timer.h"
#include "rb_animator.h"
#include "rb_idler.h"
+#include "rb_idle_enterer.h"
#include "rb_event_handler.h"
#include "rb_fd_handler.h"
#include "rb_event_handler.h"
#include "rb_fd_handler.h"
@@
-71,6
+72,11
@@
static VALUE m_main_loop_quit (VALUE self)
return Qnil;
}
return Qnil;
}
+static VALUE m_time_get (VALUE self)
+{
+ return rb_float_new (ecore_time_get ());
+}
+
static VALUE c_ev_exe_exit_init (VALUE self, VALUE event)
{
VALUE c = CLASS_OF (self);
static VALUE c_ev_exe_exit_init (VALUE self, VALUE event)
{
VALUE c = CLASS_OF (self);
@@
-129,10
+135,19
@@
static VALUE c_ev_sig_rt_init (VALUE self, VALUE event)
return self;
}
return self;
}
+static void at_exit ()
+{
+ ecore_shutdown ();
+}
+
void Init_ecore (void)
{
VALUE c;
void Init_ecore (void)
{
VALUE c;
+ ecore_init ();
+
+ atexit (at_exit);
+
mEcore = rb_define_module ("Ecore");
rb_define_module_function (mEcore, "main_loop_begin",
mEcore = rb_define_module ("Ecore");
rb_define_module_function (mEcore, "main_loop_begin",
@@
-141,10
+156,12
@@
void Init_ecore (void)
m_main_loop_iterate, 0);
rb_define_module_function (mEcore, "main_loop_quit",
m_main_loop_quit, 0);
m_main_loop_iterate, 0);
rb_define_module_function (mEcore, "main_loop_quit",
m_main_loop_quit, 0);
+ rb_define_module_function (mEcore, "time", m_time_get, 0);
Init_Timer ();
Init_Animator ();
Init_Idler ();
Init_Timer ();
Init_Animator ();
Init_Idler ();
+ Init_IdleEnterer ();
Init_EventHandler ();
Init_FdHandler ();
Init_EventHandler ();
Init_FdHandler ();