Changeset tag,last-working,2 for tag/last-working/curses.lisp
- Timestamp:
- 09/19/2007 11:06:52 PM (19 years ago)
- branch-nick:
- tui
- revision id:
- dsowen@fugue88.ws-20070919230652-gcf3h1qwf86lq8j7
- File:
-
- 1 edited
-
tag/last-working/curses.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tag/last-working/curses.lisp
r1 r2 22 22 23 23 24 (define-foreign-library menu 25 (t (:default "libmenu")))24 (define-foreign-library menu2 25 (t "/home/dsowen/lisp/tui/menu2.so")) 26 26 27 (use-foreign-library menu )27 (use-foreign-library menu2) 28 28 29 (defctype item* :pointer) 30 (defctype menu* :pointer) 31 32 (defcfun new-item item* (name :string) (description :string)) 33 (defcfun free-item :int (item item*)) 34 (defcfun new-menu menu* (items :pointer)) 35 (defcfun post-menu :int (menu menu*)) 36 (defcfun menu-driver :int (menu menu*) (c :int)) 29 (defcfun menu2-create :int) 30 (defcfun menu2-add-item :int (menu :int) (name :string) (description :string)) 31 (defcfun menu2-destroy :int (menu :int)) 32 (defcfun menu2-post :int (menu :int)) 33 (defcfun menu2-drive :int (menu :int) (c :int)) 34 (defcfun menu2-unpost :int (menu :int)) 37 35 38 36 39 40 (defun make-menu (items)41 (let* ((items-vector42 (map 'vector43 (lambda (item)44 (etypecase item45 (string (new-item (foreign-string-alloc item) (foreign-string-alloc item)))46 (cons (new-item (foreign-string-alloc (car item)) (foreign-string-alloc (cdr item))))))47 items))48 (foreign-items (foreign-alloc 'item*49 :count (length items-vector)50 :initial-contents items-vector51 :null-terminated-p t)))52 (new-menu foreign-items)))53 37 54 38 (defun init-screen ()
Note: See TracChangeset
for help on using the changeset viewer.
