- if (!(obj = evas_object_data_get (o, RUBY_EVAS_OBJECT_KEY))) {
- rb_raise (rb_eException, "EvasObject Ruby object key missing");
- return Qnil;
- }
+ return TO_EVAS_OBJECT (o);
+}
+
+static VALUE c_output_size_get (VALUE self)
+{
+ int w = 0, h = 0;
+
+ GET_OBJ (self, RbEvas, e);
+
+ evas_output_size_get (e->real, &w, &h);
+
+ return rb_ary_new3 (2, INT2FIX (w), INT2FIX (h));
+}
+
+static VALUE c_output_viewport_get (VALUE self)
+{
+ int x = 0, y = 0, w = 0, h = 0;
+
+ GET_OBJ (self, RbEvas, e);
+
+ evas_output_viewport_get (e->real,
+ (Evas_Coord *) &x, (Evas_Coord *) &y,
+ (Evas_Coord *) &w, (Evas_Coord *) &h);