Changeset main,23
- Timestamp:
- 11/03/2007 02:15:01 AM (19 years ago)
- branch-nick:
- tui
- parents:
Rev Tree Chgset 22 @main,22 [main,22] 22.1.1 @main,22.1.1 [main,22.1.1] - revision id:
- dsowen@fugue88.ws-20071103021501-wy22vptf8j2zc9je
- Location:
- main
- Files:
-
- 1 added
- 2 edited
-
display-string.lisp (added)
-
cdk.lisp (modified) (4 diffs)
-
tui.asd (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
main/cdk.lisp
r18 r22.1.1 1 1 (defpackage #:cdk 2 2 (:use #:cl #:cffi) 3 (:export #:with-screen #:with-der-window ))3 (:export #:with-screen #:with-der-window #:add-ch #:add-string #:wmove)) 4 4 5 5 (in-package #:cdk) … … 127 127 (x :int)) 128 128 129 (defcfun ("mvwadd_wch" c-move-and-add-char) :int 130 (window :pointer) 131 (y :int) 132 (x :int) 129 (defcfun "wadd_wch" :int 130 (window :pointer) 133 131 (wch :pointer)) 134 132 … … 157 155 (inc-pointer nc-wacs (* (foreign-type-size 'cchar_t) code)))) 158 156 159 (defun move-and-add-char (window y x ch) 157 (defcfun ("wmove" c-wmove) :int 158 (window :pointer) 159 (y :int) 160 (x :int)) 161 162 (defun add-char (window ch) 160 163 (with-foreign-object (s 'cchar_t) 161 164 (with-foreign-slots ((attr char) s cchar_t) … … 164 167 (setf (mem-aref char :uint32 i) 0)) 165 168 (setf (mem-aref char :uint32) (char-code ch))) 166 (c-move-and-add-char window y x s))) 169 (wadd-wch window s))) 170 171 (defun add-string (window s) 172 (dotimes (i (length s)) 173 (add-char window (aref s i)))) 174 175 (defun move-and-add-char (window y x ch) 176 (wmove window y x) 177 (add-char window ch)) 167 178 168 179 (defun move-and-add-string (window y x s) 169 (dotimes (i (length s)) 170 (move-and-add-char window y (+ x i) (aref s i)))) 171 172 (defcfun ("wmove" c-wmove) :int 173 (window :pointer) 174 (y :int) 175 (x :int)) 180 (wmove window y x) 181 (add-string window s)) 176 182 177 183 (defcfun ("wrefresh" c-refresh-window) :int -
main/tui.asd
r22 r22.1.1 2 2 3 3 (asdf:defsystem #:tui 4 :depends-on (#:cffi #: dso-util)4 :depends-on (#:cffi #:cl-ppcre #:dso-lex #:dso-util) 5 5 :components (#|(:file "curses")|# 6 6 (:file "cdk") 7 (:file "display-string" 8 :depends-on ("cdk")) 7 9 (:module "grid" 8 10 :depends-on ("cdk")
Note: See TracChangeset
for help on using the changeset viewer.
