Documentation arrived.
authorTilman Sauerbeck <tilman@code-monkey.de>
Tue, 10 Aug 2004 14:12:36 +0000 (14:12 +0000)
committerTilman Sauerbeck <tilman@code-monkey.de>
Tue, 10 Aug 2004 14:12:36 +0000 (14:12 +0000)
Makefile.am
README
src/ecore/rb_ecore.c
src/ecore/rb_idler.c
src/ecore/rb_timer.c
src/ecore_evas/rb_ecore_evas.c
src/ecore_evas/rb_fb.c
src/ecore_evas/rb_gl_x11.c
src/ecore_evas/rb_software_x11.c
src/ecore_job/rb_job.c

index 9a0f35be532cfb73955911cf356fe68c01c77424..6033014bafc34c14fd246a2fe1852fbe749171a3 100644 (file)
@@ -1,3 +1,18 @@
-## $Id: Makefile.am 9 2004-06-19 19:53:47Z tilman $
+## $Id: Makefile.am 60 2004-08-10 14:12:36Z tilman $
 
 SUBDIRS = src
+DOC_INPUT = src/ecore/rb_ecore.c \
+            src/ecore/rb_timer.c \
+            src/ecore/rb_idler.c \
+            src/ecore_evas/rb_ecore_evas_main.c \
+            src/ecore_evas/rb_ecore_evas.c \
+            src/ecore_evas/rb_software_x11.c \
+            src/ecore_evas/rb_gl_x11.c \
+            src/ecore_evas/rb_fb.c \
+            src/ecore_job/rb_ecore_job.c \
+            src/ecore_job/rb_job.c \
+            src/ecore_x/rb_ecore_x.c \
+            src/ecore_x/rb_window.c
+
+doc: $(DOC_INPUT)
+       rdoc $(DOC_INPUT)
diff --git a/README b/README
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..aad519d34da157b62b22c57345c84a11cd7871b1 100644 (file)
--- a/README
+++ b/README
@@ -0,0 +1,29 @@
+$Id: README 60 2004-08-10 14:12:36Z tilman $
+
+ruby-ecore - Ruby bindings for Ecore
+==================================
+
+
+About
+-----
+
+ruby-ecore is a set of Ruby language bindings for Enlightenment's Core
+library, Ecore.
+
+
+Installation
+------------
+
+Please see INSTALL.
+
+
+Documentation
+-------------
+
+To create the HTML documentation for ruby-ecore, a patched version of
+rdoc is required. The necessary patches can be found at
+http://code-monkey.de/?patches
+
+After you've patched rdoc, please run "make doc" to create the HTML.
+The docs can also be found at
+http://code-monkey.de/ruby-efl-docs/ecore
index 9355e36280a404ca0417a9004b60f28d0bf46be5..3487662a5f446d1ae8edd6660891db7baab76a16 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_ecore.c 53 2004-08-07 11:22:00Z tilman $
+ * $Id: rb_ecore.c 60 2004-08-10 14:12:36Z tilman $
  *
  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
  *
 
 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 ();
@@ -36,6 +42,12 @@ static VALUE m_main_loop_begin (VALUE self)
        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 ();
@@ -43,6 +55,12 @@ static VALUE m_main_loop_iterate (VALUE self)
        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 ();
index b890ef59a49b5726523e610a134c68ee03c33524..05550fd6f9786584271e6be0babbb2edc1392f29 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_idler.c 50 2004-08-01 10:18:39Z tilman $
+ * $Id: rb_idler.c 60 2004-08-10 14:12:36Z tilman $
  *
  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
  *
@@ -62,6 +62,14 @@ static void c_free (RbIdler *idler)
        free (idler);
 }
 
+/*
+ * call-seq:
+ *  Ecore::Idler.new { block } => idler
+ *
+ * Creates an Ecore::Idler object.
+ * When Ecore is idle, the specified block will be called.
+ * If the block returns false, the idler is deleted.
+ */
 static VALUE c_new (VALUE klass)
 {
        VALUE self;
@@ -82,6 +90,12 @@ static VALUE c_new (VALUE klass)
        return self;
 }
 
