/*
- * $Id: rb_window.c 81 2004-08-21 09:43:23Z tilman $
+ * $Id: rb_window.c 85 2004-08-22 11:53:57Z tilman $
*
* Copyright (C) 2004 ruby-ecore team (see AUTHORS)
*
return self;
}
+static VALUE c_inspect (VALUE self)
+{
+ char buf[128];
+
+ GET_OBJ (self, RbWindow, win);
+
+ snprintf (buf, sizeof (buf),
+ "#<%s:%p id=%u>", rb_obj_classname (self),
+ (void *) self, win->real);
+
+ return rb_str_new2 (buf);
+}
+
static VALUE c_equal_value (VALUE self, VALUE other)
{
GET_OBJ (self, RbWindow, w1);
return Qnil;
}
+static VALUE c_manage (VALUE self)
+{
+ GET_OBJ (self, RbWindow, win);
+
+ ecore_x_window_manage (win->real);
+
+ return Qnil;
+}
+
+static VALUE c_manage_container (VALUE self)
+{
+ GET_OBJ (self, RbWindow, win);
+
+ ecore_x_window_container_manage (win->real);
+
+ return Qnil;
+}
+
+static VALUE c_manage_client (VALUE self)
+{
+ GET_OBJ (self, RbWindow, win);
+
+ ecore_x_window_client_manage (win->real);
+
+ return Qnil;
+}
+
+static VALUE c_sniff (VALUE self)
+{
+ GET_OBJ (self, RbWindow, win);
+
+ ecore_x_window_sniff (win->real);
+
+ return Qnil;
+}
+
+static VALUE c_sniff_client (VALUE self)
+{
+ GET_OBJ (self, RbWindow, win);
+
+ ecore_x_window_client_sniff (win->real);
+
+ return Qnil;
+}
+
void Init_Window (void)
{
cWindow = rb_define_class_under (mX, "Window", rb_cObject);
rb_define_singleton_method (cWindow, "new", c_new, -1);
+ rb_define_method (cWindow, "inspect", c_inspect, 0);
rb_define_method (cWindow, "==", c_equal_value, 1);
rb_define_method (cWindow, "show", c_show, 0);
rb_define_method (cWindow, "hide", c_hide, 0);
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, "manage", c_manage, 0);
+ rb_define_method (cWindow, "manage_container", c_manage_container, 0);
+ rb_define_method (cWindow, "manage_client", c_manage_client, 0);
+ rb_define_method (cWindow, "sniff", c_sniff, 0);
+ rb_define_method (cWindow, "sniff_client", c_sniff_client, 0);
}