Corrected parameter type mismatches and typos.  Please see attached.

Regards,

Brad Watson

"======================================================================
|
|   newt c wrapper 
|
|
 ======================================================================"


"======================================================================
|
| Copyright 2006 Free Software Foundation, Inc.
| Written by Brad Watson
|
| This file is part of GNU Smalltalk.
|
| GNU Smalltalk is free software; you can redistribute it and/or modify it
| under the terms of the GNU General Public License as published by the Free
| Software Foundation; either version 2, or (at your option) any later version.
|
| GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
| FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
| details.
|
| You should have received a copy of the GNU General Public License along with
| GNU Smalltalk; see the file COPYING.  If not, write to the Free Software
| Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
 ======================================================================"


"======================================================================
|
|   Notes: implemented without callbacks.  See the newt man pages 
|   for a description of the wrapped newt library functions.
|
 ======================================================================"


Object subclass: #Newt
        instanceVariableNames: ''
        classVariableNames: 'StdScreen'
        poolDictionaries: ''
        category: 'Newt Wrapper'!

DLD addLibrary: 'libnewt'!

!Newt class methodsFor: 'Constants'!

anchorBottom
    "#define NEWT_ANCHOR_BOTTOM (1 << 3)"
    ^16r0008!

anchorLeft
    "#define NEWT_ANCHOR_LEFT (1 << 0)"
    ^16r0001!

anchorRight
    "#define NEWT_ANCHOR_RIGHT (1 << 1)"
    ^16r0002!

anchorTop
    "#define NEWT_ANCHOR_TOP (1 << 2)"
    ^16r0004!

checkBoxTreeCollapsed
    "#define NEWT_CHECKBOXTREE_COLLAPSED '\0'"
    ^Char asciiValue: 0!

checkBoxTreeExpanded
    "#define NEWT_CHECKBOXTREE_EXPANDED '\1'"
    ^Char asciiValue: 1!

checkBoxTreeHideBox
    "#define NEWT_CHECKBOXTREE_HIDE_BOX (1 << 13)"
    ^8192!

checkBoxTreeSelected
    "#define NEWT_CHECKBOXTREE_SELECTED '*'"
    ^$*!

checkBoxTreeUnselectable
    "#define NEWT_CHECKBOXTREE_UNSELECTABLE (1 << 12)"
    ^4096!

checkBoxTreeUnselected
    "#define NEWT_CHECKBOXTREE_UNSELECTED ' '"
    ^Char space!

colorSetActButton
    "#define NEWT_COLORSET_ACTBUTTON 8"
    ^8!

colorSetActCheckBox
    "#define NEWT_COLORSET_ACTCHECKBOX 10"
    ^10!

colorSetActListbox
    "#define NEWT_COLORSET_ACTLISTBOX 14"
    ^14!

colorSetActSelListBox
    "#define NEWT_COLORSET_ACTSELLISTBOX 23"
    ^23!

colorSetActTextBox
    "#define NEWT_COLORSET_ACTTEXTBOX 16"
    ^16!

colorSetBorder
    "#define NEWT_COLORSET_BORDER 3"
    ^3!

colorSetButton
    "#define NEWT_COLORSET_BUTTON 7"
    ^7!

colorSetCheckBox
    "#define NEWT_COLORSET_CHECKBOX 9"
    ^9!

colorSetCompactButton
    "#define NEWT_COLORSET_COMPACTBUTTON 22"
    ^22!

colorSetDisEntry
    "#define NEWT_COLORSET_DISENTRY 21"
    ^21!

colorSetEmptyScale
    "#define NEWT_COLORSET_EMPTYSCALE 19"
    ^19!

colorSetEntry
    "#define NEWT_COLORSET_ENTRY 11"
    ^11!

colorSetFullScale
    "#define NEWT_COLORSET_FULLSCALE 20"
    ^20!

colorSetHelpLine
    "#define NEWT_COLORSET_HELPLINE 17"
    ^17!

colorSetLabel
    "#define NEWT_COLORSET_LABEL 12"
    ^12!

colorSetListBox
    "#define NEWT_COLORSET_LISTBOX 13"
    ^13!

colorSetRoot
    "#define NEWT_COLORSET_ROOT 2"
    ^2!

colorSetRootText
    "#define NEWT_COLORSET_ROOTTEXT 18"
    ^18!

colorSetSelListBox
    "#define NEWT_COLORSET_SELLISTBOX 24"
    ^24!

colorSetShadow
    "#define NEWT_COLORSET_SHADOW 5"
    ^5!

colorSetTextBox
    "#define NEWT_COLORSET_TEXTBOX 15"
    ^15!

colorSetTitle
    "#define NEWT_COLORSET_TITLE 6"
    ^6!

colorSetWindow
    "#define NEWT_COLORSET_WINDOW 4"
    ^4!

entryDisabled
    "#define NEWT_ENTRY_DISABLED NEWT_FLAG_DISABLED"
    ^self flagDisabled!

entryHidden
    "#define NEWT_ENTRY_HIDDEN NEWT_FLAG_HIDDEN"
    ^self flagHidden!

entryReturnExit
    "#define NEWT_ENTRY_RETURNEXIT NEWT_FLAG_RETURNEXIT"
    ^self flagReturnExit!

entryScroll
    "#define NEWT_ENTRY_SCROLL NEWT_FLAG_SCROLL"
    ^self flagScroll!

fdRead
    "#define NEWT_FD_READ (1 << 0)"
    ^1!

fdWrite
    "#define NEWT_FD_WRITE (1 << 1)"
    ^2!

fdExcept
    "#define NEWT_FD_EXCEPT (1 << 2)"
    ^4!

flagBorder
    "#define NEWT_FLAG_BORDER (1 << 5)"
    ^32!

flagCheckBox
    "#define NEWT_FLAG_CHECKBOX (1 << 10)"
    ^1024!

flagDisabled
    "#define NEWT_FLAG_DISABLED (1 << 3)"
    ^8!

flagHidden
    "#define NEWT_FLAG_HIDDEN (1 << 1)"
    ^2!

