X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fecore%2Frb_idler.c;h=263b7149b4561349ed567e5f6500cd8f04e90315;hb=d11d27f56a611be4523b0caed6da93a4cc5269f6;hp=b890ef59a49b5726523e610a134c68ee03c33524;hpb=f805cf241a9d1fb9765892f0af48ede8359e9b65;p=ruby-ecore.git diff --git a/src/ecore/rb_idler.c b/src/ecore/rb_idler.c index b890ef5..263b714 100644 --- a/src/ecore/rb_idler.c +++ b/src/ecore/rb_idler.c @@ -1,7 +1,7 @@ /* - * $Id: rb_idler.c 50 2004-08-01 10:18:39Z tilman $ + * $Id: rb_idler.c 77 2004-08-19 17:39:29Z tilman $ * - * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) + * Copyright (C) 2004 ruby-ecore team (see AUTHORS) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -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; @@ -75,6 +83,7 @@ static VALUE c_new (VALUE klass) ecore_init (); idler->callback = rb_block_proc (); + idler->deleted = false; idler->real = ecore_idler_add (on_idler, idler); rb_obj_call_init (self, 0, NULL); @@ -82,6 +91,12 @@ static VALUE c_new (VALUE klass) return self; } +/* + * call-seq: + * idler.delete => nil + * + * Deletes idler. + */ static VALUE c_delete (VALUE self) { GET_OBJ (self, RbIdler, idler);