/*
- * $Id: rb_part.c 113 2004-10-10 10:00:07Z tilman $
+ * $Id: rb_part.c 225 2005-02-11 12:46:52Z tilman $
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
return Qnil;
}
+static VALUE c_state_get (VALUE self)
+{
+ const char *name;
+ double val = 0.0;
+
+ GET_OBJ (GET_EDJE (self), RbEdje, e);
+
+ name = edje_object_part_state_get (e->real.real,
+ GET_NAME (self), &val);
+
+ return rb_ary_new3 (2, rb_str_new2 (name), rb_float_new (val));
+}
+
void Init_Part (void)
{
cPart = rb_define_class_under (mEdje, "Part", rb_cObject);
rb_define_method (cPart, "text=", c_text_set, 1);
rb_define_method (cPart, "get_drag_value", c_get_drag_value, 0);
rb_define_method (cPart, "set_drag_value", c_set_drag_value, 2);
+ rb_define_method (cPart, "state", c_state_get, 0);
}