いがらしです。

あらきさんに送って頂いた signal hook 拡張です。
# まだ検討してません。

--
五十嵐  宏  (Hiroshi IGARASHI)

*** gtk-0.23.orig/src/global.h Fri Jan 28 01:40:48 2000 --- gtk-0.23/src/global.h Wed Apr 19 11:06:47 2000 *************** *** 301,304 **** --- 301,309 ---- extern GdkBitmap* get_gdkimlibmask(VALUE mask); #endif + /* for extra signal setup args */ + #define SIG_SETUP_ARGS_MAX_ENTRIES 32 + typedef gboolean (*SigSetupArgs)(VALUE, ID, int, GtkArg*, VALUE); + gboolean signal_add_setup_args(SigSetupArgs); + #endif *** gtk-0.23.orig/src/rbgtk.c Fri Feb 11 19:20:42 2000 --- gtk-0.23/src/rbgtk.c Wed Apr 19 11:06:54 2000 *************** *** 121,126 **** --- 121,138 ---- static VALUE mesg_handler; static VALUE print_handler; + static SigSetupArgs sig_setup_args_list[SIG_SETUP_ARGS_MAX_ENTRIES]; + static int sig_setup_args_entries = 0; + + gboolean + signal_add_setup_args(SigSetupArgs entry) + { + if (entry == NULL) return TRUE; + if (sig_setup_args_entries == SIG_SETUP_ARGS_MAX_ENTRIES) return FALSE; + sig_setup_args_list[sig_setup_args_entries++] = entry; + return TRUE; + } + static void gobj_mark(obj) GtkObject *obj; *************** *** 630,635 **** --- 642,651 ---- return; } } + /* call extra setup function */ + for (i = 0 ; i < sig_setup_args_entries ; i++) { + if (sig_setup_args_list[i](obj, sig, argc, params, args)) return; + } params1 = params; for (i=0; i<argc; i++) {