home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / oodleutl.cpt / oodles-of-utils / NotInROM / +Menus.lisp < prev    next >
Encoding:
Text File  |  1992-02-07  |  1.1 KB  |  31 lines

  1. ;; -*- package: NotInROM -*-
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;; +Menus.Lisp
  4. ;;
  5. ;; Copyright ⌐ 1992 Northwestern University Institute for the Learning Sciences
  6. ;; All Rights Reserved
  7. ;;
  8. ;; author: Michael S. Engber
  9. ;;
  10. ;; Provides missing Menu Manager Routines
  11. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  12.  
  13. (eval-when (:compile-toplevel :load-toplevel :execute)
  14.   (require    :NotInROM-u)
  15.   (in-package :NotInROM))
  16.  
  17. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  18.  
  19. ;; - the trap underlying _GetItmStyle expects pointer to a word & puts the
  20. ;;   style info into its low byte
  21. ;; - chStyle points directly to the style info. (see IM V p. 247)
  22. ;; - so we have to allocate our own storage to pass into _GetItmStyle and
  23. ;;   copy the result to chStyle
  24.  
  25. (deftrap-NotInROM _GetItemStyle :none ((theMenu :MenuHandle) (item :signed-integer) (chStyle (:pointer :Style)))
  26.    (rlet ((s :word))
  27.     (stack-trap #xA941 :ptr theMenu :word item :ptr s)
  28.     (%put-byte chStyle (%get-unsigned-byte s 1))))
  29.  
  30. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  31.