+/*
+ * call-seq:
+ *  idler.delete => nil
+ *
+ * Deletes <i>idler</i>.
+ */
 static VALUE c_delete (VALUE self)
 {
        GET_OBJ (self, RbIdler, idler);
index fa9ab155cb960d0a10482272215e00b945a1fad2..55b4a393bb74a86b3ef1954f4a22c6d5de5fedc2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_timer.c 50 2004-08-01 10:18:39Z tilman $
+ * $Id: rb_timer.c 60 2004-08-10 14:12:36Z tilman $
  *
  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
  *
@@ -62,6 +62,14 @@ static void c_free (RbTimer *timer)
        free (timer);
 }
 
+/*
+ * call-seq:
+ *  Ecore::Timer.new(interval) { block } => timer
+ *
+ * Creates an Ecore::Timer object with the specified interval.
+ * When the timeout is hit, the block is called.
+ * If the block returns false, the timer is deleted.
+ */
 static VALUE c_new (VALUE klass, VALUE interval)
 {
        VALUE self;
@@ -83,6 +91,12 @@ static VALUE c_new (VALUE klass, VALUE interval)
        return self;
 }
 
+/*
+ * call-seq:
+ *  timer.delete => nil
+ *
+ * Deletes <i>timer</i>.
+ */
 static VALUE c_delete (VALUE self)
 {
        GET_OBJ (self, RbTimer, timer);
index 057b5be85c62de4b4590b519da9ee0ca93eae33b..557ca04b9ff4ed3b05bcf8f758f1fe6ec9b5290d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_ecore_evas.c 50 2004-08-01 10:18:39Z tilman $
+ * $Id: rb_ecore_evas.c 60 2004-08-10 14:12:36Z tilman $
  *
  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
  *
@@ -30,7 +30,7 @@
 #include "rb_ecore_evas_main.h"
 #include "rb_ecore_evas.h"
 
-#define CALLBACK_ADD_HANDLER(name) \
+#define CALLBACK_DEFINE_HANDLER(name) \
        static void on_##name (Ecore_Evas *real) \
        { \
                VALUE self = rb_hash_aref (objects, INT2NUM ((long) real)); \
@@ -41,9 +41,8 @@
                cb = rb_hash_aref (ee->callbacks, rb_str_new2 (#name)); \
                rb_funcall (cb, rb_intern ("call"), 0); \
        } \
-\
-       static VALUE c_on_##name (VALUE self) \
-       { \
+
+#define CALLBACK_REG_HANDLER(name) \
                GET_OBJ (self, RbEcoreEvas, ee); \
 \
                if (!rb_block_given_p ()) \
 \
                ecore_evas_callback_##name##_set (ee->real, on_##name); \
 \
-               return Qnil; \
-       }
-
-#define CALLBACK_ADD(mod, name) \
-       rb_define_method ((mod), "on_"#name, c_on_##name, 0);
+               return Qnil;
 
 VALUE cEcoreEvas;
 static VALUE objects;
@@ -84,6 +79,7 @@ void c_ecore_evas_free (RbEcoreEvas *ee, bool free_mem)
                free (ee);
 }
 
+/* :nodoc: */
 static VALUE c_init (int argc, VALUE *argv, VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -96,11 +92,18 @@ static VALUE c_init (int argc, VALUE *argv, VALUE self)
        return Qnil;
 }
 
+/* :nodoc: */
 static VALUE c_inspect (VALUE self)
 {
        INSPECT (self, RbEcoreEvas);
 }
 
+/*
+ * call-seq:
+ *  ee.show => nil
+ *
+ * Shows <i>ee</i>.
+ */
 static VALUE c_show (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -110,6 +113,12 @@ static VALUE c_show (VALUE self)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.hide => nil
+ *
+ * Hides <i>ee</i>.
+ */
 static VALUE c_hide (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -119,6 +128,12 @@ static VALUE c_hide (VALUE self)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.visible? => true or false
+ *
+ * Returns true if <i>ee</i> is visible, else false.
+ */
 static VALUE c_visible_get (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -126,6 +141,12 @@ static VALUE c_visible_get (VALUE self)
        return ecore_evas_visibility_get (ee->real) ? Qtrue : Qfalse;
 }
 
+/*
+ * call-seq:
+ *   ee.raise => nil
+ *
+ * Raises <i>ee</i>.
+ */
 static VALUE c_raise (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -135,6 +156,12 @@ static VALUE c_raise (VALUE self)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.lower => nil
+ *
+ * Lowers <i>ee</i>.
+ */
 static VALUE c_lower (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -144,6 +171,12 @@ static VALUE c_lower (VALUE self)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *   ee.layer => fixnum
+ *
+ * Returns the layer of <i>ee</i>.
+ */
 static VALUE c_layer_get (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -151,6 +184,12 @@ static VALUE c_layer_get (VALUE self)
        return INT2FIX (ecore_evas_layer_get (ee->real));
 }
 
+/*
+ * call-seq:
+ *  ee.layer(fixnum) => fixnum
+ *
+ * Sets the layer of <i>ee</i>.
+ */
 static VALUE c_layer_set (VALUE self, VALUE val)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -162,6 +201,12 @@ static VALUE c_layer_set (VALUE self, VALUE val)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.evas => evas
+ *
+ * Returns the <code>Evas::Evas</code> object for <i>ee</i>.
+ */
 static VALUE c_evas_get (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -172,6 +217,16 @@ static VALUE c_evas_get (VALUE self)
        return ee->evas;
 }
 
+/*
+ * call-seq:
+ *  ee.geometry => array
+ *
+ * Returns an array containing the geometry of <i>ee</i>.
+ *
+ *  ee.move(150, 300)   #=> nil
+ *  ee.resize(200, 200) #=> nil
+ *  ee.geometry         #=> [150, 300, 200, 200]
+ */
 static VALUE c_geometry_get (VALUE self)
 {
        int x = 0, y = 0, w = 0, h = 0;
@@ -184,6 +239,15 @@ static VALUE c_geometry_get (VALUE self)
                            INT2FIX (w), INT2FIX (h));
 }
 
+/*
+ * call-seq:
+ *  ee.get_size_min => array
+ *
+ * Returns an array containing the minimum size of <i>ee</i>.
+ *
+ *  ee.set_size_min(100, 200) #=> nil
+ *  ee.get_size_min           #=> [100, 200]
+ */
 static VALUE c_get_size_min (VALUE self)
 {
        int w = 0, h = 0;
@@ -195,6 +259,14 @@ static VALUE c_get_size_min (VALUE self)
        return rb_ary_new3 (2, INT2FIX (w), INT2FIX (h));
 }
 
+/*
+ * call-seq:
+ *  ee.set_size_min(width, height) => nil
+ *
+ * Sets the minimum size of <i>ee</i>.
+ *
+ *  ee.set_size_min(100, 200) #=> nil
+ */
 static VALUE c_set_size_min (VALUE self, VALUE w, VALUE h)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -207,6 +279,15 @@ static VALUE c_set_size_min (VALUE self, VALUE w, VALUE h)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.get_size_max => array
+ *
+ * Returns an array containing the maximum size of <i>ee</i>.
+ *
+ *  ee.set_size_max(100, 200) #=> nil
+ *  ee.get_size_max           #=> [100, 200]
+ */
 static VALUE c_get_size_max (VALUE self)
 {
        int w = 0, h = 0;
@@ -218,6 +299,14 @@ static VALUE c_get_size_max (VALUE self)
        return rb_ary_new3 (2, INT2FIX (w), INT2FIX (h));
 }
 
+/*
+ * call-seq:
+ *  ee.set_size_max(width, height) => nil
+ *
+ * Sets the maximum size of <i>ee</i>.
+ *
+ *  ee.set_size_max(100, 200) #=> nil
+ */
 static VALUE c_set_size_max (VALUE self, VALUE w, VALUE h)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -230,6 +319,15 @@ static VALUE c_set_size_max (VALUE self, VALUE w, VALUE h)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.move(x, y) => nil
+ *
+ * Moves <i>ee</i> to the coordinates specified in
+ * <i>x</i> and <i>y</i>.
+ *
+ *  ee.move(100, 200) #=> nil
+ */
 static VALUE c_move (VALUE self, VALUE x, VALUE y)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -242,6 +340,14 @@ static VALUE c_move (VALUE self, VALUE x, VALUE y)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.resize(width, height) => nil
+ *
+ * Resizes <i>ee</i> to width x height.
+ *
+ *  ee.resize(100, 200) #=> nil
+ */
 static VALUE c_resize (VALUE self, VALUE w, VALUE h)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -254,6 +360,12 @@ static VALUE c_resize (VALUE self, VALUE w, VALUE h)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.title => string
+ *
+ * Returns the title of <i>ee</i>.
+ */
 static VALUE c_title_get (VALUE self)
 {
        const char *tmp;
@@ -266,6 +378,12 @@ static VALUE c_title_get (VALUE self)
                return rb_str_new2 (tmp);
 }
 
+/*
+ * call-seq:
+ *  ee.title(string)
+ *
+ * Sets the title of <i>ee</i>.
+ */
 static VALUE c_title_set (VALUE self, VALUE val)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -277,6 +395,12 @@ static VALUE c_title_set (VALUE self, VALUE val)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.borderless? => true or false
+ *
+ * Returns true if <i>ee</i> is borderless, else false.
+ */
 static VALUE c_borderless_get (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -284,6 +408,12 @@ static VALUE c_borderless_get (VALUE self)
        return ecore_evas_borderless_get (ee->real) ? Qtrue : Qfalse;
 }
 
+/*
+ * call-seq:
+ *  ee.borderless(true or false)
+ *
+ * Sets whether <i>ee</i> is borderless or not.
+ */
 static VALUE c_borderless_set (VALUE self, VALUE val)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -295,6 +425,12 @@ static VALUE c_borderless_set (VALUE self, VALUE val)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.shaped? => true or false
+ *
+ * Returns true if <i>ee</i> is shaped, else false.
+ */
 static VALUE c_shaped_get (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -302,6 +438,12 @@ static VALUE c_shaped_get (VALUE self)
        return ecore_evas_shaped_get (ee->real) ? Qtrue : Qfalse;
 }
 
+/*
+ * call-seq:
+ *  ee.shaped(true or false)
+ *
+ * Sets whether <i>ee</i> is shaped or not.
+ */
 static VALUE c_shaped_set (VALUE self, VALUE val)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -313,6 +455,12 @@ static VALUE c_shaped_set (VALUE self, VALUE val)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.sticky? => true or false
+ *
+ * Returns true if <i>ee</i> is sticky, else false.
+ */
 static VALUE c_sticky_get (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -320,6 +468,12 @@ static VALUE c_sticky_get (VALUE self)
        return ecore_evas_sticky_get (ee->real) ? Qtrue : Qfalse;
 }
 
+/*
+ * call-seq:
+ *  ee.sticky(true or false)
+ *
+ * Sets whether <i>ee</i> is sticky or not.
+ */
 static VALUE c_sticky_set (VALUE self, VALUE val)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -331,6 +485,12 @@ static VALUE c_sticky_set (VALUE self, VALUE val)
        return Qnil;
 }
 
+/*
+ * call-seq:
+ *  ee.rotation => fixnum
+ *
+ * Returns the rotation of <i>ee</i>.
+ */
 static VALUE c_rotation_get (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -338,6 +498,12 @@ static VALUE c_rotation_get (VALUE self)
        return INT2FIX (ecore_evas_rotation_get (ee->real));
 }
 
+/*
+ * call-seq:
+ *  ee.rotation(fixnum)
+ *
+ * Sets the rotation of <i>ee</i>.
+ */
 static VALUE c_rotation_set (VALUE self, VALUE val)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -349,7 +515,9 @@ static VALUE c_rotation_set (VALUE self, VALUE val)
        return Qnil;
 }
 
-/* FIXME: this is unsafe! */
+/* FIXME: this is unsafe!
+ * :nodoc:
+ */
 static VALUE c_delete (VALUE self)
 {
        GET_OBJ (self, RbEcoreEvas, ee);
@@ -364,18 +532,150 @@ static VALUE c_delete (VALUE self)
        return Qnil;
 }
 
-CALLBACK_ADD_HANDLER (resize);
-CALLBACK_ADD_HANDLER (move);
-CALLBACK_ADD_HANDLER (show);
-CALLBACK_ADD_HANDLER (hide);
-CALLBACK_ADD_HANDLER (delete_request);
-CALLBACK_ADD_HANDLER (destroy);
-CALLBACK_ADD_HANDLER (focus_in);
-CALLBACK_ADD_HANDLER (focus_out);
-CALLBACK_ADD_HANDLER (mouse_in);
-CALLBACK_ADD_HANDLER (mouse_out);
-CALLBACK_ADD_HANDLER (pre_render);
-CALLBACK_ADD_HANDLER (post_render);
+CALLBACK_DEFINE_HANDLER (resize);
+CALLBACK_DEFINE_HANDLER (move);
+CALLBACK_DEFINE_HANDLER (show);
+CALLBACK_DEFINE_HANDLER (hide);
+CALLBACK_DEFINE_HANDLER (delete_request);
+CALLBACK_DEFINE_HANDLER (destroy);
+CALLBACK_DEFINE_HANDLER (focus_in);
+CALLBACK_DEFINE_HANDLER (focus_out);
+CALLBACK_DEFINE_HANDLER (mouse_in);
+CALLBACK_DEFINE_HANDLER (mouse_out);
+CALLBACK_DEFINE_HANDLER (pre_render);
+CALLBACK_DEFINE_HANDLER (post_render);
+
+/*
+ * call-seq:
+ *  ee.on_resize { block } => nil
+ *
+ * Sets the handler for the resize event.
+ */
+static VALUE c_on_resize (VALUE self)
+{
+       CALLBACK_REG_HANDLER (resize);
+}
+
+/*
+ * call-seq:
+ *  ee.on_move { block } => nil
+ *
+ * Sets the handler for the move event.
+ */
+static VALUE c_on_move (VALUE self)
+{
+       CALLBACK_REG_HANDLER (move);
+}
+
+/*
+ * call-seq:
+ *  ee.on_show { block } => nil
+ *
+ * Sets the handler for the show event.
+ */
+static VALUE c_on_show (VALUE self)
+{
+       CALLBACK_REG_HANDLER (show);
+}
+
+/*
+ * call-seq:
+ *  ee.on_hide { block } => nil
+ *
+ * Sets the handler for the hide event.
+ */
+static VALUE c_on_hide (VALUE self)
+{
+       CALLBACK_REG_HANDLER (hide);
+}
+
+/*
+ * call-seq:
+ *  ee.on_delete_request { block } => nil
+ *
+ * Sets the handler for the delete request event.
+ */
+static VALUE c_on_delete_request (VALUE self)
+{
+       CALLBACK_REG_HANDLER (delete_request);
+}
+
+/*
+ * call-seq:
+ *  ee.on_destroy { block } => nil
+ *
+ * Sets the handler for the destroy event.
+ */
+static VALUE c_on_destroy (VALUE self)
+{
+       CALLBACK_REG_HANDLER (destroy);
+}
+
+/*
+ * call-seq:
+ *  ee.on_focus_in { block } => nil
+ *
+ * Sets the handler for the focus in event.
+ */
+static VALUE c_on_focus_in (VALUE self)
+{
+       CALLBACK_REG_HANDLER (focus_in);
+}
+
+/*
+ * call-seq:
+ *  ee.on_focus_out { block } => nil
+ *
+ * Sets the handler for the focus out event.
+ */
+static VALUE c_on_focus_out (VALUE self)
+{
+       CALLBACK_REG_HANDLER (focus_out);
+}
+
+/*
+ * call-seq:
+ *  ee.on_mouse_in { block } => nil
+ *
+ * Sets the handler for the mouse in event.
+ */
+static VALUE c_on_mouse_in (VALUE self)
+{
+       CALLBACK_REG_HANDLER (mouse_in);
+}
+
+/*
+ * call-seq:
+ *  ee.on_mouse_out { block } => nil
+ *
+ * Sets the handler for the mouse out event.
+ */
+static VALUE c_on_mouse_out (VALUE self)
+{
+       CALLBACK_REG_HANDLER (mouse_out);
+}
+
+/*
+ * call-seq:
+ *  ee.on_pre_render { block } => nil
+ *
+ * Sets the handler for the pre render event.
+ */
+static VALUE c_on_pre_render (VALUE self)
+{
+       CALLBACK_REG_HANDLER (pre_render);
+}
+
+/*
+ * call-seq:
+ *  ee.on_post_render { block } => nil
+ *
+ * Sets the handler for the post render event.
+ */
+static VALUE c_on_post_render (VALUE self)
+{
+       CALLBACK_REG_HANDLER (post_render);
+}
 
 void Init_EcoreEvas (void)
 {
@@ -412,18 +712,18 @@ void Init_EcoreEvas (void)
        rb_define_method (cEcoreEvas, "rotation", c_rotation_get, 0);
        rb_define_method (cEcoreEvas, "rotation=", c_rotation_set, 1);
 
-       CALLBACK_ADD (cEcoreEvas, resize);
-       CALLBACK_ADD (cEcoreEvas, move);
-       CALLBACK_ADD (cEcoreEvas, show);
-       CALLBACK_ADD (cEcoreEvas, hide);
-       CALLBACK_ADD (cEcoreEvas, delete_request);
-       CALLBACK_ADD (cEcoreEvas, destroy);
-       CALLBACK_ADD (cEcoreEvas, focus_in);
-       CALLBACK_ADD (cEcoreEvas, focus_out);
-       CALLBACK_ADD (cEcoreEvas, mouse_in);
-       CALLBACK_ADD (cEcoreEvas, mouse_out);
-       CALLBACK_ADD (cEcoreEvas, pre_render);
-       CALLBACK_ADD (cEcoreEvas, post_render);
+       rb_define_method (cEcoreEvas, "on_resize", c_on_resize, 0);
+       rb_define_method (cEcoreEvas, "on_move", c_on_move, 0);
+       rb_define_method (cEcoreEvas, "on_show", c_on_show, 0);
+       rb_define_method (cEcoreEvas, "on_hide", c_on_hide, 0);
+       rb_define_method (cEcoreEvas, "on_delete_request", c_on_delete_request, 0);
+       rb_define_method (cEcoreEvas, "on_destroy", c_on_destroy, 0);
+       rb_define_method (cEcoreEvas, "on_focus_in", c_on_focus_in, 0);
+       rb_define_method (cEcoreEvas, "on_focus_out", c_on_focus_out, 0);
+       rb_define_method (cEcoreEvas, "on_mouse_in", c_on_mouse_in, 0);
+       rb_define_method (cEcoreEvas, "on_mouse_out", c_on_mouse_out, 0);
+       rb_define_method (cEcoreEvas, "on_pre_render", c_on_pre_render, 0);
+       rb_define_method (cEcoreEvas, "on_post_render", c_on_post_render, 0);
 
        objects = rb_hash_new ();
        rb_global_variable (&objects);
index 42412ee25740371595059069315794036f9911e4..2f49e5d4788320cd41f9a6175d9e11ef5eb0f8ad 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_fb.c 50 2004-08-01 10:18:39Z tilman $
+ * $Id: rb_fb.c 60 2004-08-10 14:12:36Z tilman $
  *
  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
  *
@@ -31,6 +31,12 @@ static void c_free (RbEcoreEvas *ee)
        c_ecore_evas_free (ee, true);
 }
 
+/*
+ * call-seq:
+ *  Ecore::Evas::Fb.new([display, rotation, w, h]) => fb
+ *
+ * Creates an Ecore::Evas::Fb object.
+ */
 static VALUE c_new (int argc, VALUE *argv, VALUE klass)
 {
        VALUE self, disp, rot, w, h;
index c143ea7bcf68dee77f2a101c3c1246ae0508f88a..c5375888259f0b4d56e4be6151ec132c2a20a65d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_gl_x11.c 50 2004-08-01 10:18:39Z tilman $
+ * $Id: rb_gl_x11.c 60 2004-08-10 14:12:36Z tilman $
  *
  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
  *
@@ -31,6 +31,12 @@ static void c_free (RbEcoreEvas *ee)
        c_ecore_evas_free (ee, true);
 }
 
+/*
+ * call-seq:
+ *  Ecore::Evas::GlX11.new([display, parent, x, y, w, h]) => glx11
+ *
+ * Creates an Ecore::Evas::GlX11 object.
+ */
 static VALUE c_new (int argc, VALUE *argv, VALUE klass)
 {
        VALUE self, disp, parent, geom[4];
index f694e3e68e7eda916b7fe93620f0d7a5f7ae210c..0b480196acd4c2be46fadbb5f75b868fe0f83e75 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_software_x11.c 50 2004-08-01 10:18:39Z tilman $
+ * $Id: rb_software_x11.c 60 2004-08-10 14:12:36Z tilman $
  *
  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
  *
@@ -49,6 +49,12 @@ static void c_free (RbEcoreEvasSoftwareX11 *ee)
        free (ee);
 }
 
+/*
+ * call-seq:
+ *  Ecore::Evas::SoftwareX11.new([display, parent, x, y, w, h]) => swx11
+ *
+ * Creates an Ecore::Evas::SoftwareX11 object.
+ */
 static VALUE c_new (int argc, VALUE *argv, VALUE klass)
 {
        VALUE self, disp, parent, geom[4];
@@ -86,6 +92,12 @@ static VALUE c_new (int argc, VALUE *argv, VALUE klass)
        return self;
 }
 
+/*
+ * call-seq:
+ *  swx11.window => window
+ *
+ * Returns the <code>Ecore::X::Window</code> object for <i>swx11</i>.
+ */
 static VALUE c_window_get (VALUE self)
 {
        Ecore_X_Window w;
index d4348cffb0660f8c6ebb598eaddd0f8e6583e960..e6d93f0c0a664ae2ebc96409802ad48090f576c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_job.c 50 2004-08-01 10:18:39Z tilman $
+ * $Id: rb_job.c 60 2004-08-10 14:12:36Z tilman $
  *
  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
  *
@@ -55,6 +55,13 @@ static void c_free (RbJob *job)
        free (job);
 }
 
+/*
+ * call-seq:
+ *  Ecore::Job::Job.new { block } => job
+ *
+ * Creates an Ecore::Job::Job object.
+ * After execution, the object will be deleted.
+ */
 static VALUE c_new (VALUE klass)
 {
        VALUE self;
@@ -75,6 +82,12 @@ static VALUE c_new (VALUE klass)
        return self;
 }
 
+/*
+ * call-seq:
+ *  job.delete => nil
+ *
+ * Deletes <i>job</i>.
+ */
 static VALUE c_delete (VALUE self)
 {
        VALUE ret = Qfalse;