2003-08-19 15:19:38 -04:00
|
|
|
;;; -*-Scheme-*-
|
|
|
|
;;;
|
|
|
|
;;; The Scheme part of the Xt extension.
|
|
|
|
|
2003-08-25 14:14:21 -04:00
|
|
|
;; kludge
|
|
|
|
(define site-lib-xt "")
|
2003-08-25 14:28:02 -04:00
|
|
|
(define site-force-load-xm "")
|
|
|
|
(define site-lib-xmotif "")
|
2003-08-25 14:14:21 -04:00
|
|
|
|
2003-08-19 15:19:38 -04:00
|
|
|
(if (feature? 'motif)
|
|
|
|
(fluid-let ((load-libraries
|
|
|
|
(string-append site-force-load-xm " " site-lib-xmotif " "
|
|
|
|
load-libraries)))
|
2003-09-04 06:39:47 -04:00
|
|
|
(require 'xaw.so 'xt-motif.so))
|
2003-08-19 15:19:38 -04:00
|
|
|
(fluid-let ((load-libraries
|
|
|
|
(string-append site-lib-xt " " load-libraries)))
|
2003-09-04 06:39:47 -04:00
|
|
|
(require 'xaw.so)))
|
2003-08-19 15:19:38 -04:00
|
|
|
|
|
|
|
(load 'xlib.scm)
|
|
|
|
|
|
|
|
(provide 'xlib)
|
|
|
|
(provide 'xt)
|
|
|
|
|
|
|
|
(define (manage-child w)
|
|
|
|
(manage-children (list w)))
|
|
|
|
|
|
|
|
(define (unmanage-child w)
|
|
|
|
(unmanage-children (list w)))
|
|
|
|
|
|
|
|
(define (add-callback w name fun)
|
|
|
|
(add-callbacks w name (list fun)))
|
|
|
|
|
|
|
|
(define (create-managed-widget . args)
|
|
|
|
(let ((w (apply create-widget args)))
|
|
|
|
(manage-child w)
|
|
|
|
w))
|
|
|
|
|
|
|
|
(define application-initialize #f)
|
|
|
|
|
|
|
|
(let ((con) (dpy) (app-class #f) (shell-class #f))
|
|
|
|
(set! application-initialize
|
|
|
|
(lambda (name . fallback-res)
|
|
|
|
(set! con (create-context))
|
|
|
|
(if (not (null? fallback-res))
|
|
|
|
(apply set-context-fallback-resources! con fallback-res))
|
|
|
|
(set! dpy (initialize-display con #f name app-class))
|
|
|
|
(create-shell name shell-class (find-class 'application-shell) dpy))))
|
|
|
|
|
|
|
|
;; Backwards compatibility:
|
|
|
|
|
|
|
|
(define widget-window widget->window)
|