Changeset tag,last-working,18 for tag/last-working
- Timestamp:
- 11/02/2007 11:38:39 PM (19 years ago)
- branch-nick:
- tui
- revision id:
- dsowen@fugue88.ws-20071102233839-m98t0la9903jzudj
- File:
-
- 1 edited
-
tag/last-working/cdk.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tag/last-working/cdk.lisp
r15 r18 1 1 (defpackage #:cdk 2 (:use #:cl #:cffi)) 2 (:use #:cl #:cffi) 3 (:export #:with-screen #:with-der-window)) 3 4 4 5 (in-package #:cdk) … … 30 31 (defcfun ("endwin" c-end-curses) :int) 31 32 33 (defmacro with-screen ((screen) &body body) 34 `(let ((,screen (c-init-curses-screen))) 35 (unwind-protect (progn ,@body) 36 (c-end-curses)))) 37 32 38 (defcfun ("initCDKScreen" c-init-cdk-screen) :pointer 33 39 (curseswindow :pointer)) … … 68 74 (defcfun ("delwin" c-delete-window) :int 69 75 (window :pointer)) 76 77 (defmacro with-der-window ((window parent lines columns y x) &body body) 78 `(let ((,window (c-der-window ,parent ,lines ,columns ,y ,x))) 79 (when (null-pointer-p ,window) 80 ;; TODO: Replace this with a condition and a restart. 81 (error "Couldn't create window.")) 82 (unwind-protect (progn ,@body) 83 (c-delete-window ,window)))) 70 84 71 85 (defcfun ("box" c-box) :int
Note: See TracChangeset
for help on using the changeset viewer.
