40.4.6 Passing Control to Tk

There is a predicate for passing control completely over to Tk, the tk_main_loop/0 command. This passes control to Tk until all windows in all the Tcl/Tk interpreters in the Prolog have have been destroyed:

     tk_main_loop