flagMultiple
    "#define NEWT_FLAG_MULTIPLE (1 << 8)"
    ^256!

flagNoF12
    "#define NEWT_FLAG_NOF12 (1 << 7)"
    ^128!

flagPassword
    "#define NEWT_FLAG_PASSWORD (1 << 11)"
    ^2048!

flagReturnExit
    "#define NEWT_FLAG_RETURNEXIT (1 << 0)"
    ^1!

flagSelected
    "#define NEWT_FLAG_SELECTED (1 << 9)"
    ^512!

flagScroll
    "#define NEWT_FLAG_SCROLL (1 << 2)"
    ^4!

flagShowCursor
    "#define NEWT_FLAG_SHOWCURSOR (1 << 12)"
    ^4096!

flagWrap
    "#define NEWT_FLAG_WRAP     (1 << 6)"
    ^64!

formNoF12
    "#define NEWT_FORM_NOF12 NEWT_FLAG_NOF12"
    ^self flagNoF12!

gridFlagGrowX
    "#define NEWT_GRID_FLAG_GROWX (1 << 0)"
    ^16r0001!

gridFlagGrowY
    "#define NEWT_GRID_FLAG_GROWY (1 << 1)"
    ^16r0002!

keyBkSpc
    "#define NEWT_KEY_BKSPC NEWT_KEY_EXTRA_BASE + 6"
    ^self keyExtraBase + 6!

keyDelete
    "#define NEWT_KEY_DELETE NEWT_KEY_EXTRA_BASE + 7"
    ^self keyExtraBase + 7!

keyDown
    "#define NEWT_KEY_DOWN NEWT_KEY_EXTRA_BASE + 2"
    ^self keyExtraBase + 2!

keyEnd
    "#define NEWT_KEY_END NEWT_KEY_EXTRA_BASE + 9"
    ^self keyExtraBase + 9!

keyEnter
    ^Char lf!

keyEscape
    ^Char asciiValue: 27!

keyExtraBase    
    "#define NEWT_KEY_EXTRA_BASE 0x8000"
    ^16r8000!

keyF1
    "#define NEWT_KEY_F1 NEWT_KEY_EXTRA_BASE + 101"
    ^self keyExtraBase + 101!

keyF2
    "#define NEWT_KEY_F2 NEWT_KEY_EXTRA_BASE + 102"
    ^self keyExtraBase + 102!

keyF3
    "#define NEWT_KEY_F3 NEWT_KEY_EXTRA_BASE + 103"
    ^self keyExtraBase + 103!

keyF4
    "#define NEWT_KEY_F4 NEWT_KEY_EXTRA_BASE + 104"
    ^self keyExtraBase + 104!

keyF5
    "#define NEWT_KEY_F5 NEWT_KEY_EXTRA_BASE + 105"
    ^self keyExtraBase + 105!

keyF6
    "#define NEWT_KEY_F6 NEWT_KEY_EXTRA_BASE + 106"
    ^self keyExtraBase + 106!

keyF7
    "#define NEWT_KEY_F7 NEWT_KEY_EXTRA_BASE + 107"
    ^self keyExtraBase + 107!

keyF8
    "#define NEWT_KEY_F8 NEWT_KEY_EXTRA_BASE + 108"
    ^self keyExtraBase + 108!

keyF9
    "#define NEWT_KEY_F9 NEWT_KEY_EXTRA_BASE + 109"
    ^self keyExtraBase + 109!

keyF10
    "#define NEWT_KEY_F10 NEWT_KEY_EXTRA_BASE + 110"
    ^self keyExtraBase + 110!

keyF11
    "#define NEWT_KEY_F11 NEWT_KEY_EXTRA_BASE + 111"
    ^self keyExtraBase + 111!

keyF12
    "#define NEWT_KEY_F12 NEWT_KEY_EXTRA_BASE + 112"
    ^self keyExtraBase + 112!

keyHome
    "#define NEWT_KEY_HOME NEWT_KEY_EXTRA_BASE + 8"
    ^self keyExtraBase + 8!

keyInsert
    "#define NEWT_KEY_INSERT NEWT_KEY_EXTRA_BASE + 13"
    ^self keyExtraBase + 13!

keyLeft
    "#define NEWT_KEY_LEFT NEWT_KEY_EXTRA_BASE + 4"
    ^self keyExtraBase + 4!

keyResize
    "#define NEWT_KEY_RESIZE NEWT_KEY_EXTRA_BASE + 113"
    ^self keyExtraBase + 113!

keyRight
    "#define NEWT_KEY_RIGHT NEWT_KEY_EXTRA_BASE + 5"
    ^self keyExtraBase + 5!

keyReturn
    "#define NEWT_KEY_RETURN NEWT_KEY_ENTER"
    ^self keyEnter!

keyPgup
    "#define NEWT_KEY_PGUP NEWT_KEY_EXTRA_BASE + 11"
    ^self keyExtraBase + 12!

keyPgdn
    "#define NEWT_KEY_PGDN NEWT_KEY_EXTRA_BASE + 12"
    ^self keyExtraBase + 12!

keyTab
    ^Char tab!

keyUntab
    "#define NEWT_KEY_UNTAB NEWT_KEY_EXTRA_BASE + 10"
    ^self keyExtraBase + 10!

keyUp
    "#define NEWT_KEY_UP NEWT_KEY_EXTRA_BASE + 1"
    ^self keyExtraBase + 1!

keySuspend
    ^Char asciiValue: 32!

listBoxReturnExit
    "#define NEWT_LISTBOX_RETURNEXIT NEWT_FLAG_RETURNEXIT"
    ^self flagReturnExit!

newtArgAppend
    "#define NEWT_ARG_APPEND -1"
    ^-1!

newtArgLast
    "#define NEWT_ARG_LAST -100000"
    ^-100000!

textBoxScroll
    "#define NEWT_TEXTBOX_SCROLL NEWT_FLAG_SCROLL"
    ^self flagScroll!

textBoxWrap
    "#define NEWT_TEXTBOX_WRAP NEWT_FLAG_WRAP"
    ^self flagWrap!


