[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: optional monitors
- To: Yuri A. Tijerino <firstname.lastname@example.org>
- Subject: Re: optional monitors
- From: email@example.com
- Date: Wed, 20 Mar 91 11:20:04 EST
- Cc: firstname.lastname@example.org, email@example.com
- In-reply-to: Your message of Wed, 20 Mar 91 16:33:39 +0900. <9103200733.AA00865@sp7.ei.sanken.osaka-u.ac.jp>
I'm working in MCL 2.0a5, so this code may not work in MACL 1.*.
The function window-manager-port is useful if you want to let the
user drag something anywhere around the screen:
(with-port (window-manager-port) [body])
You can also examine the window-manager port to find the size of
the screen. But remember that this isn't alway simple because
the two monitors together do not necessarily form a rectangular
space... one can be shifted up relative to the other.
I believe that there's a trap that you can call as well. [Is it
_sysenvirons? I'm not sure. I've never tried it.]
-- Amy Bruckman
;; this function is borrowed from interface tools:ift-macros.lisp
(defmacro window-manager-port ()
'(%stack-block ((port 4))
(_GetWMgrPort :ptr port)
;; For some reason, the variables *screen-height* and *screen-width*
;; get the coordinates for only one screen. The parameter
;; *screen-bottomright* is from the bounding box of the visible region
;; of the grafport, and will be correct for multiple screen systems.
;; Note that since the visible region may not be rectangular, the bounding
;; box may contain points which are not in the visible region.
(rref (window-manager-port) :grafport.visrgn)