Changeset 5541
- Timestamp:
- Nov 9, 2006, 2:43:29 PM (18 years ago)
- Location:
- trunk/ccl/examples
- Files:
-
- 2 edited
-
cocoa-window.lisp (modified) (3 diffs)
-
cocoa.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/examples/cocoa-window.lisp
r2353 r5541 115 115 :wait-until-done t))))) 116 116 117 #+apple-objc 118 (define-objc-method ("_shouldTerminate" lisp-application) 119 (:<BOOL>) 120 (with-slots (termp) self 121 (setq termp (objc-message-send-super (super) "_shouldTerminate" :<BOOL>)))) 122 123 (define-objc-method ((:<BOOL> termp) lisp-application) 124 (with-slots (termp) self 125 termp)) 117 118 126 119 127 120 (defloadvar *default-ns-application-proxy-class-name* … … 186 179 (send (the ns-application self) :stop (%null-ptr)))))) 187 180 188 (define-objc-method ((:void :terminate sender) 189 lisp-application) 190 (declare (ignore sender)) 191 (quit)) 181 192 182 193 183 (define-objc-method ((:void :show-preferences sender) lisp-application) … … 207 197 208 198 209 #+apple-objc 210 (defmethod process-verify-quit ((process appkit-process)) 211 (let* ((app *NSApp*)) 212 (or 213 (null app) 214 (not (send app 'is-running)) 215 (eql (pref app :<NSA>pplication._app<F>lags._app<D>ying) #$YES) 216 (eql (pref app 217 :<NSA>pplication._app<F>lags._dont<S>end<S>hould<T>erminate) 218 #$YES) 219 (progn 220 (send 221 app 222 :perform-selector-on-main-thread (@selector "_shouldTerminate") 223 :with-object (%null-ptr) 224 :wait-until-done t) 225 (send app 'termp))))) 226 227 #+apple-objc 199 200 228 201 (defmethod process-exit-application ((process appkit-process) thunk) 229 202 (when (eq process *initial-process*) 230 (prepare-to-quit)231 203 (%set-toplevel thunk) 232 (send (the lisp-application *NSApp*) 'shutdown)204 (send (the lisp-application *NSApp*) :terminate (%null-ptr)) 233 205 )) 234 206 -
trunk/ccl/examples/cocoa.lisp
r2021 r5541 30 30 (declare (ignore notification)) 31 31 (initialize-user-interface)) 32 33 (define-objc-method ((:void :application-will-terminate (:id notification)) 34 lisp-application-delegate) 35 (declare (ignore notification)) 36 ;; UI has decided to quit; terminate other lisp threads. 37 (prepare-to-quit)) 32 38 33 39 (define-objc-method ((:void :new-listener sender) lisp-application-delegate)
Note:
See TracChangeset
for help on using the changeset viewer.
