projects
/
ruby-ecore.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7c414c4
)
Use the new GET_OBJ macro.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sat, 19 Jun 2004 20:15:40 +0000
(20:15 +0000)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Sat, 19 Jun 2004 20:15:40 +0000
(20:15 +0000)
src/ecore_evas/rb_ecore_evas.c
patch
|
blob
|
history
diff --git
a/src/ecore_evas/rb_ecore_evas.c
b/src/ecore_evas/rb_ecore_evas.c
index 040ac6848275e0eee27a8a156ac4155fe6fb417c..b81cdf46472b1a3164c6ce63e634937704bcfbc4 100644
(file)
--- a/
src/ecore_evas/rb_ecore_evas.c
+++ b/
src/ecore_evas/rb_ecore_evas.c
@@
-1,5
+1,5
@@
/*
/*
- * $Id: rb_ecore_evas.c
9 2004-06-19 19:53:47
Z tilman $
+ * $Id: rb_ecore_evas.c
12 2004-06-19 20:15:40
Z tilman $
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
@@
-26,13
+26,13
@@
#include "rb_ecore_evas_main.h"
#include "rb_ecore_evas.h"
#include "rb_ecore_evas_main.h"
#include "rb_ecore_evas.h"
-#define GET_OBJ(obj,
ee
) \
-
Ecore_Evas **(ee
) = NULL; \
+#define GET_OBJ(obj,
type, o, desc
) \
+
type **(o
) = NULL; \
\
\
- Data_Get_Struct ((obj),
Ecore_Evas *, (ee
)); \
+ Data_Get_Struct ((obj),
type *, (o
)); \
\
\
- if (!*(
ee
)) { \
- rb_raise (rb_eException,
"EcoreEvas
destroyed already"); \
+ if (!*(
o
)) { \
+ rb_raise (rb_eException,
desc "
destroyed already"); \
return Qnil; \
}
return Qnil; \
}
@@
-59,7
+59,7
@@
static VALUE c_init (int argc, VALUE argv, VALUE self)
static VALUE c_show (VALUE self)
{
static VALUE c_show (VALUE self)
{
- GET_OBJ (self,
ee
);
+ GET_OBJ (self,
Ecore_Evas, ee, "EcoreEvas"
);
ecore_evas_show (*ee);
ecore_evas_show (*ee);
@@
-68,7
+68,7
@@
static VALUE c_show (VALUE self)
static VALUE c_hide (VALUE self)
{
static VALUE c_hide (VALUE self)
{
- GET_OBJ (self,
ee
);
+ GET_OBJ (self,
Ecore_Evas, ee, "EcoreEvas"
);
ecore_evas_hide (*ee);
ecore_evas_hide (*ee);
@@
-77,21
+77,21
@@
static VALUE c_hide (VALUE self)
static VALUE c_is_visible (VALUE self)
{
static VALUE c_is_visible (VALUE self)
{
- GET_OBJ (self,
ee
);
+ GET_OBJ (self,
Ecore_Evas, ee, "EcoreEvas"
);
return ecore_evas_visibility_get (*ee) ? Qtrue : Qfalse;
}
static VALUE c_evas (VALUE self)
{
return ecore_evas_visibility_get (*ee) ? Qtrue : Qfalse;
}
static VALUE c_evas (VALUE self)
{
- GET_OBJ (self,
ee
);
+ GET_OBJ (self,
Ecore_Evas, ee, "EcoreEvas"
);
return TO_EVAS (self, ecore_evas_get (*ee));
}
static VALUE c_resize (VALUE self, VALUE w, VALUE h)
{
return TO_EVAS (self, ecore_evas_get (*ee));
}
static VALUE c_resize (VALUE self, VALUE w, VALUE h)
{
- GET_OBJ (self,
ee
);
+ GET_OBJ (self,
Ecore_Evas, ee, "EcoreEvas"
);
Check_Type (w, T_FIXNUM);
Check_Type (h, T_FIXNUM);
Check_Type (w, T_FIXNUM);
Check_Type (h, T_FIXNUM);
@@
-105,7
+105,7
@@
static VALUE c_title_get (VALUE self)
{
const char *tmp;
{
const char *tmp;
- GET_OBJ (self,
ee
);
+ GET_OBJ (self,
Ecore_Evas, ee, "EcoreEvas"
);
if (!(tmp = ecore_evas_title_get (*ee)))
return Qnil;
if (!(tmp = ecore_evas_title_get (*ee)))
return Qnil;
@@
-115,7
+115,7
@@
static VALUE c_title_get (VALUE self)
static VALUE c_title_set (VALUE self, VALUE val)
{
static VALUE c_title_set (VALUE self, VALUE val)
{
- GET_OBJ (self,
ee
);
+ GET_OBJ (self,
Ecore_Evas, ee, "EcoreEvas"
);
Check_Type (val, T_STRING);
Check_Type (val, T_STRING);
@@
-126,14
+126,14
@@
static VALUE c_title_set (VALUE self, VALUE val)
static VALUE c_borderless_get (VALUE self)
{
static VALUE c_borderless_get (VALUE self)
{
- GET_OBJ (self,
ee
);
+ GET_OBJ (self,
Ecore_Evas, ee, "EcoreEvas"
);
return ecore_evas_borderless_get (*ee) ? Qtrue : Qfalse;
}
static VALUE c_borderless_set (VALUE self, VALUE val)
{
return ecore_evas_borderless_get (*ee) ? Qtrue : Qfalse;
}
static VALUE c_borderless_set (VALUE self, VALUE val)
{
- GET_OBJ (self,
ee
);
+ GET_OBJ (self,
Ecore_Evas, ee, "EcoreEvas"
);
/* make sure we're passed a boolean */
if (TYPE (val) != T_TRUE && TYPE (val) != T_FALSE) {
/* make sure we're passed a boolean */
if (TYPE (val) != T_TRUE && TYPE (val) != T_FALSE) {
@@
-150,7
+150,7
@@
static VALUE c_borderless_set (VALUE self, VALUE val)
static VALUE c_delete (VALUE self)
{
static VALUE c_delete (VALUE self)
{
- GET_OBJ (self,
ee
);
+ GET_OBJ (self,
Ecore_Evas, ee, "EcoreEvas"
);
/* reap our children */
rb_gc_start ();
/* reap our children */
rb_gc_start ();