projects
/
ruby-ecore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When we create the root window object, just pass 0 for the window id.
[ruby-ecore.git]
/
src
/
ecore_evas
/
rb_fb.c
diff --git
a/src/ecore_evas/rb_fb.c
b/src/ecore_evas/rb_fb.c
index b5c262b7484a9883fe23236ca22e35c0e8e971e3..8192169278ec4ff6e4f409276e7cb3a27b113828 100644
(file)
--- a/
src/ecore_evas/rb_fb.c
+++ b/
src/ecore_evas/rb_fb.c
@@
-1,7
+1,7
@@
/*
/*
- * $Id: rb_fb.c
27 2004-07-08 18:25:05
Z tilman $
+ * $Id: rb_fb.c
77 2004-08-19 17:39:29
Z 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
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@
-26,15
+26,26
@@
#include "rb_ecore_evas_main.h"
#include "rb_ecore_evas.h"
#include "rb_ecore_evas_main.h"
#include "rb_ecore_evas.h"
+static void c_free (RbEcoreEvas *ee)
+{
+ c_ecore_evas_free (ee, true);
+}
+
+/*
+ * call-seq:
+ * Ecore::Evas::Fb.new([display, rotation, w, h]) => fb
+ *
+ * Creates an Ecore::Evas::Fb object.
+ */
static VALUE c_new (int argc, VALUE *argv, VALUE klass)
{
VALUE self, disp, rot, w, h;
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;
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);
rb_scan_args (argc, argv, "04", &disp, &rot, &w, &h);
@@
-45,23
+56,23
@@
static VALUE c_new (int argc, VALUE *argv, VALUE klass)
if (!NIL_P (rot)) {
Check_Type (rot, T_FIXNUM);
if (!NIL_P (rot)) {
Check_Type (rot, T_FIXNUM);
- irot =
NUM
2INT (rot);
+ irot =
FIX
2INT (rot);
}
if (!NIL_P (w)) {
Check_Type (w, T_FIXNUM);
}
if (!NIL_P (w)) {
Check_Type (w, T_FIXNUM);
- iw =
NUM
2INT (w);
+ iw =
FIX
2INT (w);
}
if (!NIL_P (h)) {
Check_Type (h, T_FIXNUM);
}
if (!NIL_P (h)) {
Check_Type (h, T_FIXNUM);
- ih =
NUM
2INT (h);
+ ih =
FIX
2INT (h);
}
ecore_init ();
ecore_evas_init ();
}
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);
rb_obj_call_init (self, 0, NULL);
@@
-70,7
+81,7
@@
static VALUE c_new (int argc, VALUE *argv, VALUE klass)
void Init_Fb (void)
{
void Init_Fb (void)
{
- VALUE c
Fb
= rb_define_class_under (mEvas, "Fb", cEcoreEvas);
+ VALUE c = rb_define_class_under (mEvas, "Fb", cEcoreEvas);
- rb_define_singleton_method (c
Fb
, "new", c_new, -1);
+ rb_define_singleton_method (c, "new", c_new, -1);
}
}