--- Newt-1.08/Newt.xs.xs Fri Jun 15 13:39:37 2001 +++ Newt-1.08/Newt.xs Fri Jun 15 13:40:17 2001 @@ -700,10 +700,6 @@ int arg -void -va_end(arg0) - __gnuc_va_list arg0 - int newtInit() @@ -714,10 +710,6 @@ newtCls() void -newtResizeScreen(redraw) - int redraw - -void newtWaitForKey() void @@ -851,11 +843,6 @@ newtRadioGetCurrent(setMember) newtComponent setMember -void -newtGetScreenSize(cols, rows) - int * cols - int * rows - newtComponent newtLabel(left, top, text) int left @@ -888,13 +875,11 @@ int height int flags -long +SV * newtListboxGetCurrent(co) newtComponent co - CODE: - RETVAL = (long) newtListboxGetCurrent(co); - OUTPUT: - RETVAL + PPCODE: + XPUSHs(sv_2mortal(newSVsv((SV *)newtListboxGetCurrent(co)))); void newtListboxSetCurrent(co, num) @@ -921,25 +906,48 @@ newtListboxSetData(co, num, data) newtComponent co int num - void * data + SV * data + PREINIT: + char * text; + void * old; + PPCODE: + newtListboxGetEntry(co, num, &text, &old); + if (old) SvREFCNT_dec((SV *) old); + newtListboxSetData(co, num, data); + SvREFCNT_inc(data); int newtListboxAppendEntry(co, text, data) newtComponent co char * text SV * data - + CODE: + RETVAL = newtListboxAppendEntry(co, text, data); + if (!RETVAL) SvREFCNT_inc(data); + OUTPUT: + RETVAL + int newtListboxInsertEntry(co, text, data, key) newtComponent co char * text SV * data SV * key + CODE: + RETVAL = newtListboxInsertEntry(co, text, data, key); + if (!RETVAL) SvREFCNT_inc(data); + OUTPUT: + RETVAL int newtListboxDeleteEntry(co, data) newtComponent co SV * data + CODE: + RETVAL = newtListboxDeleteEntry(co, data); + if (!RETVAL) SvREFCNT_dec(data); + OUTPUT: + RETVAL void @@ -973,8 +981,8 @@ void newtListboxSelectItem(co, key, sense) newtComponent co - void * key - int sense + SV * key + enum newtFlagsSense sense newtComponent newtCheckboxTree(left, top, height, flags) @@ -1088,9 +1096,14 @@ newtFormSetSize(co) newtComponent co -newtComponent +void newtFormGetCurrent(co) newtComponent co + PREINIT: + SV sv; /* joe: do I need this? just copying newtFormRun */ + PPCODE: + XPUSHs(sv_2mortal(sv_setref_pv(newSViv(0), "newtComponent", + (void*)newtFormGetCurrent(co)))); void newtFormSetBackground(co, color) @@ -1307,12 +1320,6 @@ int recurse newtGrid -newtButtonBarv(button1, b1comp, args) - char * button1 - newtComponent * b1comp - va_list args - -newtGrid newtButtonBar(button1, b1comp, ...) char * button1 newtComponent * b1comp @@ -1322,13 +1329,6 @@ char * title char * buttonText char * text - -void -newtWinMessagev(title, buttonText, text, argv) - char * title - char * buttonText - char * text - va_list argv int newtWinChoice(title, button1, button2, text, ...)