X-Git-Url: http://git.code-monkey.de/?p=ruby-ecore.git;a=blobdiff_plain;f=src%2Fecore_evas%2Frb_fb.c;h=42412ee25740371595059069315794036f9911e4;hp=8359ef2b6a943eba3582f7a96ad149f6b86ec984;hb=f805cf241a9d1fb9765892f0af48ede8359e9b65;hpb=4f5c88b4cfae4d5fb177710b09624f2e229d6a1b diff --git a/src/ecore_evas/rb_fb.c b/src/ecore_evas/rb_fb.c index 8359ef2..42412ee 100644 --- a/src/ecore_evas/rb_fb.c +++ b/src/ecore_evas/rb_fb.c @@ -1,5 +1,5 @@ /* - * $Id: rb_fb.c 40 2004-07-25 13:14:34Z tilman $ + * $Id: rb_fb.c 50 2004-08-01 10:18:39Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -26,15 +26,20 @@ #include "rb_ecore_evas_main.h" #include "rb_ecore_evas.h" +static void c_free (RbEcoreEvas *ee) +{ + c_ecore_evas_free (ee, true); +} + static VALUE c_new (int argc, VALUE *argv, VALUE klass) { VALUE self, disp, rot, w, h; - Ecore_Evas **ee = NULL; + RbEcoreEvas *ee = NULL; char *cdisp = NULL; int irot = 0, iw = 0, ih = 0; - self = Data_Make_Struct (klass, Ecore_Evas *, - NULL, c_ecore_evas_free, ee); + self = Data_Make_Struct (klass, RbEcoreEvas, + c_ecore_evas_mark, c_free, ee); rb_scan_args (argc, argv, "04", &disp, &rot, &w, &h); @@ -45,23 +50,23 @@ static VALUE c_new (int argc, VALUE *argv, VALUE klass) if (!NIL_P (rot)) { Check_Type (rot, T_FIXNUM); - irot = NUM2INT (rot); + irot = FIX2INT (rot); } if (!NIL_P (w)) { Check_Type (w, T_FIXNUM); - iw = NUM2INT (w); + iw = FIX2INT (w); } if (!NIL_P (h)) { Check_Type (h, T_FIXNUM); - ih = NUM2INT (h); + ih = FIX2INT (h); } ecore_init (); ecore_evas_init (); - *ee = ecore_evas_fb_new (cdisp, irot, iw, ih); + ee->real = ecore_evas_fb_new (cdisp, irot, iw, ih); rb_obj_call_init (self, 0, NULL);