- Timestamp:
- 10/06/2007 04:36:54 AM (19 years ago)
- branch-nick:
- tui
- revision id:
- dsowen@fugue88.ws-20071006043654-b0woemey9plbmi1w
- Location:
- main
- Files:
-
- 2 edited
-
cdk.lisp (modified) (3 diffs)
-
cdk_wrapper.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
main/cdk.lisp
r5 r6 11 11 (use-foreign-library cdk) 12 12 13 14 15 ;;; Global constants. 16 17 (defctype chtype :uint64) 18 19 (defcvar ("cdk_exit_early" +cdk-exit-early+) :int :read-only t) 20 (defcvar ("cdk_exit_escape" +cdk-exit-escape+) :int :read-only t) 21 (defcvar ("cdk_exit_normal" +cdk-exit-normal+) :int :read-only t) 22 (defcvar ("cdk_exit_never" +cdk-exit-never+) :int :read-only t) 13 23 14 24 ;;; Screen-wide, initialization, and finalization routines. … … 45 55 (defcfun ("box" c-box) :int 46 56 (window :pointer) 47 (vertical-ch :int)48 (horizontal-ch :int))57 (vertical-ch chtype) 58 (horizontal-ch chtype)) 49 59 50 60 51 61 52 62 ;;; Generic functions. 63 64 (defcfun ("bindCDKObject" c-bind-key) :void 65 (object-type :int) 66 (object :pointer) 67 (key chtype) 68 (function :pointer) 69 (user-data :pointer)) 70 71 (defcfun ("cleanCDKObjectBindings" c-clear-bindings) :void 72 (object-type :int) 73 (object :pointer)) 53 74 54 75 (defcfun ("setCDKObjectBackgroundColor" c-set-background-color) :void … … 112 133 (defcfun ("setCDKEntryHighlight" c-set-entry-highlight) :void 113 134 (entry :pointer) 114 (highlight :unsigned- long)135 (highlight :unsigned-int) ; Still not sure about this. 115 136 (cursor :boolean)) 137 138 (defcfun ("getCDKEntryExitType" c-entry-exit-type) :int 139 (entry :pointer)) 140 141 (defcfun ("getCDKEntryValue" c-get-entry-value) :string 142 (entry :pointer)) 143 144 (defcfun ("setCDKEntryValue" c-set-entry-value) :void 145 (entry :pointer) 146 (new-value :string)) 147 148 (defcfun ("setCDKEntryExitType" c-set-entry-exit-type) :void 149 (entry :pointer) 150 (ch chtype)) -
main/cdk_wrapper.c
r5 r6 3 3 4 4 5 #define DC(name, dconst) const int name = dconst; 6 7 DC(cdk_exit_early, vEARLY_EXIT) 8 DC(cdk_exit_escape, vESCAPE_HIT) 9 DC(cdk_exit_normal, vNORMAL) 10 DC(cdk_exit_never, vNEVER_ACTIVATED) 11 12 13 14 void freeCDKLabel(CDKLABEL *label) 15 { 16 destroyCDKLabel(label); 17 } 18 5 19 #define D(type, name) \ 6 20 void freeCDK##name(CDK##type *object) \ 7 { destroyCDK##name(object); } 21 { destroyCDK##name(object); } \ 22 int getCDK##name##ExitType(CDK##type *object) \ 23 { return ExitTypeOf(object); } \ 24 void setCDK##name##ExitType(CDK##type *object, chtype ch) \ 25 { setCdkExitType(ObjOf(object), &((object)->exitType), ch); } 8 26 9 D(LABEL, Label)10 27 D(ENTRY, Entry)
Note: See TracChangeset
for help on using the changeset viewer.
