(define-structure enum-sets-internal ;; exists but isn't accessible in scsh
  (export :enum-set-type)
  (open scheme primitives
	finite-types enum-sets
	external-calls)
  (begin
    (define-enumerated-type test :test test? tests test-name test-index
      (test1))
    (define-enum-set-type test-set :test-set test-set? make-test-set
      test test? tests test-index)
    (define test-value (test-set test1))
    (define :enum-set-type (record-ref test-value 0))
    (define-exported-binding "s48-enum-set-type" :enum-set-type)))

(define-structures ((xlib xlib-interface)
		    (xlib-internal xlib-internal-interface))
  (open scheme
	rendezvous-channels
	queues
	(subset srfi-1 (filter fold-right partition any fold))
        (subset srfi-13 (string-index))
	(subset big-util (breakpoint))
	signals handle
	bitwise
	external-calls
	external-events
        shared-bindings
	define-record-types
	finite-types
	enum-sets
	enum-sets-internal ;; for the enum-set-type
	placeholders
	threads
	ports locks
	channel-i/o
	i/o
	interrupts
	ascii
	channel-ports
	posix-i/o
	conditions
	byte-vectors
	condvars
	(subset primitives (new-external-event-uid
			    unregister-external-event-uid!)))
  (files display
	 visual
	 colormap
	 cursor
	 pixmap
	 error
	 event event-types sync-event
	 font
	 gcontext
	 grab
	 graphics
	 key
	 property
	 text
	 window
	 wm
	 client
	 utility
	 atom
	 region))
