         ] [ gtk_dialog_run drop ] bi
     ] with-destructors ;
 
-: <yield-callback> ( -- callback )
-    [ drop yield t ] GSourceFunc ;
-
 M: gtk-ui-backend (with-ui)
     [
         0 gint <ref> f void* <ref> gtk_init

    ] when* ;

:: connect-user-input-signals ( win -- )
    win "motion-notify-event" [ on-motion ]
    GtkWidget:motion-notify-event connect-signal
    win "leave-notify-event" [ on-leave ]
    GtkWidget:leave-notify-event connect-signal
    win "button-press-event" [ on-button-press ]
    GtkWidget:button-press-event connect-signal
    win "button-release-event" [ on-button-release ]
    GtkWidget:button-release-event connect-signal
    win "scroll-event" [ on-scroll ]
    GtkWidget:scroll-event connect-signal
    win "key-press-event" [ on-key-press/release ]
    GtkWidget:key-press-event connect-signal
    win "key-release-event" [ on-key-press/release ]
    GtkWidget:key-release-event connect-signal
    win "focus-in-event" [ on-focus-in ]
    GtkWidget:focus-in-event connect-signal
    win "focus-out-event" [ on-focus-out ]
    GtkWidget:focus-out-event connect-signal ;

! Window state events

        init-clipboard
        start-ui
        [
            [ [ gtk_main ] with-timer ] with-event-loop
        ] with-destructors
    ] ui-running ;

