Implemented Window#borderless.
authorTilman Sauerbeck <tilman@code-monkey.de>
Thu, 2 Sep 2004 18:47:00 +0000 (18:47 +0000)
committerTilman Sauerbeck <tilman@code-monkey.de>
Thu, 2 Sep 2004 18:47:00 +0000 (18:47 +0000)
src/ecore_x/rb_window.c

index 9d6d4e09d4d825255157f26fb7e2afe5e8db89cf..6aca50968d09484e0f0b51572a125bd6f9343049 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_window.c 108 2004-08-31 18:44:44Z tilman $
+ * $Id: rb_window.c 111 2004-09-02 18:47:00Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -421,6 +421,28 @@ static VALUE c_sticky_set (VALUE self, VALUE val)
        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);
@@ -517,6 +539,8 @@ void Init_Window (void)
        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);