From c84c5659ea895d3190e3bc3509b1791fb88d073c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 26 Jan 2001 00:27:41 +0000 Subject: (newtFormAddGrid): new name for newtGridAddComponentsToForm, swap parameters for much better understanding (newtListboxGetCurrent): returns a SV (together with newtListboxAddEntry) (newtListboxAddEntry): data is now a SV --- perl-install/Newt/Newt.xs | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) (limited to 'perl-install/Newt') diff --git a/perl-install/Newt/Newt.xs b/perl-install/Newt/Newt.xs index 0b34fab69..fba7c5455 100644 --- a/perl-install/Newt/Newt.xs +++ b/perl-install/Newt/Newt.xs @@ -216,9 +216,14 @@ newtListbox(left,top,height,flags) int height; int flags; -char * +SV * newtListboxGetCurrent(co) Newt::Component co; +CODE: + RETVAL = SvREFCNT_inc(newtListboxGetCurrent(co)); +OUTPUT: + RETVAL + void newtListboxSetCurrent(co,indice) @@ -231,11 +236,12 @@ newtListboxSetWidth(co,width) int width; int -newtListboxAddEntry(co,text) +newtListboxAddEntry(co,text,data) Newt::Component co; const char * text; + SV * data; CODE: - RETVAL = newtListboxAddEntry(co, text, text); + RETVAL = newtListboxAddEntry(co, text, data); OUTPUT: RETVAL @@ -309,6 +315,14 @@ newtFormAddComponent(form,co) Newt::Component form; Newt::Component co; +void +newtFormAddGrid(form,grid,recurse) + Newt::Component form; + Newt::Grid grid; + int recurse; + CODE: + newtGridAddComponentsToForm(grid,form,recurse); + void newtFormSetHeight(co,height) Newt::Component co; @@ -415,22 +429,28 @@ newtGridFree(grid,recurse) int recurse; void -newtGridGetSize(grid,width,height) +newtGridPlace(grid,left,top) Newt::Grid grid; - int * width; - int * height; + int left; + int top; + +void +newtGridGetSize(grid) + Newt::Grid grid; + PPCODE: +{ + int width; + int height; + newtGridGetSize(grid, &width, &height); + PUSHs(sv_2mortal(newSViv(width))); + PUSHs(sv_2mortal(newSViv(height))); +} void newtGridWrappedWindow(grid,title) Newt::Grid grid; char * title; -void -newtGridAddComponentsToForm(grid,form,recurse) - Newt::Grid grid; - Newt::Component form; - int recurse; - Newt::Grid newtButtonBar(button1, ...) char * button1; -- cgit v1.2.1