!Newt class methodsFor: 'C call-outs'!

bell

    "void newtBell(void);"
    <cCall: 'newtBell' returning: #void 
        args: #( )>!

button: anInt1 
    top: anInt2 
    text: aString

    "newtComponent newtButton(int left, 
         int top, 
         const char * text);"
    <cCall: 'newtButton' returning: #cObject 
        args: #(#int #int #string )>!

buttonBar: aString 
    blcomp: anObject

    "newtGrid newtButtonBar(char * button1, 
         newtComponent * b1comp, 
         ...);"
    <cCall: 'newtButtonBar' returning: #cObject 
        args: #(#string #cObject #variadic )>!

buttonBarV: aString 
    blcomp: anObject 
    args: variadic

    "newtGrid newtButtonBarv(char * button1, 
         newtComponent * b1comp, 
         va_list args);"
    <cCall:'newtButtonBarv' returning: #cObject 
        args: #(#string #cObject #variadic )>!

centeredWindow: aUnit1 
    height: aUint2 
    title: aString

    "int newtCenteredWindow(unsigned int width,
         unsigned int height, 
         const char * title);"

    <cCall: 'newtCenteredWindow' returning: #int 
        args: #(#uInt #uInt #string )>!

checkBox: anInt1 
    top: anInt2 
    text: aString1 
    defValue: aChar 
    seq: aString2 
    result: aString3

    "newtComponent newtCheckbox(int left, 
         int top, 
         const char * text, 
         char defValue, 
         const char * seq, 
         char * result);"
    <cCall: 'newtCheckbox' returning: #cObject 
        args: #(#int #int #string #char #string #string )>!

checkBoxGetValue: anObject
    "char newtCheckboxGetValue(newtComponent co);"
    <cCall: 'newtCheckboxGetValue' returning: #char 
        args: #(#cObject )>!

checkBoxSetFlags: anObject 
    flags: anInt1 
    sense: anInt2 

    "void newtCheckboxSetFlags(newtComponent co, 
         int flags, 
         enum newtFlagsSense sense);"
    <cCall: 'newtCheckboxSetFlags' returning: #void 
        args: #(#cObject #int #int )>!

checkBoxSetValue: anObject 
    value: aChar

    "void newtCheckboxSetValue(newtComponent co, 
         char value);"
    <cCall: 'newtCheckboxSetValue' returning: #void 
        args: #(#cObject #char )>!

checkBoxTree: anInt1 
    top: anInt2 
    height: anInt3 
    flags: anInt4

    "newtComponent newtCheckboxTree(int left, 
         int top, 
         int height, 
         int flags);"
    <cCall: 'newtCheckboxTree' returning: #cObject 
        args: #(#int #int #int #int )>!

checkBoxTreeAddArray: anObject1 
        text: aString 
        data: anObject2 
        flags: anInt1 
        indexes: anObject3

    "int newtCheckboxTreeAddArray(newtComponent co, 
         const char * text, 
         const void * data, 
         int flags, 
         int * indexes);"
    <cCall: 'newtCheckboxTreeAddArray' returning: #int 
        args: #(#cObject #string #cObject #int #cObject )>!

checkBoxTreeAddItem: anObject1 
    text: aString 
    data: anObject2 
    flags: anInt1 
    index: anInt2

    "int newtCheckboxTreeAddItem(newtComponent co, 
         const char * text, 
         const void * data, 
         int flags, 
         int index, ...);"
    <cCall: 'newtCheckboxTreeAddItem' returning: #int 
        args: #(#cObject #string #cObject #int #int)>!

checkBoxTreeAddItem: anObject1 
    text: aString 
    data: anObject2 
    flags: anInt1 
    index: anInt2
    args: aVariadic

    "int newtCheckboxTreeAddItem(newtComponent co, 
         const char * text, 
         const void * data, 
         int flags, 
         int index, ...);"
    <cCall: 'newtCheckboxTreeAddItem' returning: #int 
        args: #(#cObject #string #cObject #int #int #variadic )>!

checkBoxTreeFindItem: anObject1 
    data: anObject2

    "int * newtCheckboxTreeFindItem(newtComponent co, 
         void * data);"
    <cCall: 'newtCheckboxTreeFindItem' returning: #cObject 
        args: #(#cObject #cObject )>!

checkBoxTreeGetCurrent: anObject

    "const void * newtCheckboxTreeGetCurrent(newtComponent co);"
    <cCall: 'newtCheckboxTreeGetCurrent' returning: #cObject 
        args: #(#cObject )>!

checkBoxTreeGetEntryValue: anObject1 
    data: anObject2

    "char newtCheckboxTreeGetEntryValue(newtComponent co, 
         const void * data);"
    <cCall: 'newtCheckboxTreeGetEntryValue' returning: #char 
        args: #(#cObject #cObject )>!

checkBoxTreeGetMultiSelection: anObject1 
    numItems: anObject2 
    seqNum: aChar

    "const void ** newtCheckboxTreeGetMultiSelection(newtComponent co, 
         int *numitems, 
         char seqnum);"

    <cCall: 'newtCheckboxTreeGetMultiSelection' returning: #cObjectPtr 
        args: #(#cObject #cObject #char )>!

checkBoxTreeGetSelection: anObject 
    numitems: anInt

    "const void ** newtCheckboxTreeGetSelection(newtComponent co, 
         int *numitems);"
    <cCall: 'newtCheckboxTreeGetSelection' returning: #cObjectPtr 
        args: #(#cObject #cObject )>!

checkBoxTreeMulti: anInt1 
    top: anInt2 
    height: anInt3 
    seq: aString 
    flags: anInt4

    "newtComponent newtCheckboxTreeMulti(int left, 
         int top, 
         int height, 
         char *seq, 
         int flags);"
    <cCall: 'newtCheckboxTreeMulti' returning: #cObject 
        args: #(#int #int #int #string #int )>!

checkBoxTreeSetCurrent: anObject1 
    item: anObject2

    "void newtCheckboxTreeSetCurrent(newtComponent co, 
         void * item);"
    <cCall: 'newtCheckboxTreeSetCurrent' returning: #void 
        args: #(#cObject #cObject )>!

