summaryrefslogtreecommitdiffstats
path: root/perl-install/Newt/Newt.xs
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
committerMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
commitd5c526273db473a7d87a26000585900fc10dda7d (patch)
tree0fdaabe7a00921b6cc556601b103d344fc7ac781 /perl-install/Newt/Newt.xs
parent9c164312d4bfff6d93e1c4529de6b992f2bebc44 (diff)
downloaddrakx-d5c526273db473a7d87a26000585900fc10dda7d.tar
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.gz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.bz2
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.xz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.zip
This commit was manufactured by cvs2svn to create branch
'unlabeled-1.1.1'.
Diffstat (limited to 'perl-install/Newt/Newt.xs')
-rw-r--r--perl-install/Newt/Newt.xs139
1 files changed, 109 insertions, 30 deletions
diff --git a/perl-install/Newt/Newt.xs b/perl-install/Newt/Newt.xs
index 97c056ee6..e60583de1 100644
--- a/perl-install/Newt/Newt.xs
+++ b/perl-install/Newt/Newt.xs
@@ -9,13 +9,6 @@ static void suspend() {
newtResume();
}
-static void componentCallback(newtComponent co, void *data) {
- dSP;
- PUSHMARK(SP);
- perl_call_sv((SV *) data, G_DISCARD);
-}
-
-
typedef newtComponent Newt__Component;
typedef newtGrid Newt__Grid;
@@ -29,6 +22,38 @@ DESTROY()
newtFinished();
}
+void
+changeColors()
+ CODE:
+{
+const struct newtColors colors = {
+ "cyan", "black", /* root fg, bg */
+ "black", "blue", /* border fg, bg */
+ "white", "blue", /* window fg, bg */
+ "white", "black", /* shadow fg, bg */
+ "white", "blue", /* title fg, bg */
+ "yellow", "cyan", /* button fg, bg */
+ "white", "cyan", /* active button fg, bg */
+ "yellow", "blue", /* checkbox fg, bg */
+ "blue", "brown", /* active checkbox fg, bg */
+ "yellow", "blue", /* entry box fg, bg */
+ "white", "blue", /* label fg, bg */
+ "black", "cyan", /* listbox fg, bg */
+ "yellow", "cyan", /* active listbox fg, bg */
+ "white", "blue", /* textbox fg, bg */
+ "cyan", "black", /* active textbox fg, bg */
+ "white", "blue", /* help line */
+ "yellow", "blue", /* root text */
+ "blue", /* scale full */
+ "red", /* scale empty */
+ "blue", "cyan", /* disabled entry fg, bg */
+ "white", "blue", /* compact button fg, bg */
+ "yellow", "red", /* active & sel listbox */
+ "black", "brown" /* selected listbox */
+};
+ newtSetColors(colors);
+}
+
int
newtInit()
@@ -38,12 +63,6 @@ newtFinished()
void
newtCls()
-void
-newtSuspend()
-
-void
-newtResume()
-
int
newtCenteredWindow(width,height,title)
int width;
@@ -142,13 +161,6 @@ newtWinMenu(title,text,suggestedWidth,flexDown,flexUp,maxListHeight,list,def,but
MODULE = Newt PACKAGE = Newt::Component PREFIX = newt
-void
-addCallback(co, callback)
- Newt::Component co;
- SV *callback;
- CODE:
- newtComponentAddCallback(co, componentCallback, callback);
-
Newt::Component
newtCompactButton(left,top,text)
int left;
@@ -162,14 +174,15 @@ newtButton(left,top,text)
const char * text;
Newt::Component
-newtCheckbox(left,top,text,defValue,seq)
+newtCheckbox(left,top,text,defValue,seq,result)
int left;
int top;
const char * text;
char *defValue;
const char * seq;
+ int *result;
CODE:
- RETVAL = newtCheckbox(left, top, text, defValue[0], seq, NULL);
+ RETVAL = newtCheckbox(left, top, text, defValue[0], seq, (char*)result);
OUTPUT:
RETVAL
@@ -216,28 +229,94 @@ newtListbox(left,top,height,flags)
int height;
int flags;
-char *
+void *
newtListboxGetCurrent(co)
Newt::Component co;
void
-newtListboxSetCurrent(co,indice)
+newtListboxSetCurrent(co,num)
+ Newt::Component co;
+ int num;
+
+void
+newtListboxSetCurrentByKey(co,key)
+ Newt::Component co;
+ void * key;
+
+void
+newtListboxSetText(co,num,text)
Newt::Component co;
- int indice;
+ int num;
+ const char * text;
+
+void
+newtListboxSetEntry(co,num,text)
+ Newt::Component co;
+ int num;
+ const char * text;
void
newtListboxSetWidth(co,width)
Newt::Component co;
int width;
+# return the data passed to AddEntry
+void
+newtListboxSetData(co,num,data)
+ Newt::Component co;
+ int num;
+ void * data;
+
int
-newtListboxAddEntry(co,text)
+newtListboxAddEntry(co,text,data)
Newt::Component co;
const char * text;
-CODE:
- RETVAL = newtListboxAddEntry(co, text, text);
-OUTPUT:
- RETVAL
+ const void * data;
+
+# Send the key to insert after, or NULL to insert at the top
+int
+newtListboxInsertEntry(co,text,data,key)
+ Newt::Component co;
+ const char * text;
+ const void * data;
+ void * key;
+
+int
+newtListboxDeleteEntry(co,data)
+ Newt::Component co;
+ void * data;
+
+# removes all entries from listbox
+void
+newtListboxClear(co)
+ Newt::Component co;
+
+void
+newtListboxGetEntry(co,num,text,data)
+ Newt::Component co;
+ int num;
+ char * text;
+ void * data;
+ PPCODE:
+ {
+ newtListboxGetEntry(co, num, &text, data);
+ }
+
+# Returns an array of data pointers from items, last element is NULL
+void *
+newtListboxGetSelection(co,numitems)
+ Newt::Component co;
+ int *numitems;
+
+void
+newtListboxClearSelection(co)
+ Newt::Component co;
+
+void
+newtListboxSelectItem(co,key,sense)
+ Newt::Component co;
+ void *key
+ enum newtFlagsSense sense;
Newt::Component
newtTextboxReflowed(left,top,text,width,flexDown,flexUp,flags)