- Timestamp:
- 09/27/2007 10:46:25 PM (19 years ago)
- branch-nick:
- tui
- revision id:
- dsowen@fugue88.ws-20070927224625-s9k87snjmjfo33lv
- Location:
- main
- Files:
-
- 2 added
- 4 edited
-
cdk.lisp (added)
-
cdk_wrapper.c (added)
-
Makefile (modified) (2 diffs)
-
curses.lisp (modified) (5 diffs)
-
form2.c (modified) (4 diffs)
-
tui.asd (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
main/Makefile
r4 r5 1 all: menu2.so form2.so 1 all: menu2.so form2.so cdk_wrapper.so 2 2 3 3 menu2.so: LIBS := -lmenu … … 5 5 form2.so: LIBS := -lform 6 6 7 cdk_wrapper.so: LIBS := -lcdk 8 7 9 %.so: %.c 8 10 rm -f $@ 9 11 gcc -shared -fPIC -o $@ $< $(LIBS) -Wall -pedantic 12 13 clean: 14 rm -f *.so *.fasl -
main/curses.lisp
r4 r5 14 14 15 15 (defcfun initscr window*) 16 (defcfun clear :int) 16 17 (defcfun endwin :int) 17 18 (defcfun refresh :int) … … 22 23 (defcfun start-color :int) 23 24 24 (defcvar stdscr :pointer :read-only t) 25 (defcfun mvwaddstr :int (win :pointer) (y :int) (x :int) (str :string)) 26 27 (defcvar *stdscr* :pointer :read-only t) 25 28 26 29 … … 58 61 (defcdef req-left-char) 59 62 (defcdef req-right-char) 63 (defcdef o-active) 64 (defcdef o-autoskip) 60 65 61 66 (defcfun form2-create :int) 62 67 (defcfun form2-add-field :int (form :int) (row :int) (col :int) (width :int) 63 (height :int) (data-height :int) )68 (height :int) (data-height :int) (opts-mask :int)) 64 69 (defcfun form2-destroy :int (form :int)) 65 70 (defcfun form2-post :int (form :int)) … … 68 73 (defcfun form2-field-len :int (form :int) (i :int)) 69 74 (defcfun form2-copy-field :int (form :int) (i :int) (buff :pointer) (len :int)) 75 (defcfun form2-set-field :int (form :int) (i :int) (buff :string)) 70 76 71 77 (defun form2-get-value (form i) … … 81 87 (initscr) 82 88 (start-color) 83 (keypad stdscr1)89 (keypad *stdscr* 1) 84 90 (cbreak) 85 (noecho)) 91 (noecho) 92 (clear)) 86 93 87 94 (defmacro ncase (keyform &rest clauses) -
main/form2.c
r4 r5 26 26 DC(req_left_char, REQ_LEFT_CHAR); 27 27 DC(req_right_char, REQ_RIGHT_CHAR); 28 DC(o_active, O_ACTIVE); 29 DC(o_autoskip, O_AUTOSKIP); 28 30 29 31 … … 93 95 94 96 int form2_add_field(form2_h form, int row, int col, int width, int height, 95 int data_height )97 int data_height, int opts_mask) 96 98 { 97 99 struct form2_t *f = _check(form); … … 107 109 f->fields[*i] = new_field(height, width, row, col, data_height, 0); 108 110 set_field_back(f->fields[*i], A_UNDERLINE | COLOR_PAIR(1)); 109 field_opts_off(f->fields[*i], O_AUTOSKIP);111 field_opts_off(f->fields[*i], opts_mask); 110 112 111 113 ++(*i); … … 193 195 return 1; 194 196 } 197 198 int form2_set_field(form2_h form, int i, const char *str) 199 { 200 struct form2_t *f = _check(form); 201 202 if(!f) return 0; 203 if(!f->form_struct) return 0; 204 205 set_field_buffer(f->fields[i], 0, str); 206 207 return 1; 208 } -
main/tui.asd
r1 r5 3 3 (asdf:defsystem #:tui 4 4 :depends-on (#:cffi) 5 :components ((:file "curses"))) 5 :components (#|(:file "curses")|# 6 (:file "cdk")))
Note: See TracChangeset
for help on using the changeset viewer.