checkBoxTreeSetEntry: anObject1 
    data: anObject2 
    text: anObject3

    "void newtCheckboxTreeSetEntry(newtComponent co, 
         const void * data, 
         const char * text);"
    <cCall: 'newtCheckboxTreeSetEntry' returning: #void 
        args: #(#cObject #cObject #cObject )>!

checkBoxTreeSetEntryValue: anObject1 
    data: anObject2 
    value: aChar

    "void newtCheckboxTreeSetEntryValue(newtComponent co, 
         const void * data, 
         char value);"
    <cCall: 'newtCheckboxTreeSetEntryValue' returning: #void 
        args: #(#cObject #cObject #char )>!

checkBoxTreeSetWidth: anObject 
    width: anInt

    "void newtCheckboxTreeSetWidth(newtComponent co, 
         int width);"
    <cCall: 'newtCheckboxTreeSetWidth' returning: #void 
        args: #(#cObject #int )>!

clearKeyBuffer

    "void newtClearKeyBuffer(void);"
    <cCall: 'newtClearKeyBuffer' returning: #void 
        args: #(#void )>!

cls

    "void newtCls(void);"
    <cCall: 'newtCls' returning: #void 
        args: #( )>!

componentAddCallback: anObject1 
    f: anObject2 
    data: anObject3 

    "void newtComponentAddCallback(newtComponent co, 
         newtCallback f, 
         void * data);"

    <cCall: 'newtComponentAddCallback' returning: #void 
        args: #(#cObject #cObject #cObject )>!

compactButton: anInt1 
    top: anInt2 
    text: aString

    "newtComponent newtCompactButton(int left, 
         int top, 
         const char * text);"
    <cCall: 'newtCompactButton' returning: #cObject 
        args: #(#int #int #string )>!

componentTakesFocus: anObject 
    val: anInt

    "void newtComponentTakesFocus(newtComponent co, 
         int val);"
    <cCall: 'newtComponentTakesFocus' returning: #void 
        args: #(#cObject #int )>!

createGrid: anInt1 
    rows: anInt2

    "newtGrid newtCreateGrid(int cols, 
         int rows);"
    <cCall: 'newtCreateGrid' returning: #cObject 
        args: #(#int #int )>!

cursorOff

    "void newtCursorOff(void);"
    <cCall: 'newtCursorOff' returning: #void
        args: #( )>!

cursorOn

    "void newtCursorOn(void);"
    <cCall: 'newtCursorOn' returning: #void 
        args: #( )>!

delay: anInt

    "void newtDelay(unsigned int usecs);"
    <cCall: 'newtDelay' returning: #void 
        args: #(#int )>!

drawForm: anObject

    "void newtDrawForm(newtComponent form);"
    <cCall: 'newtDrawForm' returning: #void 
        args: #(#cObject )>!

drawRootText: anInt1 
    row: anInt2 
    text: aString

    "void newtDrawRootText(int col, 
         int row, 
         const char * text);"
    <cCall: 'newtDrawRootText' returning: #void 
        args: #(#int #int #string )>!

entry: anInt1 
    top: anInt2 
    initialValue: aString 
    width: anInt3 
    resultPtr: anObject1 
    flags: anInt4

    "newtComponent newtEntry(int left, 
         int top, 
         const char * initialValue, 
         int width, 
         const char ** resultPtr, 
         int flags);"
    <cCall: 'newtEntry' returning: #cObject 
        args: #(#int #int #string #int #cObjectPtr #int )>!

entryGetValue: anObject

    "char * newtEntryGetValue(newtComponent co);"
    <cCall: 'newtEntryGetValue' returning: #string 
        args: #(#cObject )>!

entrySet: anObject 
    value: aString 
    cursorAtEnd: anInt

    "void newtEntrySet(newtComponent co, 
         const char * value, 
         int cursorAtEnd);"
    <cCall: 'newtEntrySet' returning: #void 
        args: #(#cObject #string #int )>!

entrySetFilter: anObject1 
    filter: anObject2 
    data: anObject3

    "void newtEntrySetFilter(newtComponent co, 
         newtEntryFilter filter, 
         void * data);"
    <cCall: 'newtEntrySetFilter' returning: #void 
        args: #(#cObject #cObject #cObject )>!

entrySetFlags: anObject 
    flags: anInt1 
    sense: anInt2

    "void newtEntrySetFlags(newtComponent co, 
         int flags, 
         enum newtFlagsSense sense);"
    <cCall: 'newtEntrySetFlags' returning: #void 
        args: #(#cObject #int #int )>!

finished

    "int newtFinished(void);"
    <cCall: 'newtFinished' returning: #int 
        args: #( )>!

form: anObject1 
    helpTag: anObject2 
    flags: anInt

    "newtComponent newtForm(newtComponent vertBar, 
         void * helpTag, 
         int flags);"
    <cCall: 'newtForm' returning: #cObject 
        args: #(#cObject #cObject #int )>!

formAddComponent: anObject1 
    co: anObject2

    "void newtFormAddComponent(newtComponent form, 
         newtComponent co);"
    <cCall: 'newtFormAddComponent' returning: #void 
        args: #(#cObject #cObject )>!

formAddComponents: anObject

    "void newtFormAddComponents(newtComponent form, ...);"
    <cCall: 'newtFormAddComponents' returning: #void 
        args: #(#cObject )>!

formAddComponents: anObject
    args: aVariadic

    "void newtFormAddComponents(newtComponent form, ...);"
    <cCall: 'newtFormAddComponents' returning: #void 
        args: #(#cObject #variadic )>!

formAddHotKey: anObject 
    key: anInt

    "void newtFormAddHotKey(newtComponent co, 
         int key);"
    <cCall: 'newtFormAddHotKey' returning: #void
        args: #(#cObject #int )>!

formDestroy: anObject

    "void newtFormDestroy(newtComponent form);"
    <cCall: 'newtFormDestroy' returning: #void 
        args: #(#cObject )>!

