with gc root added by matijja on Mon Feb 4 19:12:44 2019

(bind "
void* CHICKEN_new_gc_root();
void CHICKEN_gc_root_set(void *root, C_word value);
C_word CHICKEN_gc_root_ref(void *root);
void CHICKEN_delete_gc_root (void *root);
")

(define handler (CHICKEN_new_gc_root))
(let ((window (gtk_window_new GTK_WINDOW_TOPLEVEL)))
  (CHICKEN_gc_root_set handler on_quit)
  (gtk_widget_show window)
  (g_signal_connect_data window "destroy" (CHICKEN_gc_root_ref handler) #f #f 0)
  ((foreign-safe-lambda void gtk_main)))
(CHICKEN_delete_gc_root handler)