X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fecore_evas%2Frb_fb.c;h=b5c262b7484a9883fe23236ca22e35c0e8e971e3;hb=773ea0f0b86cf8d4c738d3147eebc9b24f68114a;hp=86b12c24a3bedcd804ea1da6f599b0a438ed10c2;hpb=2de5f9f833885104f3fb1bf1636d7323c160cdfd;p=ruby-ecore.git diff --git a/src/ecore_evas/rb_fb.c b/src/ecore_evas/rb_fb.c index 86b12c2..b5c262b 100644 --- a/src/ecore_evas/rb_fb.c +++ b/src/ecore_evas/rb_fb.c @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: rb_fb.c 27 2004-07-08 18:25:05Z tilman $ * * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de) * @@ -20,21 +20,21 @@ #include +#include #include #include "rb_ecore_evas_main.h" #include "rb_ecore_evas.h" -VALUE cFb; - -static VALUE c_init (int argc, VALUE *argv, VALUE self) +static VALUE c_new (int argc, VALUE *argv, VALUE klass) { - VALUE disp, rot, w, h; + VALUE self, disp, rot, w, h; Ecore_Evas **ee = NULL; char *cdisp = NULL; int irot = 0, iw = 0, ih = 0; - Data_Get_Struct (self, Ecore_Evas *, ee); + self = Data_Make_Struct (klass, Ecore_Evas *, + NULL, c_ecore_evas_free, ee); rb_scan_args (argc, argv, "04", &disp, &rot, &w, &h); @@ -58,29 +58,19 @@ static VALUE c_init (int argc, VALUE *argv, VALUE self) ih = NUM2INT (h); } - *ee = ecore_evas_fb_new (cdisp, irot, iw, ih); - - return self; -} + ecore_init (); + ecore_evas_init (); -static VALUE c_new (int argc, VALUE *argv, VALUE klass) -{ - VALUE self; - Ecore_Evas **ee; - - self = Data_Make_Struct (klass, Ecore_Evas *, - NULL, c_ecore_evas_free, ee); + *ee = ecore_evas_fb_new (cdisp, irot, iw, ih); - rb_obj_call_init (self, argc, argv); + rb_obj_call_init (self, 0, NULL); return self; } void Init_Fb (void) { - cFb = rb_define_class_under (mEvas, "Fb", cEcoreEvas); + VALUE cFb = rb_define_class_under (mEvas, "Fb", cEcoreEvas); rb_define_singleton_method (cFb, "new", c_new, -1); - rb_define_method (cFb, "initialize", c_init, -1); } -