formGetCurrent: anObject

    "newtComponent newtFormGetCurrent(newtComponent co);"
    <cCall: 'newtFormGetCurrent' returning: #cObject 
        returning: #(#cObject )>!

formRun: anObject1 
    newtExitStructure: anObject2

    "void newtFormRun(newtComponent co, struct newtExitStruct * es);"
    <cCall: 'newtFormRun' returning: #void 
        args: #(#cObject #cObject )>!

formSetBackground: anObject 
    color: anInt

    "void newtFormSetBackground(newtComponent co, 
         int color);"
    <cCall: 'newtFormSetBackground' returning: #void 
        args: #(#cObject #int )>!

formSetCurrent: anObject1 
    subco: anObject2

    "void newtFormSetCurrent(newtComponent co, 
         newtComponent subco);"
    <cCall: 'newtFormSetCurrent' returning: #void
        args: #(#cObject #cObject )>!

formSetHeight: anObject 
    height: anInt

    "void newtFormSetHeight(newtComponent co, 
         int height);"
    <cCall: 'newtFormSetHeight' returning: #void 
        args: #(#cObject #int )>!

formSetSize: anObject

    "void newtFormSetSize(newtComponent co);"
    <cCall: 'newtFormSetSize' returning: #void 
        args: #(#cObject )>!

formSetTimer: anObject 
    milliSecs: anInt

    "void newtFormSetTimer(newtComponent form, 
         int millisecs);"
    <cCall: 'newtFormSetTimer' returning: #void 
        args: #(#cObject #int )>!

formSetWidth: anObject 
    width: anInt

    "void newtFormSetWidth(newtComponent co, 
         int width);"
    <cCall: 'newtFormSetWidth' returning: #void 
        args: #(#cObject #int )>!

formWatchFd: anObject 
    fd: anInt1 
    fdFlags: anInt2

    "void newtFormWatchFd(newtComponent form, 
         int fd, 
         int fdFlags);"
    <cCall: 'newtFormWatchFd' returning: #void 
        args: #(#cObject #int #int )>!

gridAddComponentsToForm: anObject1 
    form: anObject2 
    recurse: anInt 

    "void newtGridAddComponentsToForm(newtGrid grid, 
         newtComponent form, 
         int recurse);"
    <cCall: 'newtGridAddComponentsToForm' returning: #void 
        args: #(#cObject #cObject #int )>!

gridBasicWindow: anObject1 
    middle: anObject2 
    buttons: anObject3

    "newtGrid newtGridBasicWindow(newtComponent text, 
         newtGrid middle, 
         newtGrid buttons);"
    <cCall: 'newtGridBasicWindow' returning: #cObject 
        args: #(#cObject #cObject #cObject )>!

gridFree: anObject 
    recurse: anInt

    "void newtGridFree(newtGrid grid, 
         int recurse);"
    <cCall: 'newtGridFree' returning: #void 
        args: #(#cObject #int )>!

gridGetSize: anObject1 
    width: anObject2 
    height: anObject3

    "void newtGridGetSize(newtGrid grid, 
         int * width, 
         int * height);"
    <cCall: 'newtGridGetSize' returning: #void
        args: #(#cObject #cObject #cObject )>!

gridHCloseStacked: anInt 
    what: anObject

    "newtGrid newtGridHCloseStacked(enum newtGridElement type1, 
         void * what1, 
         ...);"
    <cCall: 'newtGridHCloseStacked' returning: #cObject 
        args: #(#int #cObject )>!

gridHCloseStacked: anInt 
    what: anObject
    args: aVariadic

    "newtGrid newtGridHCloseStacked(enum newtGridElement type1, 
         void * what1, 
         ...);"
    <cCall: 'newtGridHCloseStacked' returning: #cObject 
        args: #(#int #cObject #variadic)>!

gridHStacked: anInt 
    what: anObject

    "newtGrid newtGridHStacked(enum newtGridElement type1, 
         void * 
         what1, ...);"
    <cCall: 'newtGridHStacked' returning: #cObject 
        args: #(#int #cObject )>!

gridHStacked: anInt 
    what: anObject
    args: aVariadic

    "newtGrid newtGridHStacked(enum newtGridElement type1, 
         void * 
         what1, ...);"
    <cCall: 'newtGridHStacked' returning: #cObject 
        args: #(#int #cObject #variadic)>!

gridSetField: anObject1 
    col: anInt1 
    row: anInt2 
    type: anInt3 
    val: anObject2 
    padLeft: anInt4 
    padTop: anInt5
    padRight: anInt6 
    padBottom: anInt7 
    anchor: anInt8 
    flags: anInt9

    "void newtGridSetField(newtGrid grid, 
         int col, 
         int row, 
         enum newtGridElement type,
         void * val,
         int padLeft,
         int padTop, 
         int padRight, 
         int padBottom, 
         int anchor,
         int flags);"
    <cCall: 'newtGridSetField' returning: #void 
        args: #(#cObject #int #int #int #cObject #int #int #int #int #int #int 
)>!

getScreenSize: anObject1 
    rows: anObject2

    "void newtGetScreenSize(int * cols, 
         int * rows);"
    <cCall: 'newtGetScreenSize' returning: #void 
        args: #(#cObject #cObject )>!

gridSimpleWindow: anObject1 
    middle: anObject2 
    buttons: amObject3

    "newtGrid newtGridSimpleWindow(newtComponent text, 
         newtComponent middle, 
         newtGrid buttons);"
    <cCall: 'newtGridSimpleWindow' returning: #cObject 
        args: #(#cObject #cObject #cObject )>!

gridPlace: anObject 
    left: anInt1 
    top: anInt2

    "void newtGridPlace(newtGrid grid, 
         int left, 
         int top);"
    <cCall: 'newtGridPlace' returning: #void 
        args: #(#cObject #int #int )>!

gridVCloseStacked: anInt 
    what: anObject

    "newtGrid newtGridVCloseStacked(enum newtGridElement type,
         void * what, 
         ...);"
    <cCall: 'newtGridVCloseStacked' returning: #cObject 
        args: #(#int #cObject )>!

