X-Git-Url: http://git.code-monkey.de/?p=ruby-edje.git;a=blobdiff_plain;f=src%2Frb_edje_main.c;h=eef4cfbd0b43c21dfcef5e460dcad8ac7504b878;hp=d11d4565121cf206f3f1a460d18782173f0cd372;hb=00a4c037d60430de9f496f26804474949dceebad;hpb=9df644ecd3547f65ac0685ce46c6f2f6bb50d089 diff --git a/src/rb_edje_main.c b/src/rb_edje_main.c index d11d456..eef4cfb 100644 --- a/src/rb_edje_main.c +++ b/src/rb_edje_main.c @@ -1,6 +1,4 @@ /* - * $Id: rb_edje_main.c 330 2005-04-28 15:38:47Z tilman $ - * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * * This library is free software; you can redistribute it and/or @@ -34,7 +32,9 @@ */ static VALUE m_freeze (VALUE self) { + edje_init (); edje_freeze (); + edje_shutdown (); return Qnil; } @@ -47,7 +47,9 @@ static VALUE m_freeze (VALUE self) */ static VALUE m_thaw (VALUE self) { + edje_init (); edje_thaw (); + edje_shutdown (); return Qnil; } @@ -60,7 +62,13 @@ static VALUE m_thaw (VALUE self) */ static VALUE m_frametime_get (VALUE self) { - return rb_float_new (edje_frametime_get ()); + VALUE ret; + + edje_init (); + ret = rb_float_new (edje_frametime_get ()); + edje_shutdown (); + + return ret; } /* @@ -73,7 +81,9 @@ static VALUE m_frametime_set (VALUE self, VALUE val) { Check_Type (val, T_FLOAT); + edje_init (); edje_frametime_set (NUM2DBL (val)); + edje_shutdown (); return Qnil; } @@ -87,14 +97,17 @@ static VALUE m_collections_get (VALUE self, VALUE file) ary = rb_ary_new (); + edje_init (); + list = edje_file_collection_list (StringValuePtr (file)); - if (!list) - return ary; + if (list) { + for (l = list; l; l = l->next) + rb_ary_push (ary, rb_str_new2 (l->data)); - for (l = list; l; l = l->next) - rb_ary_push (ary, rb_str_new2 (l->data)); + edje_file_collection_list_free (list); + } - edje_file_collection_list_free (list); + edje_shutdown (); return ary; }