Welcome to the CHICKEN Scheme pasting service

no title added by matijja on Mon Feb 4 19:36:30 2019

#>
void* ptr;
<#

(define init-root
  (foreign-lambda* void ((scheme-object obj)) "
    ptr = CHICKEN_new_gc_root();
    CHICKEN_gc_root_set(ptr, obj);"))

(define root-ref
  (foreign-lambda* scheme-object () "
    C_return(CHICKEN_gc_root_ref(ptr));"))

(init-root (foreign-safe-lambda void on_quit c-pointer c-pointer))

(let ((window (gtk_window_new GTK_WINDOW_TOPLEVEL)))
  (gtk_widget_show window)
  (display (root-ref))
  (newline)
  (g_signal_connect_data window "destroy" (root-ref) #f #f 0)
  ((foreign-safe-lambda void gtk_main)))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Type in the text below:
                                    
 _ __  _ __  _ __   ___ _   _ _   _ 
| '_ \| '_ \| '_ \ / _ \ | | | | | |
| |_) | |_) | | | |  __/ |_| | |_| |
| .__/| .__/|_| |_|\___|\__,_|\__,_|
|_|   |_|                           
Visually impaired? Let me spell it for you (wav file) download WAV