gridVCloseStacked: anInt 
    what: anObject
    args: aVariadic

    "newtGrid newtGridVCloseStacked(enum newtGridElement type,
         void * what, 
         ...);"
    <cCall: 'newtGridVCloseStacked' returning: #cObject 
        args: #(#int #cObject #variadic )>!

gridVStacked: anInt 
    what: anObject

    "newtGrid newtGridVStacked(enum newtGridElement type, 
         void * 
         what, 
         ...);"
    <cCall: 'newtGridVStacked' returning: #cObject 
        args: #(#int #cObject )>!

gridVStacked: anInt 
    what: anObject
    args: aVariadic

    "newtGrid newtGridVStacked(enum newtGridElement type, 
         void * 
         what, 
         ...);"
    <cCall: 'newtGridVStacked' returning: #cObject 
        args: #(#int #cObject #variadic )>!

gridWrappedWindow: anObject 
    title: aString

    "void newtGridWrappedWindow(newtGrid grid, 
         char * title);"
    <cCall: 'newtGridWrappedWindow' returning: #void
        args: #(#cObject #string )>!

gridWrappedWindowAt: anObject 
    title: aString 
    left: anInt1 
    top: anInt2

    "void newtGridWrappedWindowAt(newtGrid grid, 
         char * title, 
         int left, 
         int top);"
    <cCall: 'newtGridWrappedWindowAt' returning: #void 
        args: #(#cObject #string #int #int )>!

init

    "int newtInit(void);"
    <cCall: 'newtInit' returning: #int 
        args: #( )>!

"
listItem: anInt1 top: anInt2 text: aString isDefault: anInt3 prevItem: cObject1 
data: cObject2 flags: anInt4
    newtComponent newtListitem(int left, int top, const char * text, int 
isDefault, 
                                    newtComponent prevItem, const void * data, 
int flags);
    <cCall: 'newtListitem' returning: #cObject args: #(#int #int #string #int 
#cObject #cObject #int )>!

listItemSet: cObject text: aString
    void newtListitemSet(newtComponent co, const char * text);
    <cCall: 'newtListitemSet' returning: #void args: #(#cObject #string )>!

listItemGetData: cObject
    void * newtListitemGetData(newtComponent co);
    <cCall: 'newtListitemGetData' returning: #cObject args: #(#cObject )>!
"

label: anInt1 
    top: anInt2 
    text: aString

    "newtComponent newtLabel(int left, 
         int top, 
         const char * text);"
    <cCall: 'newtLabel' returning: #cObject 
        args: #(#int #int #string )>!

labelSetText: anObject 
    text: aString

    "void newtLabelSetText(newtComponent co, 
         const char * text);"
    <cCall: 'newtLabelSetText' returning: #void
        args: #(#cObject #string )>!

listBox: anInt1 
    top: anInt2 
    height: anInt3 
    flags: anInt4

    "newtComponent newtListbox(int left, 
         int top, 
         int height, 
         int flags);"
    <cCall: 'newtListbox' returning: #cObject 
        args: #(#int #int #int #int )>!

listBoxAppendEntry: anObject1 
    text: aString 
    data: anObject2

    "int newtListboxAppendEntry(newtComponent co, 
         const char * text, 
         const void * data);"
    <cCall: 'newtListboxAppendEntry' returning: #int 
        args: #(#cObject #string #cObject )>!

listBoxClear: anObject

    "void newtListboxClear(newtComponent co);"
    <cCall: 'newtListboxClear' returning: #void 
        args: #(#cObject )>!

listBoxClearSelection: cObject

    "void newtListboxClearSelection(newtComponent co);"
    <cCall: 'newtListboxClearSelection' returning: #void 
        args: #(#cObject )>!

listBoxDeleteEntry: anObject1 
    data: anObject2

    "int newtListboxDeleteEntry(newtComponent co, 
         void * data);"
    <cCall: 'newtListboxDeleteEntry' returning: #int 
        args: #(#cObject #cObject )>!

listBoxGetCurrent: anObject

    "void * newtListboxGetCurrent(newtComponent co);"
    <cCall: 'newtListboxGetCurrent' returning: #cObject 
        args: #(#cObject )>!

listBoxGetEntry: anObject1 
    num: anInt 
    text: anObjectPtr1 
    data: anObjectPtr2

    "void newtListboxGetEntry(newtComponent co, 
         int num, 
         char **text, 
         void **data);"
    <cCall: 'newtListboxGetEntry' returning: #void 
        args: #(#cObject #int #cObjectPtr #cObjectPtr )>!

listBoxGetSelection: anObject1 
    numItems: anObject2

    "void **newtListboxGetSelection(newtComponent co, 
         int *numitems);"
    <cCall: 'newtListboxGetSelection' returning: #cObjectPtr 
        args: #(#cObject #cObject )>!

listBoxInsertEntry: anObject1 
    text: aString 
    data: anObject2 
    key: anObject3

    "int newtListboxInsertEntry(newtComponent co, 
         const char * text, 
         const void * data, 
         void * key);"
    <cCall: 'newtListboxInsertEntry' returning: #int 
        args: #(#cObject #string #cObject #cObject )>! 

listBoxItemCount: anObject

    "int newtListboxItemCount(newtComponent co);"
    <cCall: 'newtListboxItemCount' returning: #int 
        args: #(#cObject )>!

listBoxSelectItem: anObject1 
    key: anObject2 
    newFlagSense: anInt

    "void newtListboxSelectItem(newtComponent co, 
         const void * key, 
         enum newtFlagsSense sense);"
    <cCall: 'newtListboxSelectItem' returning: #void 
        args: #(#cObject #cObject #int )>!

listBoxSetCurrent: anObject 
    num: anInt

    "void newtListboxSetCurrent(newtComponent co, 
         int num);"
    <cCall: 'newtListboxSetCurrent' returning: #void 
        args: #(#cObject #int )>!

