/*
- * $Id: rb_window.c 87 2004-08-22 14:52:05Z tilman $
+ * $Id: rb_window.c 92 2004-08-22 23:07:16Z tilman $
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
return Qnil;
}
+static VALUE c_get_protocol (VALUE self, VALUE proto)
+{
+ int s;
+
+ GET_OBJ (self, RbWindow, win);
+
+ s = ecore_x_window_prop_protocol_isset (win->real, FIX2INT (proto));
+
+ return s ? Qtrue : Qfalse;
+}
+
+static VALUE c_sticky_get (VALUE self)
+{
+ int s;
+
+ GET_OBJ (self, RbWindow, win);
+
+ s = ecore_x_window_prop_state_isset (win->real,
+ ECORE_X_WINDOW_STATE_STICKY);
+
+ return s ? Qtrue : Qfalse;
+}
+
+static VALUE c_sticky_set (VALUE self, VALUE val)
+{
+ GET_OBJ (self, RbWindow, win);
+
+ CHECK_BOOL (val);
+
+ ecore_x_window_prop_sticky_set (win->real, val == Qtrue);
+
+ return Qnil;
+}
+
static VALUE c_manage (VALUE self)
{
GET_OBJ (self, RbWindow, win);
rb_define_method (cWindow, "unset_event_mask",
c_unset_event_mask, 1);
rb_define_method (cWindow, "set_protocol", c_set_protocol, 2);
+ 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, "manage", c_manage, 0);
rb_define_method (cWindow, "manage_container", c_manage_container, 0);
rb_define_method (cWindow, "manage_client", c_manage_client, 0);