summaryrefslogtreecommitdiffstats
path: root/perl-install/Newt/Newt.xs
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-04-25 23:14:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-04-25 23:14:11 +0000
commit57c9a45c5e54c97a71143cf73da8b9ad7c2e5d34 (patch)
tree9a7492fc08e0ac197485735ae2e4bc7688286413 /perl-install/Newt/Newt.xs
parent7039b28e9cc76fd602016a10c0927b40fc960b58 (diff)
downloaddrakx-57c9a45c5e54c97a71143cf73da8b9ad7c2e5d34.tar
drakx-57c9a45c5e54c97a71143cf73da8b9ad7c2e5d34.tar.gz
drakx-57c9a45c5e54c97a71143cf73da8b9ad7c2e5d34.tar.bz2
drakx-57c9a45c5e54c97a71143cf73da8b9ad7c2e5d34.tar.xz
drakx-57c9a45c5e54c97a71143cf73da8b9ad7c2e5d34.zip
no_comment
Diffstat (limited to 'perl-install/Newt/Newt.xs')
-rw-r--r--perl-install/Newt/Newt.xs52
1 files changed, 17 insertions, 35 deletions
diff --git a/perl-install/Newt/Newt.xs b/perl-install/Newt/Newt.xs
index 9423c85c0..97c056ee6 100644
--- a/perl-install/Newt/Newt.xs
+++ b/perl-install/Newt/Newt.xs
@@ -9,6 +9,13 @@ 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;
@@ -22,38 +29,6 @@ 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()
@@ -167,6 +142,13 @@ 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;
@@ -239,9 +221,9 @@ newtListboxGetCurrent(co)
Newt::Component co;
void
-newtListboxSetCurrentByKey(co,key)
+newtListboxSetCurrent(co,indice)
Newt::Component co;
- char * key;
+ int indice;
void
newtListboxSetWidth(co,width)
@@ -249,7 +231,7 @@ newtListboxSetWidth(co,width)
int width;
int
-newtListboxAddEntry(co,text,data)
+newtListboxAddEntry(co,text)
Newt::Component co;
const char * text;
CODE: