From: Matt Birkholz Date: Mon, 19 Mar 2018 00:20:12 +0000 (-0700) Subject: glib: Empty the (glib) package of files and explicitly export... X-Git-Tag: mit-scheme-pucked-x11-0.2.2~20 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0f391314f866786576e35ca79634b4fa844d16cd;p=mit-scheme.git glib: Empty the (glib) package of files and explicitly export... ...all public (documented) bindings into it. This avoids exposing e.g. glib-mutex to the users of (glib), and simplifies source/documentation analysis (which, given explicit exports, needs only the .pkg file). --- diff --git a/src/glib/glib.pkg b/src/glib/glib.pkg index 767f34c4a..2c818c75a 100644 --- a/src/glib/glib.pkg +++ b/src/glib/glib.pkg @@ -23,21 +23,24 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ;;;; Glib System Packaging -;;; When loaded, Scheme becomes a g_source attached to the default -;;; GMainContext. A glib-thread is spawned to periodically yield to -;;; the toolkit(s). - (global-definitions runtime/) (global-definitions sos/) (define-package (glib) - (parent ()) + (parent ())) + +(define-package (glib internal) + (parent (glib)) (files "glib") (import (runtime thread) - get-thread-event-block)) + get-thread-event-block) + (export (glib) + with-glib-lock without-glib-lock + assert-glib-locked assert-without-interruption + add-glib-cleanup execute-glib-cleanup)) (define-package (gobject) - (parent (glib)) + (parent (glib internal)) (files "gobject") ;;(depends-on "glib.bin" "glib") (export (glib) @@ -48,7 +51,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. gquark-from-string gquark-to-string)) (define-package (gio) - (parent (glib)) + (parent (glib internal)) (files "gio") ;;(depends-on "glib.bin" "glib") (import (runtime ffi) @@ -92,7 +95,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. make-gfile)) (define-package (glib main) - (parent (glib)) + (parent (glib internal)) (files "glib-main") ;;(depends-on "glib.bin" "glib") (import (runtime load) @@ -110,10 +113,10 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define-package (glib thread) (parent (runtime thread)) (files "glib-thread") - ;;(depends-on "main") + ;;(depends-on "glib-main") (export () stop-glib-thread) - (import (glib) + (import (glib internal) with-glib-lock assert-glib-locked run-glib-cleanups diff --git a/src/glib/glib.scm b/src/glib/glib.scm index 3296cfc01..0debcaf20 100644 --- a/src/glib/glib.scm +++ b/src/glib/glib.scm @@ -22,7 +22,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |# ;;;; Core utilities. -;;; package: (glib) +;;; package: (glib internal) (define-syntax define-integrable-operator #;(er-macro-transformer