/*
- * $Id: rb_ecore_evas.c 18 2004-06-22 20:32:57Z tilman $
+ * $Id: rb_ecore_evas.c 25 2004-06-26 23:07:01Z tilman $
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
return ecore_evas_visibility_get (*ee) ? Qtrue : Qfalse;
}
+static VALUE c_raise (VALUE self)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ ecore_evas_raise (*ee);
+
+ return Qnil;
+}
+
+static VALUE c_lower (VALUE self)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ ecore_evas_lower (*ee);
+
+ return Qnil;
+}
+
+static VALUE c_layer_get (VALUE self)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ return INT2FIX (ecore_evas_layer_get (*ee));
+}
+
+static VALUE c_layer_set (VALUE self, VALUE val)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ Check_Type (val, T_FIXNUM);
+
+ ecore_evas_layer_set (*ee, FIX2INT (val));
+
+ return Qnil;
+}
+
static VALUE c_evas (VALUE self)
{
GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
return Qnil;
}
+static VALUE c_move (VALUE self, VALUE x, VALUE y)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ Check_Type (x, T_FIXNUM);
+ Check_Type (y, T_FIXNUM);
+
+ ecore_evas_move (*ee, FIX2INT (x), FIX2INT (y));
+
+ return Qnil;
+}
+
static VALUE c_resize (VALUE self, VALUE w, VALUE h)
{
GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
return Qnil;
}
+static VALUE c_shaped_get (VALUE self)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ return ecore_evas_shaped_get (*ee) ? Qtrue : Qfalse;
+}
+
+static VALUE c_shaped_set (VALUE self, VALUE val)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ CHECK_BOOL (val);
+
+ ecore_evas_shaped_set (*ee, val == Qtrue ? 1 : 0);
+
+ return Qnil;
+}
+
+static VALUE c_sticky_get (VALUE self)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ return ecore_evas_sticky_get (*ee) ? Qtrue : Qfalse;
+}
+
+static VALUE c_sticky_set (VALUE self, VALUE val)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ CHECK_BOOL (val);
+
+ ecore_evas_sticky_set (*ee, val == Qtrue ? 1 : 0);
+
+ return Qnil;
+}
+
+static VALUE c_rotation_get (VALUE self)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ return INT2FIX (ecore_evas_rotation_get (*ee));
+}
+
+static VALUE c_rotation_set (VALUE self, VALUE val)
+{
+ GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
+
+ Check_Type (val, T_FIXNUM);
+
+ ecore_evas_rotation_set (*ee, FIX2INT (val));
+
+ return Qnil;
+}
+
static VALUE c_delete (VALUE self)
{
GET_OBJ (self, Ecore_Evas, ee, "EcoreEvas");
rb_define_method (cEcoreEvas, "show", c_show, 0);
rb_define_method (cEcoreEvas, "hide", c_hide, 0);
rb_define_method (cEcoreEvas, "visible?", c_visible_get, 0);
+ rb_define_method (cEcoreEvas, "raise", c_raise, 0);
+ rb_define_method (cEcoreEvas, "lower", c_lower, 0);
+ rb_define_method (cEcoreEvas, "layer", c_layer_get, 0);
+ rb_define_method (cEcoreEvas, "layer=", c_layer_set, 1);
rb_define_method (cEcoreEvas, "evas", c_evas, 0);
rb_define_method (cEcoreEvas, "get_size_min", c_get_size_min, 0);
rb_define_method (cEcoreEvas, "set_size_min", c_set_size_min, 2);
rb_define_method (cEcoreEvas, "get_size_max", c_get_size_max, 0);
rb_define_method (cEcoreEvas, "set_size_max", c_set_size_max, 2);
+ rb_define_method (cEcoreEvas, "move", c_move, 2);
rb_define_method (cEcoreEvas, "resize", c_resize, 2);
rb_define_method (cEcoreEvas, "title", c_title_get, 0);
rb_define_method (cEcoreEvas, "title=", c_title_set, 1);
- rb_define_method (cEcoreEvas, "borderless", c_borderless_get, 0);
+ rb_define_method (cEcoreEvas, "borderless?", c_borderless_get, 0);
rb_define_method (cEcoreEvas, "borderless=", c_borderless_set, 1);
+ rb_define_method (cEcoreEvas, "shaped?", c_shaped_get, 0);
+ rb_define_method (cEcoreEvas, "shaped=", c_shaped_set, 1);
+ rb_define_method (cEcoreEvas, "sticky?", c_sticky_get, 0);
+ rb_define_method (cEcoreEvas, "sticky=", c_sticky_set, 1);
+ rb_define_method (cEcoreEvas, "rotation", c_rotation_get, 0);
+ rb_define_method (cEcoreEvas, "rotation=", c_rotation_set, 1);
}