projects
/
ruby-edje.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1043748
)
Implemented Edje#data.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Fri, 22 Oct 2004 17:03:35 +0000
(17:03 +0000)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Fri, 22 Oct 2004 17:03:35 +0000
(17:03 +0000)
src/rb_edje.c
patch
|
blob
|
history
diff --git
a/src/rb_edje.c
b/src/rb_edje.c
index 4b76cce71a771229b01f52254012c3852ecf2224..711df113b0d1a4bf259242d1d1dd55477f2ff7b1 100644
(file)
--- a/
src/rb_edje.c
+++ b/
src/rb_edje.c
@@
-1,5
+1,5
@@
/*
/*
- * $Id: rb_edje.c
96 2004-08-23 15:21:41
Z tilman $
+ * $Id: rb_edje.c
129 2004-10-22 17:03:35
Z tilman $
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
@@
-382,6
+382,19
@@
static VALUE c_animation_set (VALUE self, VALUE val)
return Qnil;
}
return Qnil;
}
+static VALUE c_data_get (VALUE self, VALUE key)
+{
+ const char *s;
+
+ GET_OBJ (self, RbEdje, e);
+
+ Check_Type (key, T_STRING);
+
+ s = edje_object_data_get (e->real.real, StringValuePtr (key));
+
+ return s ? rb_str_new2 (s) : Qnil;
+}
+
void Init_Edje (void)
{
cEdje = rb_define_class_under (mEdje, "Edje", cEvasObject);
void Init_Edje (void)
{
cEdje = rb_define_class_under (mEdje, "Edje", cEvasObject);
@@
-401,4
+414,5
@@
void Init_Edje (void)
rb_define_method (cEdje, "play=", c_play_set, 1);
rb_define_method (cEdje, "animation?", c_animation_get, 0);
rb_define_method (cEdje, "animation=", c_animation_set, 1);
rb_define_method (cEdje, "play=", c_play_set, 1);
rb_define_method (cEdje, "animation?", c_animation_get, 0);
rb_define_method (cEdje, "animation=", c_animation_set, 1);
+ rb_define_method (cEdje, "data", c_data_get, 1);
}
}