Implemented Window#border_width=.
authorTilman Sauerbeck <tilman@code-monkey.de>
Thu, 26 Aug 2004 18:08:05 +0000 (18:08 +0000)
committerTilman Sauerbeck <tilman@code-monkey.de>
Thu, 26 Aug 2004 18:08:05 +0000 (18:08 +0000)
src/ecore_x/rb_window.c

index 0463e2142e23dbab01c1234a0e0a1c85baae0ed6..b5c0f6549ebe7880d1e2ecfdf6d2ff1ac72a0721 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_window.c 98 2004-08-26 13:12:55Z tilman $
+ * $Id: rb_window.c 99 2004-08-26 18:08:05Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -263,6 +263,17 @@ static VALUE c_border_width_get (VALUE self)
        return INT2FIX (ecore_x_window_border_width_get (win->real));
 }
 
+static VALUE c_border_width_set (VALUE self, VALUE val)
+{
+       GET_OBJ (self, RbWindow, win);
+
+       Check_Type (val, T_FIXNUM);
+
+       ecore_x_window_border_width_set (win->real, FIX2INT (val));
+
+       return Qnil;
+}
+
 static VALUE c_depth_get (VALUE self)
 {
        GET_OBJ (self, RbWindow, win);
@@ -450,6 +461,7 @@ void Init_Window (void)
        rb_define_method (cWindow, "size", c_size_get, 0);
        rb_define_method (cWindow, "geometry", c_geometry_get, 0);
        rb_define_method (cWindow, "border_width", c_border_width_get, 0);
+       rb_define_method (cWindow, "border_width=", c_border_width_set, 1);
        rb_define_method (cWindow, "depth", c_depth_get, 0);
        rb_define_method (cWindow, "parent", c_parent_get, 0);
        rb_define_method (cWindow, "title", c_title_get, 0);