Fixed subprocess-wait, without blocking the toolkit.
* doc/gtk/gtk.texinfo, src/gtk/thread.scm, src/gtk/gtk.pkg: Rename
kill-gtk-thread to stop-gtk-thread, and export it to () for easy
emergency(!) use.
* src/gtk/: fix-demo.scm, gobject.scm, swat.scm: Use detach-thread.
* src/gtk/fix-layout.scm: Call gtk_widget_set_size_request; frobbing
GtkWidget requisition no longer (as of 2.22) works. Leave the widget
geometry undefined until the allocation callback can set it.
Added fix-ink-move! methods for image and box inks. These are very
simple methods, much like the method for text inks. Factored them
into a new generic-fix-ink-move! integrable.
* src/gtk/gtk.pkg: Import hook/subprocess-wait and nonblocking/
subprocess-wait, to enable non-blocking "synchronous" subprocesses.
* src/gtk/main.scm: Move startup out of initialize-package!, into
gtk-start, which is now used by make.scm. Thus startup is delayed
from load/compile(!)-time to load-option-time. Use exit- rather than
kill-gtk-thread. Fix type of argument to gtk_time_slice_window.
* src/gtk/make.scm: Use new gtk-start procedure.
* src/gtk/thread.scm: Added exit-gtk-thread and restart-gtk-thread.
* src/microcode/uxio.c (OS_test_select_registry): Fixed to return
SELECT_PROCESS_STATUS_CHANGE (or SELECT_INTERRUPT) instead of 0 when there
is no io (or the registry is empty) BUT pending status changes or
interrupts.
* src/runtime/process.scm (subprocess-wait): Replaced the call to the
process-wait primitive with application of hook/subprocess-wait.
Initialized this new binding to normal/subprocess-wait, which simply
calls the primitive. Implemented an alternative procedure,
nonblocking/subprocess-wait, which uses the new block-on-process-
status-change procedure. Added hook/subprocess-status-change.
* src/runtime/runtime.pkg: Import block-on-process-status-change from
(runtime thread) to (runtime process).
* src/runtime/thread-queue.scm: Added thread-queue/dequeue-no-hang and
thread-queue/dequeue-until, implementing the former in terms of the
latter. Like /peek-until, /dequeue-until does the job, which was
factored out into when-non-empty-before.
* src/runtime/thread.scm: Added block-on-process-status-change. Like
block-on-io-descriptor, it adds current-thread to those waiting on
descriptor 'process-status-change.
15 files changed: