-## $Id: Makefile.am 10 2004-06-19 19:57:02Z tilman $
+## $Id: Makefile.am 22 2004-06-26 16:43:41Z tilman $
AM_CFLAGS = $(ECORE_CFLAGS) $(EVAS_CFLAGS)
INCLUDES = -I$(RUBYDIR) -I$(RUBYSITEDIR)
ecore_evas_la_SOURCES = rb_ecore_evas_main.c rb_ecore_evas_main.h \
rb_ecore_evas.c rb_ecore_evas.h \
rb_software_x11.c rb_software_x11.h \
- rb_gl_x11.c rb_gl_x11.h
+ rb_gl_x11.c rb_gl_x11.h \
+ rb_fb.c rb_fb.h
ecore_evas_la_LIBADD = -lruby $(ECORE_LIBS) $(EVAS_LIBS)
ecore_evas_la_LDFLAGS = -module -avoid-version
--- /dev/null
+/*
+ * $Id$
+ *
+ * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <ruby.h>
+
+#include <Ecore_Evas.h>
+
+#include "rb_ecore_evas_main.h"
+#include "rb_ecore_evas.h"
+
+VALUE cFb;
+
+static VALUE c_init (int argc, VALUE *argv, VALUE self)
+{
+ VALUE 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);
+
+ rb_scan_args (argc, argv, "04", &disp, &rot, &w, &h);
+
+ if (!NIL_P (disp)) {
+ Check_Type (disp, T_STRING);
+ cdisp = StringValuePtr (disp);
+ }
+
+ if (!NIL_P (rot)) {
+ Check_Type (rot, T_FIXNUM);
+ irot = NUM2INT (rot);
+ }
+
+ if (!NIL_P (w)) {
+ Check_Type (w, T_FIXNUM);
+ iw = NUM2INT (w);
+ }
+
+ if (!NIL_P (h)) {
+ Check_Type (h, T_FIXNUM);
+ ih = NUM2INT (h);
+ }
+
+ *ee = ecore_evas_fb_new (cdisp, irot, iw, ih);
+
+ return self;
+}
+
+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);
+
+ rb_obj_call_init (self, argc, argv);
+
+ return self;
+}
+
+void Init_Fb (void)
+{
+ 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);
+}
+
--- /dev/null
+/*
+ * $Id$
+ *
+ * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __RB_FB_H
+#define __RB_FB_H
+
+void Init_Fb (void);
+
+#endif