[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QuickTime Examples

>From: Peter Forster <Forster@informatik.uni-stuttgart.de>
>Date: Mon, 17 Feb 92 16:21:02 +0100
>To: info-mcl@cambridge.apple.com
>Subject: QuickTime Examples
>Cc: forster@is.informatik.uni-stuttgart.de
>I've spent some time trying to run the QT-examples for MCL2.Obj1p3. 
>But no luck. The only thing I got is the error message, that
>the trap #_Gestalt is unimplemted.
>Before I waste my time with try&error methods, does someone know 
>what is missing here?  
>;;;try to compile QTSample.lisp
>? (require :movies)
>;Compiling "QTSample.lisp"...
>> Error: Can't find the trap #_GESTALT! Consider (reindex-interfaces)
>> While executing: CCL::LOAD-TRAP
>> Type Command-/ to continue, Command-. to abort.
>> If continued: pretend nothing happenned.
>See the Restarts... menu item for further choices.
>1 > 

We had not yet translated the gestalt trap when 2.0b1 was shipped.
It will be part of 2.0 final. If you want it before then, here 'tis:

(deftrap _gestalt ((selector :ostype) (response (:pointer :signed-long)))
   (:no-trap :signed-integer)
   (:no-trap (ccl::%stack-block ((ret 8))
               (ccl::%gen-trap #xA1AD
                               :return-block ret
                               :d0 selector :a0 response '(:d0 :a0))
               (%put-ptr response (%get-ptr ret 4))
               (%get-word ret 2))))

Remember, if you change any of the interface files you need to

As UEDA masaya said, there is also a ccl::gestalt function built
into MCL. It is defined as follows:

(defun ccl::gestalt (selector)
  (rlet ((res :longint))
    (if (eql 0 (#_Gestalt selector res))
      (%get-long res))))

Hence, Daniel Ranson's function in QTSample.lisp can be recoded as:

(defun quicktime-available-p ()
  (ccl::gestalt #$gestaltQuickTime))

As UEDA masaya quoted me, I repeat:

  I can't officially sanction the use of non-exported functions, but your
  use of ccl::gestalt is correct and I doubt that we're going to remove
  it any time soon.