listBoxSetCurrentByKey: anObject1 
    key: anObject2 

    "void newtListboxSetCurrentByKey(newtComponent co, 
         void * key);"
    <cCall: 'newtListboxSetCurrentByKey' returning: #void 
        args: #(#cObject #cObject )>!

listBoxSetData: anObject1 
    num: anInt 
    data: anObject2

    "void newtListboxSetData(newtComponent co, 
         int num, 
         void * data);"
    <cCall: 'newtListboxSetData' returning: #void 
        args: #(#cObject #int #cObject )>!

listBoxSetEntry: anObject 
    num: anInt 
    text: aString

    "void newtListboxSetEntry(newtComponent co, 
         int num, 
         const char * text);"
    <cCall: 'newtListboxSetEntry' returning: #void 
        args: #(#cObject #int #string )>!

listBoxSetWidth: anObject 
    width: anInt

    "void newtListboxSetWidth(newtComponent co, 
         int width);"
    <cCall: 'newtListboxSetWidth' returning: #void 
        args: #(#cObject #int )>!

openWindow: aUint1 
    top: aUint2 
    width: aUint3 
    height: aUint4 
    title: aString

    "int newtOpenWindow(unsigned int left,
         unsigned int top,
         unsigned int width,
         unsigned  int height, 
         const char * title);"
    <cCall: 'newtOpenWindow' returning: #int 
        args: #(#uInt #uInt #uInt #uInt #string )>!

popHelpLine

    "void newtPopHelpLine(void);"
    <cCall: 'newtPopHelpLine' returning: #void 
        args: #( )>!

popWindow

    "void newtPopWindow(void);"
    <cCall: 'newtPopWindow' returning: #void 
        args: #( )>!

pushHelpLine: aString

    "void newtPushHelpLine(const char * text);"
    <cCall: 'newtPushHelpLine' returning: #void 
        args: #(#string )>!

radiobutton: anInt1 
    top: anInt2 
    text: aString 
    isDefault: anInt3 
    prevButton: anObject

    "newtComponent newtRadiobutton(int left, 
         int top, 
         const char * text, 
         int isDefault, 
         newtComponent prevButton);"
    <cCall: 'newtRadiobutton' returning: #cObject 
        args: #(#int #int #string #int #cObject )>!

radioGetCurrent: anObject

    "newtComponent newtRadioGetCurrent(newtComponent setMember);"
    <cCall: 'newtRadioGetCurrent' returning: #cObject 
        args: #(#cObject )>!

redrawHelpLine

    "void newtRedrawHelpLine(void);"
    <cCall: 'newtRedrawHelpLine' returning: #void 
        args: #( )>!

reFlowText: aString 
    width: anInt1 
    flexDown: anInt2 
    flexUp: anInt3 
    actualWidth: anInt4 
    actualHeight: anInt5

    "char * newtReflowText(char * text, 
         int width, 
         int flexDown, 
         int flexUp, 
         int * actualWidth, 
         int * actualHeight);"
    <cCall: 'newtReflowText' returning: #string 
        args: #(#string #int #int #int #int #int )>!

refresh

    "void newtRefresh(void);"
    <cCall: 'newtRefresh' returning: #void 
        args: #( )>!

resizeScreen: anInt

    "void newtResizeScreen(int redraw);"
    <cCall: 'newtResizeScreen' returning: #void 
        args: #(#int )>!

resume

    "int newtResume(void);"
    <cCall: 'newtResume' returning: #int 
        args: #( )>!

runForm: anObject

    "newtComponent newtRunForm(newtComponent form);"
    <cCall: 'newtRunForm' returning: #cObject 
        args: #(#cObject )>!

scale: anInt1 
    top: anInt2 
    width: anInt3 
    fullValue: aLong

    "newtComponent newtScale(int left, 
         int top, 
         int width, 
         long long fullValue);"
    <cCall: 'newtScale' returning: #cObject 
        args: #(#int #int #int #long )>!

scaleSet: anObject 
    amount: aLong

    "void newtScaleSet(newtComponent co, 
         unsigned long long amount);"
    <cCall: 'newtScaleSet' returning: #void 
        args: #(#cObject #long )>!

scrollbarSet: anObject 
    where: anInt1 
    total: anInt2

    "void newtScrollbarSet(newtComponent co, 
         int where, 
         int total);"
    <cCall: 'newtScrollbarSet' returning: #void 
        args: #(#cObject #int #int )>!

setColors: anObject

    "void newtSetColors(struct newtColors colors);"
    <cCall: 'newtSetColors' returning: #void 
        args: #(#cObject )>!

setHelpCallback: anObject

    "void newtSetHelpCallback(newtCallback cb);"
    <cCall: 'newtSetHelpCallback' returning: #void 
        args: #(#cObject )>!

setSuspendCallback: anObject1 
    data: anObject2

    "void newtSetSuspendCallback(newtSuspendCallback cb, 
         void * data);"
    <cCall: 'newtSetSuspendCallback' returning: #void 
        args: #(#cObject #cObject )>!

textBox: anInt1 
    top: anInt2 
    width: anInt3 
    height: anInt4 
    flags: anInt5

    "newtComponent newtTextbox(int left, 
         int top, 
         int width, 
         int height, 
         int flags);"
    <cCall: 'newtTextbox' returning: #cObject 
        args: #(#int #int #int #int #int )>!

textBoxGetNumLines: anObject

    "int newtTextboxGetNumLines(newtComponent co);"
    <cCall: 'newtTextboxGetNumLines' returning: #int 
        args: #(#cObject )>!

textBoxReflowed: anInt1 
    top: anInt2 
    text: aString 
    width: anInt3 
    flexDown: anInt4 
    flexUp: anInt5 
    flags: anInt6

    "newtComponent newtTextboxReflowed(int left, 
         int top, 
         char * text, 
         int width, 
         int flexDown, 
         int flexUp, 
         int flags);"
    <cCall: 'newtTextboxReflowed' returning: #cObject 
        args: #(#int #int #string #int #int #int #int )>!

textBoxSetHeight: anObject 
    height: anInt

    "void newtTextboxSetHeight(newtComponent co, 
         int height);"
    <cCall: 'newtTextboxSetHeight' returning: #void 
        args: #(#cObject #int )>!

