/*
- * $Id: rb_window.c 99 2004-08-26 18:08:05Z tilman $
+ * $Id: rb_window.c 111 2004-09-02 18:47:00Z tilman $
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
return w1->real == w2->real ? Qtrue : Qfalse;
}
+static VALUE c_configure (int argc, VALUE *argv, VALUE self)
+{
+ VALUE mask, geom[4], border, sibling, stackm;
+ RbWindow *sibwin = NULL;
+ int i;
+
+ GET_OBJ (self, RbWindow, win);
+
+ rb_scan_args (argc, argv, "17", &mask,
+ &geom[0], &geom[1], &geom[2], &geom[3],
+ &border, &sibling, &stackm);
+
+ Check_Type (mask, T_FIXNUM);
+
+ for (i = 0; i < 4; i++)
+ if (!NIL_P (geom[i]))
+ Check_Type (geom[i], T_FIXNUM);
+
+ if (!NIL_P (border))
+ Check_Type (border, T_FIXNUM);
+
+ if (!NIL_P (sibling)) {
+ CHECK_CLASS (sibling, cWindow);
+ Data_Get_Struct (sibling, RbWindow, sibwin);
+ }
+
+ if (!NIL_P (stackm))
+ Check_Type (stackm, T_FIXNUM);
+
+ ecore_x_window_configure (win->real, FIX2INT (mask),
+ NIL_P (geom[0]) ? 0 : FIX2INT (geom[0]),
+ NIL_P (geom[1]) ? 0 : FIX2INT (geom[1]),
+ NIL_P (geom[2]) ? 0 : FIX2INT (geom[2]),
+ NIL_P (geom[3]) ? 0 : FIX2INT (geom[3]),
+ NIL_P (border) ? 0 : FIX2INT (border),
+ sibwin ? sibwin->real : 0,
+ NIL_P (stackm) ? 0 : FIX2INT (stackm));
+
+ return Qnil;
+}
+
static VALUE c_show (VALUE self)
{
GET_OBJ (self, RbWindow, win);
Check_Type (w, T_FIXNUM);
Check_Type (h, T_FIXNUM);
- ecore_x_window_move (win->real, FIX2INT (w), FIX2INT (h));
+ ecore_x_window_resize (win->real, FIX2INT (w), FIX2INT (h));
return Qnil;
}
return Qnil;
}
+static VALUE c_borderless_get (VALUE self)
+{
+ int s;
+
+ GET_OBJ (self, RbWindow, win);
+
+ s = ecore_x_window_prop_borderless_get (win->real);
+
+ return s ? Qtrue : Qfalse;
+}
+
+static VALUE c_borderless_set (VALUE self, VALUE val)
+{
+ GET_OBJ (self, RbWindow, win);
+
+ CHECK_BOOL (val);
+
+ ecore_x_window_prop_borderless_set (win->real, val == Qtrue);
+
+ return Qnil;
+}
+
static VALUE c_cursor_set (VALUE self, VALUE val)
{
GET_OBJ (self, RbWindow, win);
rb_define_singleton_method (cWindow, "new", c_new, -1);
rb_define_method (cWindow, "initialize", c_init, -1);
rb_define_method (cWindow, "inspect", c_inspect, 0);
+ rb_define_method (cWindow, "eql?", c_equal_value, 1);
rb_define_method (cWindow, "==", c_equal_value, 1);
+ rb_define_method (cWindow, "===", c_equal_value, 1);
+ rb_define_method (cWindow, "configure", c_configure, -1);
rb_define_method (cWindow, "show", c_show, 0);
rb_define_method (cWindow, "hide", c_hide, 0);
rb_define_method (cWindow, "visible?", c_visible_get, 0);
rb_define_method (cWindow, "get_protocol", c_get_protocol, 1);
rb_define_method (cWindow, "sticky?", c_sticky_get, 0);
rb_define_method (cWindow, "sticky=", c_sticky_set, 1);
+ rb_define_method (cWindow, "borderless?", c_borderless_get, 0);
+ rb_define_method (cWindow, "borderless=", c_borderless_set, 1);
rb_define_method (cWindow, "cursor=", c_cursor_set, 1);
rb_define_method (cWindow, "manage", c_manage, 0);
rb_define_method (cWindow, "manage_container", c_manage_container, 0);