XLIB:PROBE-EXTENSION?
Christophe Rhodes <[email protected]> Fri, 03 Oct 2003 15:13:34 +0100
| Newsgroups | gmane.lisp.clx.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
While I'm not currently overburdened with people writing CLX
implementations of protocol extensions, I wondered whether it might be
worth defining an operator for finding out which extensions a given
installation of CLX supports.
There already exists XLIB:QUERY-EXTENSION and XLIB:LIST-EXTENSIONS to
enquire what the server supports; I'm here talking about something an
application writer can test to see if he should load in his own
implementation of something necessary, or compile in different
codepaths, or whatnot.
Presently, the telent CLX tree advertises :CLX-EXT-RENDER, and does
not mention SHAPE or Xvidmode-XFree86; what I propose is to remove
:CLX-EXT-RENDER, and replace it with
XLIB:PROBE-EXTENSION string => result
string---a string designator
result---a generalized boolean
returns true if the X protocol extension named by string is a
supported extension by this CLX installation; otherwise, returns
false.
Examples:
(eval-when (:compile-toplevel)
(unless (xlib:probe-extension "XVidmode-XFree86")
(load (compile-file "xvidmode.lisp"))))
[...]
Comments?
Cheers,
Christophe
--
http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge)