あおきです。

簡単ですがGtk::CListのメソッド追加パッチです。

set_hadjustment
set_vadjustment
get_hadjustment
get_vadjustment

を追加しています。いちおうテストはしました。

# 自分が必要なものはすぐ作る… ^^;;
-------------------------------------------------------------------
あおきみねろう     site: http://www1.u-netsurf.ne.jp/~brew/mine/jp/

--- rbgtkclist.orig Mon Jun 21 01:39:32 1999 +++ rbgtkclist.c Sun Jul 11 23:14:37 1999 @@ -540,6 +540,44 @@ return self; } +static VALUE +clist_set_hadjustment(self, adjust) + VALUE self, adjust; +{ + gtk_clist_set_hadjustment(GTK_CLIST(get_widget(self)), + GTK_ADJUSTMENT(get_gobject(adjust))); + return Qnil; +} + +static VALUE +clist_get_hadjustment(self) + VALUE self; +{ + GtkAdjustment *tmp; + + tmp = gtk_clist_get_hadjustment(GTK_CLIST(get_widget(self))); + return make_gobject(gAdjustment, (GtkObject*)tmp); +} + +static VALUE +clist_set_vadjustment(self, adjust) + VALUE self, adjust; +{ + gtk_clist_set_vadjustment(GTK_CLIST(get_widget(self)), + GTK_ADJUSTMENT(get_gobject(adjust))); + return Qnil; +} + +static VALUE +clist_get_vadjustment(self) + VALUE self; +{ + GtkAdjustment *tmp; + + tmp = gtk_clist_get_vadjustment(GTK_CLIST(get_widget(self))); + return make_gobject(gAdjustment, (GtkObject*)tmp); +} + void Init_gtk_clist() { gCList = rb_define_class_under(mGtk, "CList", gContainer); @@ -619,4 +657,8 @@ rb_define_method(gCList, "focus_row", clist_get_focus_row, 0); rb_define_method(gCList, "set_reorderable", clist_set_reorderable, 1); rb_define_method(gCList, "undo_selection", clist_undo_selection, 0); + rb_define_method(gCList, "set_hadjustment", clist_set_hadjustment, 1); + rb_define_method(gCList, "get_hadjustment", clist_get_hadjustment, 0); + rb_define_method(gCList, "set_vadjustment", clist_set_vadjustment, 1); + rb_define_method(gCList, "get_vadjustment", clist_get_vadjustment, 0); }