textBoxSetText: anObject 
    text: aString

    "void newtTextboxSetText(newtComponent co, 
         const char * text);"
    <cCall: 'newtTextboxSetText' returning: #void 
        args: #(#cObject #string )>!

verticalScrollbar: anInt1 
    top: anInt2 
    height: anInt3 
    normalColorset: anInt4 
    thumbColorset: anInt5

    "newtComponent newtVerticalScrollbar(int left, 
         int top, 
         int height, 
         int normalColorset, 
         int thumbColorset);"
    <cCall: 'newtVerticalScrollbar' returning: #cObject 
        args: #(#int #int #int #int #int )>!

waitForKey

    "void newtWaitForKey(void);"
    <cCall: 'newtWaitForKey' returning: #void 
        args: #(#void )>!

winChoice: aString1 
    button1: aString2 
    button2: aString3 
    text: aString4

    "int newtWinChoice(char * title, 
         char * button1, 
         char * button2, 
         char * text, 
         ...);"
    <cCall: 'newtWinChoice' returning: #int 
        args: #(#string #string #string #string )>!

winChoice: aString1 
    button1: aString2 
    button2: aString3 
    text: aString4
    args: aVariadic

    "int newtWinChoice(char * title, 
         char * button1, 
         char * button2, 
         char * text, 
         ...);"
    <cCall: 'newtWinChoice' returning: #int 
        args: #(#string #string #string #string #variadic )>!

winEntries: aString1 
    text: aString2 
    suggestedWidth: anInt1 
    flexDown: anInt2 
    flexUp: anInt3 
    dataWidth: anInt4
    items: anObject 
    button1: aString3

    "int newtWinEntries(char * title, 
         char * text, 
         int suggestedWidth, 
         int flexDown, 
         int flexUp, 
         int dataWidth, 
         struct newtWinEntry * items, 
         char * button1, 
         ...);"
    <cCall: 'newtWinEntries' returning: #int 
        args: #(#string #string #int #int #int #int #cObject #string )>!
winEntries: aString1 
    text: aString2 
    suggestedWidth: anInt1 
    flexDown: anInt2 
    flexUp: anInt3 
    dataWidth: anInt4
    items: anObject 
    button1: aString3
    args: aVariadic

    "int newtWinEntries(char * title, 
         char * text, 
         int suggestedWidth, 
         int flexDown, 
         int flexUp, 
         int dataWidth, 
         struct newtWinEntry * items, 
         char * button1, 
         ...);"
    <cCall: 'newtWinEntries' returning: #int 
        args: #(#string #string #int #int #int #int #cObject #string #variadic 
)>!

winMenu: aString1 
    text: aString2 
    suggestedWidth: anInt1 
    flexDown: anInt2 
    flexUp: anInt3 
    maxListHeight: anInt4 
    items: anObjectPtr 
    listItem: anObect 
    button1: aString3

    "int newtWinMenu(char * title, 
         char * text, 
         int suggestedWidth, 
         int flexDown, 
         int flexUp, 
         int maxListHeight, 
         char ** items, 
         int * listItem,
         char * button1, 
         ...);"
    <cCall: 'newtWinMenu' returning: #int 
        args: #(#string #string #int #int #int #int #cObjectPtr #cObject 
#string )>!

winMenu: aString1 
    text: aString2 
    suggestedWidth: anInt1 
    flexDown: anInt2 
    flexUp: anInt3 
    maxListHeight: anInt4 
    items: anObjectPtr 
    listItem: anObect 
    button1: aString3
    args: aVariadic

    "int newtWinMenu(char * title, 
         char * text, 
         int suggestedWidth, 
         int flexDown, 
         int flexUp, 
         int maxListHeight, 
         char ** items, 
         int * listItem,
         char * button1, 
         ...);"
    <cCall: 'newtWinMenu' returning: #int 
        args: #(#string #string #int #int #int #int #cObjectPtr #cObject 
#string #variadic )>!

winMessage: aString1 
    buttonText: aString2 
    text: aString3

    "void newtWinMessage(char * title, 
         char * buttonText, 
         char * text, 
         ...);"
    <cCall: 'newtWinMessage' returning: #void 
        args: #(#string #string #string )>!

winMessage: aString1 
    buttonText: aString2 
    text: aString3
    args: aVariadic

    "void newtWinMessage(char * title, 
         char * buttonText, 
         char * text, 
         ...);"
    <cCall: 'newtWinMessage' returning: #void 
        args: #(#string #string #string #variadic )>!

winMessageEv: aString1 
    buttonText: aString2 
    text: aString3 
    args: aVariadic

    "void newtWinMessagev(char * title, 
         char * buttonText, 
         char * text, 
         va_list argv);"
    <cCall: 'newtWinMessagev' returning: #void 
        args: #(#string #string #string #variadic )>!

winTernary: aString1 
    button1: aString2 
    button2: aString3 
    button3: aString4 
    message: aString5

    "int newtWinTernary(char * title, 
         char * button1, 
         char * button2, 
         char * button3, 
         char * message, 
         ...);"
    <cCall: 'newtWinTernary' returning: #int 
        args: #(#string #string #string #string #string )>!

winTernary: aString1 
    button1: aString2 
    button2: aString3 
    button3: aString4 
    message: aString5
    args: aVariadic

    "int newtWinTernary(char * title, 
         char * button1, 
         char * button2, 
         char * button3, 
         char * message, 
         ...);"
    <cCall: 'newtWinTernary' returning: #int 
        args: #(#string #string #string #string #string #variadic )>!!

!Newt class methodsFor: 'examples'!


demo
    self
        init;
        cls;
        drawRootText: 0 row: 0 text: 'Newt test program';
        pushHelpLine: '';
        drawRootText: -50 row: 0 text:  'More root text';
        openWindow: 2 top: 2 width: 30 height: 10 title: 'first window';
        openWindow: 10 top: 5 width: 65 height: 16 title: 'window 2';
        bell;
        waitForKey;
        finished!!
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to