Changeset 240


Ignore:
Timestamp:
Jan 7, 2004, 4:30:28 PM (21 years ago)
Author:
Gary Byers
Message:

A little bit of conditionalization.

Location:
trunk/ccl/examples
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/examples/cocoa-window.lisp

    r154 r240  
    1818(in-package "CCL")                      ; for now.
    1919
    20 (eval-when (:compile-toplevel :execute)
    21   (use-interface-dir :cocoa))
    22 
    2320(eval-when (:compile-toplevel :load-toplevel :execute)
    2421  (require "OBJC-SUPPORT"))
     22
     23(eval-when (:compile-toplevel :execute)
     24  (use-interface-dir #+apple-objc  :cocoa #+gnu-objc :gnustep))
     25
    2526
    2627(defun init-cocoa-application ()
     
    4748
    4849
    49 
     50#+apple-objc
    5051(defun trace-dps-events (flag)
    5152  (external-call "__DPSSetEventsTraced"
     
    9495
    9596
    96 
     97#+apple-objc
    9798(define-objc-method ("_shouldTerminate" lisp-application)
    9899  (:<BOOL>)
     
    105106    "LispApplicationDelegate")
    106107
     108#+apple-objc
    107109(defun enable-foreground ()
    108110  (%stack-block ((psn 8))
     
    125127;;; split off this way because we don't necessarily wamt to just do
    126128;;  (#_exit 0) when we've shut down the Cocoa UI.
     129#+apple-objc
    127130(define-objc-method ((:void shutdown)
    128131                     lisp-application)
     
    174177
    175178
     179#+apple-objc
    176180(defmethod process-verify-quit ((process appkit-process))
    177181  (let* ((app *NSApp*))
     
    191195       (send app 'termp)))))
    192196
     197#+apple-objc
    193198(defmethod process-exit-application ((process appkit-process) thunk)
    194199  (when (eq process *initial-process*)
     
    211216    ;; that it does is to release all autorelease pools.  So, we create
    212217    ;; one, but don't worry about freeing it ...
    213     (create-autorelease-pool)
    214     (objc-message-send app "_deallocHardCore:" :<BOOL> #$YES :void)))
     218    #+apple-objc
     219    (progn
     220      (create-autorelease-pool)
     221      (objc-message-send app "_deallocHardCore:" :<BOOL> #$YES :void))))
    215222
    216223
  • trunk/ccl/examples/cocoa.lisp

    r155 r240  
    66;;; below.
    77
     8#+darwinppc-target
     9(progn
    810(require "FAKE-CFBUNDLE-PATH")
    9 (fake-cfbundle-path "ccl:OpenMCL.app;Contents;MacOS;dppccl")
     11(fake-cfbundle-path "ccl:OpenMCL.app;Contents;MacOS;dppccl"))
    1012
    1113
Note: See TracChangeset for help on using the changeset viewer.