CBL-Mariner/SPECS-EXTENDED/perl-Newt/newt-perl-1.08-debian.patch

567 lines
16 KiB
Diff

--- libnewt-perl-1.08.orig/examples/install
+++ libnewt-perl-1.08/examples/install
@@ -10,7 +10,7 @@
"Blah, blah");
my $i = 1;
-my $alert = Newt::Panel(1, 2, 'Instalation')
+my $alert = Newt::Panel(1, 2, 'Installation')
->Add(0, 0, Newt::Label('Installation complete'), 0, 0, 0, 0, 1)
->Add(0, 1, OK_BUTTON);
my $label = Newt::Label('Starting installation...');
--- libnewt-perl-1.08.orig/MANIFEST
+++ libnewt-perl-1.08/MANIFEST
@@ -6,31 +6,4 @@
Newt.xs
test.pl
typemap
-newtlib/CHANGES
-newtlib/COPYING
-newtlib/Makefile.PL
-newtlib/button.c
-newtlib/buttonbar.c
-newtlib/checkbox.c
-newtlib/dialogboxes.c
-newtlib/dialogboxes.h
-newtlib/entry.c
-newtlib/form.c
-newtlib/grid.c
-newtlib/label.c
-newtlib/listbox.c
-newtlib/newt.c
-newtlib/newt.h
-newtlib/newt_pr.h
-newtlib/scale.c
-newtlib/scrollbar.c
-newtlib/showchars.c
-newtlib/showkey.c
-newtlib/test.c
-newtlib/testgrid.c
-newtlib/textbox.c
-newtlib/tutorial.sgml
-newtlib/whiptail.c
-newtlib/whiptcl.c
-newtlib/windows.c
examples/install
--- libnewt-perl-1.08.orig/Newt.pm
+++ libnewt-perl-1.08/Newt.pm
@@ -18,6 +18,8 @@
NEWT_ANCHOR_LEFT
NEWT_ANCHOR_RIGHT
NEWT_ANCHOR_TOP
+ NEWT_ARG_APPEND
+ NEWT_ARG_LAST
NEWT_COLORSET_ACTBUTTON
NEWT_COLORSET_ACTCHECKBOX
NEWT_COLORSET_ACTLISTBOX
@@ -39,6 +41,7 @@
NEWT_COLORSET_SELLISTBOX
NEWT_COLORSET_SHADOW
NEWT_COLORSET_TEXTBOX
+ NEWT_COLORSET_THREEDBOX
NEWT_COLORSET_TITLE
NEWT_COLORSET_WINDOW
NEWT_ENTRY_DISABLED
@@ -47,12 +50,12 @@
NEWT_ENTRY_SCROLL
NEWT_FD_READ
NEWT_FD_WRITE
- NEWT_FLAG_DISABLED
NEWT_FLAG_BORDER
+ NEWT_FLAG_CHECKBOX
+ NEWT_FLAG_DISABLED
NEWT_FLAG_HIDDEN
NEWT_FLAG_MULTIPLE
NEWT_FLAG_NOF12
- NEWT_FLAG_NOSCROLL
NEWT_FLAG_RETURNEXIT
NEWT_FLAG_SCROLL
NEWT_FLAG_SELECTED
@@ -79,6 +82,7 @@
NEWT_KEY_F8
NEWT_KEY_F9
NEWT_KEY_HOME
+ NEWT_KEY_INSERT
NEWT_KEY_LEFT
NEWT_KEY_PGDN
NEWT_KEY_PGUP
@@ -95,12 +99,14 @@
NEWT_EXIT_HOTKEY
NEWT_EXIT_COMPONENT
NEWT_EXIT_FOREADY
- OK_BUTTON
- CANCEL_BUTTON
- QUIT_BUTTON
- BACK_BUTTON
- OK_CANCEL_PANEL
- OK_BACK_PANEL
+ OK_BUTTON
+ CANCEL_BUTTON
+ QUIT_BUTTON
+ BACK_BUTTON
+ OK_CANCEL_PANEL
+ OK_BACK_PANEL
+ newtGridDestroy
+ newtListboxAddEntry
);
%EXPORT_TAGS = (exits => [qw(NEWT_EXIT_HOTKEY
@@ -125,6 +131,7 @@
NEWT_KEY_F8
NEWT_KEY_F9
NEWT_KEY_HOME
+ NEWT_KEY_INSERT
NEWT_KEY_LEFT
NEWT_KEY_PGDN
NEWT_KEY_PGUP
@@ -139,6 +146,8 @@
NEWT_ANCHOR_LEFT
NEWT_ANCHOR_RIGHT
NEWT_ANCHOR_TOP)],
+ argss => [qw(NEWT_ARG_APPEND
+ NEWT_ARG_LAST)],
colorsets => [qw(NEWT_COLORSET_ACTBUTTON
NEWT_COLORSET_ACTCHECKBOX
NEWT_COLORSET_ACTLISTBOX
@@ -160,10 +169,12 @@
NEWT_COLORSET_SELLISTBOX
NEWT_COLORSET_SHADOW
NEWT_COLORSET_TEXTBOX
+ NEWT_COLORSET_THREEDBOX
NEWT_COLORSET_TITLE
NEWT_COLORSET_WINDOW)],
flags => [qw(NEWT_FLAG_DISABLED
NEWT_FLAG_BORDER
+ NEWT_FLAG_CHECKBOX
NEWT_FLAG_HIDDEN
NEWT_FLAG_MULTIPLE
NEWT_FLAG_NOF12
@@ -787,7 +798,7 @@
=head1 NAME
-Newt - Perl bindings for RedHat newt library
+Newt - Perl bindings for Red Hat newt library
=head1 SYNOPSIS
@@ -802,9 +813,9 @@
=head1 DESCRIPTION
-The Newt module implements perl bindings for the RedHat newt windowing
+The Newt module implements perl bindings for the Red Hat newt windowing
system, a terminal-based window and widget library for writing
-applications with a simple, but user friendly, interface.
+applications with a simple, but user-friendly, interface.
=head1 Basic Newt functions
@@ -937,7 +948,7 @@
actual tag for that component.
In general when the return value of any method of a component isn't
-described the method returns the component itself to allow contructions
+described the method returns the component itself to allow constructions
like:
$panel
@@ -1029,12 +1040,12 @@
=head2 Checkboxes
-Newt checkboxes are peculiar, since may have more than two
+Newt checkboxes are peculiar, since they may have more than two
states. To create a normal one (checked or unchecked), do this:
$check = Newt::Checkbox("Normal checkbox");
-But you can create, for example, a checkbox that switches form not
+But you can create, for example, a checkbox that switches from not
checked to checked with an asterisk and then to checked with an 'M':
$check = Newt::Checkbox("Normal checkbox", " ", " *M");
@@ -1175,14 +1186,14 @@
All the arguments are simply concatenated using the double quote
operator.
-The flags that can be passed to the cronstuctor are the following:
+The flags that can be passed to the constructor are the following:
=over
=item C<NEWT_FLAG_WRAP>
All text in the textbox should be wrapped to fit the width of the
-textbox. If this flag is not specified, each newline delimited line in
+textbox. If this flag is not specified, each newline-delimited line in
the text is truncated if it is too long to fit.
When Newt wraps text, it tries not to break lines on spaces or
@@ -1191,7 +1202,7 @@
=item C<NEWT_FLAG_SCROLL>
-The text shoud be scrollable. When this option is used, the scrollbar
+The text should be scrollable. When this option is used, the scrollbar
which is added increases the width of the area used by the textbox by
2 characters.
@@ -1238,13 +1249,13 @@
final textbox, the width and flex values for the text (which are
identical to the parameters passed to C<Newt::Reflow()>, and the flags
for the textbox (which are the same as the flags for
-C<Newt::Textbox(). This function does not let you limit the height of
-the textbox, however, making limiting its use to contructing
+C<Newt::Textbox()>. This function does not let you limit the height of
+the textbox, however, making limiting its use to constructing
textboxes which do not need to scroll.
To find out how tall the textbox created by C<Newt::TextboxReflowed()> is,
use C<Newt::GetNumLines()>, which returns the number of lines in the
-textbox. For textboxes created by C<Newt::TextboxReflowed()>/, this is
+textbox. For textboxes created by C<Newt::TextboxReflowed()>, this is
always the same as the height of the textbox.
Please note that the order of the parameters of Newt::ReflowText and
@@ -1270,7 +1281,7 @@
C<$normalColorset> is often C<NEWT_COLORSET_WINDOW> and
C<$thumbColorset> C<NEWT_COLORSET_ACTCHECKBOX>.
-If you do not want to bother with colors, you can ommit the last two
+If you do not want to bother with colors, you can omit the last two
parameters and let Newt use the defaults.
As the scrollbar is normally updated by the component it is mated with,
@@ -1285,7 +1296,7 @@
$panel = Newt::Panel(2, 3, "Panel example");
-When run, panesl are centered by default, but you can specify a
+When run, panels are centered by default, but you can specify a
position relative to the topleft corner of the screen by appending two
optional integers:
@@ -1372,7 +1383,7 @@
component or a key that causes the panel to exit. Sometimes is useful
to present the interface to the user without blocking the execution of
code. This can be done by only drawing the panel, not running it. It
-is easy to show an advance status for a lengthy operation liek this:
+is easy to show an advance status for a lengthy operation like this:
$i = 1;
foreach (@items) {
@@ -1392,7 +1403,7 @@
=head1 Constants
You can import all the constants exported by this package as needed
-qor using several predefined tags, with the folowing syntax:
+or using several predefined tags, with the following syntax:
use Newt qw(:exits :keys);
@@ -1419,8 +1430,8 @@
=item macros
macros to make useful buttons and panels: OK_BUTTON, CANCEL_BUTTON,
-QUIT_BUTTON, BACK_BUTTON, OK_CANCEL_PANEL, OK_BACK_PANEL. this macros
-only create componetnts which are properly tagged.
+QUIT_BUTTON, BACK_BUTTON, OK_CANCEL_PANEL, OK_BACK_PANEL. This macros
+only create components which are properly tagged.
=back
@@ -1436,17 +1447,17 @@
=head1 SEE ALSO
-I<Writing programs using Newt>, by Eric Troan.
+I<Writing programs using Newt>, by Erik Troan.
=head1 THANKS TO
-Eric Troan, for writing this useful library. Thanks for his tutorial,
+Erik Troan, for writing this useful library. Thanks for his tutorial,
too, from where I stole complete paragraphs for this documentation,
I'm afraid.
=head1 AUTHOR
-The original author of the RedHat newt library is Erik Troan,
+The original author of the Red Hat newt library is Erik Troan,
<I<ewt@redhat.com>> The author of this Perl bindings is Alejandro
Escalante Medina, <I<amedina@msg.com.mx>>
--- libnewt-perl-1.08.orig/Newt.xs
+++ libnewt-perl-1.08/Newt.xs
@@ -8,7 +8,7 @@
}
#endif
-#include "newtlib/newt.h"
+#include <newt.h>
static int
entryfilter_cb(co, cv, ch, cursor)
@@ -136,6 +136,18 @@
#else
goto not_there;
#endif
+ if (strEQ(name, "NEWT_ARG_APPEND"))
+#ifdef NEWT_ARG_APPEND
+ return NEWT_ARG_APPEND;
+#else
+ goto not_there;
+#endif
+ if (strEQ(name, "NEWT_ARG_LAST"))
+#ifdef NEWT_ARG_LAST
+ return NEWT_ARG_LAST;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "NEWT_COLORSET_ACTBUTTON"))
#ifdef NEWT_COLORSET_ACTBUTTON
return NEWT_COLORSET_ACTBUTTON;
@@ -262,6 +274,12 @@
#else
goto not_there;
#endif
+ if (strEQ(name, "NEWT_COLORSET_THREEDBOX"))
+#ifdef NEWT_COLORSET_THREEDBOX
+ return NEWT_COLORSET_THREEDBOX;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "NEWT_COLORSET_TITLE"))
#ifdef NEWT_COLORSET_TITLE
return NEWT_COLORSET_TITLE;
@@ -316,6 +334,12 @@
#else
goto not_there;
#endif
+ if (strEQ(name, "NEWT_FLAG_CHECKBOX"))
+#ifdef NEWT_FLAG_CHECKBOX
+ return NEWT_FLAG_CHECKBOX;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "NEWT_FLAG_DISABLED"))
#ifdef NEWT_FLAG_DISABLED
return NEWT_FLAG_DISABLED;
@@ -496,6 +520,12 @@
#else
goto not_there;
#endif
+ if (strEQ(name, "NEWT_KEY_INSERT"))
+#ifdef NEWT_KEY_INSERT
+ return NEWT_KEY_INSERT;
+#else
+ goto not_there;
+#endif
if (strEQ(name, "NEWT_KEY_LEFT"))
#ifdef NEWT_KEY_LEFT
return NEWT_KEY_LEFT;
@@ -720,12 +754,14 @@
void
newtSuspend()
+ # something is probably wrong below.
void
-newtSetSuspendCallback(cv)
+newtSetSuspendCallback(cv, data)
SV *cv;
+ SV *data
CODE:
perl_suspend_cb = newSVsv(cv);
- newtSetSuspendCallback(suspend_cb);
+ newtSetSuspendCallback(suspend_cb, data);
void
newtResume()
@@ -945,6 +981,70 @@
int sense
newtComponent
+newtCheckboxTree(left, top, height, flags)
+ int left
+ int top
+ int height
+ int flags
+
+newtComponent
+newtCheckboxTreeMulti(left, top, height, seq, flags)
+ int left
+ int top
+ int height
+ char * seq
+ int flags
+
+void
+newtCheckboxTreeGetSelection(co, numitems)
+ newtComponent co
+ PREINIT:
+ int i;
+ int numitems = 0;
+ void **array;
+ PPCODE:
+ array = newtListboxGetSelection(co, &numitems);
+ for(i = 0; i < numitems; i++) {
+ XPUSHs(sv_2mortal(newSVsv((SV *)array[i])));
+ }
+
+void
+newtCheckboxTreeGetMultiSelection(co, numitems, seqnum)
+ newtComponent co
+ char seqnum
+ PREINIT:
+ int i;
+ int numitems = 0;
+ void **array;
+ PPCODE:
+ array = newtListboxGetSelection(co, &numitems);
+ for(i = 0; i < numitems; i++) {
+ XPUSHs(sv_2mortal(newSVsv((SV *)array[i])));
+ }
+
+int
+newtCheckboxTreeAddItem(co, text, data, flags, index, ...)
+ newtComponent co
+ char * text
+ void * data
+ int flags
+ int index
+
+int
+newtCheckboxTreeAddArray(co, text, data, flags, indexes, ...)
+ newtComponent co
+ char * text
+ void * data
+ int flags
+ int * indexes
+
+int *
+newtCheckboxTreeFindItem(co, data)
+ newtComponent co
+ void * data
+
+
+newtComponent
newtTextboxReflowed(left, top, text, width, flexDown, flexUp, flags)
int left
int top
@@ -1087,6 +1187,12 @@
char *
newtEntryGetValue(co)
newtComponent co
+
+void
+newtEntrySetFlags(co, flags, sense)
+ newtComponent co
+ int flags
+ enum newtFlagsSense sense
newtComponent
newtScale(left, top, width, fullValue)
--- libnewt-perl-1.08.orig/Makefile.PL
+++ libnewt-perl-1.08/Makefile.PL
@@ -3,14 +3,6 @@
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Newt',
- 'LIBS' => ['-lslang '], # e.g., '-lm'
+ 'LIBS' => ['-lnewt'], # e.g. ['-lm']
'VERSION_FROM' => 'Newt.pm', # finds $VERSION
- 'MYEXTLIB' => 'newtlib/libnewt$(LIB_EXT)',
);
-
-sub MY::postamble {
- '
-$(MYEXTLIB): newtlib/Makefile
- cd newtlib && $(MAKE) $(PASTHRU)
-';
-}
--- libnewt-perl-1.08.orig/ChangeLog
+++ libnewt-perl-1.08/ChangeLog
@@ -1,9 +1,9 @@
Fri Nov 6 18:45:51 1998 Alejandro Escalante Medina <amedina@msg.com.mx>
- * Newt.pm: Flat $panel->{refs} before ->Run to make posible to find
+ * Newt.pm: Flat $panel->{refs} before ->Run to make possible to find
a component in a subpanel.
Made all methods returns $self when makes sense.
- Some changes in Textboxes, labels, etc. to allow lists, hopes anything break.
+ Some changes in Textboxes, labels, etc. to allow lists, hopes anything break.
Made the window system usable and add Hide method to panel;
* Newt.xs: Fixed path for newt.h
@@ -33,16 +33,16 @@
Fri Oct 30 18:49:16 1998 Alejandro Escalante Medina <amedina@msg.com.mx>
- * Newt.pm: Rewrote radiogrups to use grids only. No forms, sorry.
+ * Newt.pm: Rewrote radiogroups to use grids only. No forms, sorry.
Fixed some minor typos.
Changed $VERSION to be more perl-module compliant. this changes
version number, sorry again.
Fri Oct 30 18:37:11 1998 Alejandro Escalante Medina <amedina@msg.com.mx>
- * Newt.pm: Rewrote radiogrups to use grids only. No forms, sorry.
- Fixed some minot typos (Textbox::Set() and one more).
- Changed $VERSION to be more perl-module compliant. this changes
+ * Newt.pm: Rewrote radiogroups to use grids only. No forms, sorry.
+ Fixed some minor typos (Textbox::Set() and one more).
+ Changed $VERSION to be more perl-module compliant. This changes
version number, sorry again.
Fri Oct 30 18:28:34 1998 Alejandro Escalante Medina <amedina@msg.com.mx>
@@ -51,7 +51,7 @@
Fri Oct 30 18:21:50 1998 Alejandro Escalante Medina <amedina@msg.com.mx>
- * Newt.pm: Rewrote radiogrups to use grids only. No forms, sorry.
+ * Newt.pm: Rewrote radiogroups to use grids only. No forms, sorry.
Fixed some minot typos (Textbox::Set() and one more).
Changed $VERSION to be more perl-module compliant. this changes
version number, sorry again.
@@ -71,7 +71,7 @@
Mon Oct 26 18:04:51 1998 Alejandro Escalante Medina <amedina@msg.com.mx>
- * test.pl: Changes to test new radiogrupo funcionality
+ * test.pl: Changes to test new radiogroups funcionality
* Newt.pm: Added DESTROY to forms
Made Radiogroups derive from panels
--- libnewt-perl-1.08.orig/README
+++ libnewt-perl-1.08/README
@@ -3,7 +3,7 @@
Description
Newt is a perl library built on top of Red Hat's newt C library for
-text screen widgets. It allows a perl programer to build simple but
+text screen widgets. It allows a perl programmer to build simple but
effective text-mode user interfaces with little effort.
It is very usable because it has complete support for all widgets
--- libnewt-perl-1.08.orig/test.pl.debian
+++ libnewt-perl-1.08/test.pl
@@ -24,7 +24,7 @@
Newt::Resume();
}
-Newt::SetSuspendCallback(\&suspend_cb);
+Newt::SetSuspendCallback(\&suspend_cb, data);
# Panel example
Newt::Init();
@@ -38,7 +38,7 @@
$ok = Newt::Button("Ok", 0);
$ok->Tag("OK");
$li = Newt::Listbox(5, NEWT_FLAG_SCROLL | NEWT_FLAG_BORDER | NEWT_FLAG_MULTIPLE);
-$li->Add('Red', 'Blue', 'Yellow', 'Gray', 'Green');
+$li->Append('Red', 'Blue', 'Yellow', 'Gray', 'Green');
$panel1 = Newt::Panel(2, 4, "Panel example");
$panel1->AddHotKey(NEWT_KEY_F11);
$panel2 = Newt::Panel(1, 2, "Second panel");