*def-clx-class-use-defclass*

Daniel Barlow <[email protected]> Thu, 25 Aug 2005 01:09:34 +0100
Newsgroups gmane.lisp.clx.devel
Message-ID <[email protected]>
While experimenting with some CLX stuff I decided I'd like to be able
to write event handlers as methods that specialise on window and event
type.  For example,

(defclass titlebar-window (window) ())
(defmethod handle-event ((event exposure-event) (window titlebar-window) ...)
  ...)

There are two things that I think would make this easier: 

(1) the said objects to be based on standard-object and therefore
subclassable in the normal way.  This is straightforward using
*def-clx-class-use-defclass*

(2) for clx to preserve the identity of window instances when it
creates them and find a given instance when given the id by the x
server, instead of creating a new one.  Alternatively, just to
preserve the class of window instances, and use change-class on any
window objects it creates as proxies for window ids returned by the
server.  That doesn't cater for EQL specialisers, but it's better than
nothing

Does anyone routinely or regularly use *def-clx-class-use-defclass*
and have much idea of how it affects CLX performance or compatibility?
Has anyone done/seen something like (2), or would find it useful?  Or
is there another way I'm missing?  I had a poke around google groups
without seeing much, but if there are mailing lists containing ancient
clx lore on the subject, feel free to point them out.


-dan




_______________________________________________
Portable-clx mailing list
[email protected]
http://lists.metacircles.com/cgi-bin/mailman/listinfo/portable-clx
cvs -d :ext:cvs.telent.net:/usr/local/src/cvs co clx  # over ssh
cvs -d :pserver:[email protected]:/cvs co clx  # anonymous