curses-pad 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +4 -0
- data/.autotest +8 -0
- data/.gemtest +0 -0
- data/History.rdoc +5 -0
- data/Manifest.txt +8 -0
- data/README.rdoc +119 -0
- data/Rakefile +40 -0
- data/ext/curses/pad/extconf.rb +58 -0
- data/ext/curses/pad/pad.c +235 -0
- data/test/test_curses_pad.rb +80 -0
- metadata +148 -0
- metadata.gz.sig +4 -0
data.tar.gz.sig
ADDED
data/.autotest
ADDED
data/.gemtest
ADDED
File without changes
|
data/History.rdoc
ADDED
data/Manifest.txt
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
= curses-pad
|
2
|
+
|
3
|
+
home :: https://github.com/drbrain/curses-pad
|
4
|
+
rdoc :: http://docs.seattlerb.org/curses-pad
|
5
|
+
bugs :: https://github.com/drbrain/curses-pad/issues
|
6
|
+
|
7
|
+
== Description
|
8
|
+
|
9
|
+
curses-pad adds newpad() support as Curses::Pad to the ruby curses extension.
|
10
|
+
Curses::Pad makes it easy to create scrollable windows using curses.
|
11
|
+
|
12
|
+
== Synopsis
|
13
|
+
|
14
|
+
A Curses::Pad may be used like a Curses::Window.
|
15
|
+
|
16
|
+
To load Curses::Pad:
|
17
|
+
|
18
|
+
require 'curses'
|
19
|
+
require 'curses/pad'
|
20
|
+
|
21
|
+
To create a pad that's twice the height of the screen
|
22
|
+
|
23
|
+
height = Curses.lines * 2
|
24
|
+
width = Curses.cols
|
25
|
+
|
26
|
+
pad = Curses::Pad.new height, width
|
27
|
+
|
28
|
+
To change what is shown on the screen use #noutrefresh or #refresh:
|
29
|
+
|
30
|
+
pad.noutrefresh 2, 0, # pad min row, column
|
31
|
+
0, 0, # screen min row, column
|
32
|
+
Curses.lines, Curses.cols # screen max row, column
|
33
|
+
|
34
|
+
To change the size of the pad use #resize (from superclass Curses::Window):
|
35
|
+
|
36
|
+
pad.resize height * 4, width
|
37
|
+
|
38
|
+
== Requirements
|
39
|
+
|
40
|
+
* ruby 1.9
|
41
|
+
* curses extension (require 'curses' must work)
|
42
|
+
|
43
|
+
== Install
|
44
|
+
|
45
|
+
sudo gem install curses-pad
|
46
|
+
|
47
|
+
== Developers
|
48
|
+
|
49
|
+
After checking out the source, run:
|
50
|
+
|
51
|
+
$ rake newb
|
52
|
+
|
53
|
+
This task will install any missing dependencies, run the tests/specs,
|
54
|
+
and generate the RDoc.
|
55
|
+
|
56
|
+
== License
|
57
|
+
|
58
|
+
(The Ruby License)
|
59
|
+
|
60
|
+
Copyright (c) Eric Hodel, MAEDA Shugo, others
|
61
|
+
|
62
|
+
Contains code from ext/curses/curses.c from ruby-trunk (see ext/curses/pad.c).
|
63
|
+
|
64
|
+
You can redistribute it and/or modify it under either the terms of the
|
65
|
+
2-clause BSDL (see the file BSDL), or the conditions below:
|
66
|
+
|
67
|
+
1. You may make and give away verbatim copies of the source form of the
|
68
|
+
software without restriction, provided that you duplicate all of the
|
69
|
+
original copyright notices and associated disclaimers.
|
70
|
+
|
71
|
+
2. You may modify your copy of the software in any way, provided that
|
72
|
+
you do at least ONE of the following:
|
73
|
+
|
74
|
+
a. place your modifications in the Public Domain or otherwise
|
75
|
+
make them Freely Available, such as by posting said
|
76
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
77
|
+
the author to include your modifications in the software.
|
78
|
+
|
79
|
+
b. use the modified software only within your corporation or
|
80
|
+
organization.
|
81
|
+
|
82
|
+
c. give non-standard binaries non-standard names, with
|
83
|
+
instructions on where to get the original software distribution.
|
84
|
+
|
85
|
+
d. make other distribution arrangements with the author.
|
86
|
+
|
87
|
+
3. You may distribute the software in object code or binary form,
|
88
|
+
provided that you do at least ONE of the following:
|
89
|
+
|
90
|
+
a. distribute the binaries and library files of the software,
|
91
|
+
together with instructions (in the manual page or equivalent)
|
92
|
+
on where to get the original distribution.
|
93
|
+
|
94
|
+
b. accompany the distribution with the machine-readable source of
|
95
|
+
the software.
|
96
|
+
|
97
|
+
c. give non-standard binaries non-standard names, with
|
98
|
+
instructions on where to get the original software distribution.
|
99
|
+
|
100
|
+
d. make other distribution arrangements with the author.
|
101
|
+
|
102
|
+
4. You may modify and include the part of the software into any other
|
103
|
+
software (possibly commercial). But some files in the distribution
|
104
|
+
are not written by the author, so that they are not under these terms.
|
105
|
+
|
106
|
+
For the list of those files and their copying conditions, see the
|
107
|
+
file LEGAL.
|
108
|
+
|
109
|
+
5. The scripts and library files supplied as input to or produced as
|
110
|
+
output from the software do not automatically fall under the
|
111
|
+
copyright of the software, but belong to whomever generated them,
|
112
|
+
and may be sold commercially, and may be aggregated with this
|
113
|
+
software.
|
114
|
+
|
115
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
116
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
117
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
118
|
+
PURPOSE.
|
119
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'hoe'
|
5
|
+
|
6
|
+
Hoe.plugin :minitest
|
7
|
+
Hoe.plugin :git
|
8
|
+
Hoe.plugin :travis
|
9
|
+
|
10
|
+
hoe = Hoe.spec 'curses-pad' do
|
11
|
+
self.version = '1.0' # remember to update pad.c
|
12
|
+
developer 'Eric Hodel', 'drbrain@segment7.net'
|
13
|
+
|
14
|
+
rdoc_locations <<
|
15
|
+
'docs.seattlerb.org:/data/www/docs.seattlerb.org/curses-pad/'
|
16
|
+
|
17
|
+
extra_dev_deps << ['rake-compiler', '~> 0.8', '>= 0.8.1']
|
18
|
+
|
19
|
+
spec_extras['extensions'] = %w[ext/curses/pad/extconf.rb]
|
20
|
+
spec_extras['required_ruby_version'] = '>= 1.9.2'
|
21
|
+
end
|
22
|
+
|
23
|
+
begin
|
24
|
+
require 'rake/extensiontask'
|
25
|
+
|
26
|
+
Rake::ExtensionTask.new 'pad', hoe.spec do |ext|
|
27
|
+
ext.ext_dir = 'ext/curses/pad'
|
28
|
+
ext.lib_dir = 'lib/curses'
|
29
|
+
end
|
30
|
+
rescue LoadError
|
31
|
+
task :compile do
|
32
|
+
abort 'run: rake check_extra_deps'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
task default: :compile
|
37
|
+
|
38
|
+
task test: :compile
|
39
|
+
|
40
|
+
# vim: syntax=ruby
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'mkmf'
|
2
|
+
|
3
|
+
begin
|
4
|
+
require "curses"
|
5
|
+
rescue LoadError
|
6
|
+
abort "could not require 'curses', make sure your ruby was built with curses"
|
7
|
+
end
|
8
|
+
|
9
|
+
def have_feature name, header, library, fatal = true
|
10
|
+
feature = have_func(name) or have_macro(name, headers)
|
11
|
+
|
12
|
+
return unless fatal
|
13
|
+
|
14
|
+
abort "unable to find #{name}() in #{header} and #{library}" unless feature
|
15
|
+
end
|
16
|
+
|
17
|
+
dir_config 'curses'
|
18
|
+
dir_config 'ncurses'
|
19
|
+
|
20
|
+
libs = [
|
21
|
+
["ncurses.h", ["ncursesw", "ncurses"]],
|
22
|
+
["ncurses/curses.h", ["ncurses"]],
|
23
|
+
["curses_colr/curses.h", ["cur_colr"]],
|
24
|
+
["curses.h", ["curses"]],
|
25
|
+
]
|
26
|
+
|
27
|
+
header = nil
|
28
|
+
library = nil
|
29
|
+
|
30
|
+
libs.each do |hdr, libraries|
|
31
|
+
next unless have_header hdr
|
32
|
+
|
33
|
+
header = hdr
|
34
|
+
|
35
|
+
library = libraries.find do |lib|
|
36
|
+
have_library lib, "initscr", hdr
|
37
|
+
end
|
38
|
+
|
39
|
+
break if library
|
40
|
+
end
|
41
|
+
|
42
|
+
abort "unable to find curses header and library" unless library
|
43
|
+
|
44
|
+
puts
|
45
|
+
puts "using header: #{header}"
|
46
|
+
puts "using library: #{library}"
|
47
|
+
puts
|
48
|
+
|
49
|
+
headers = [header]
|
50
|
+
headers.unshift "varargs.h" if header == "curses_colr/curses.h"
|
51
|
+
|
52
|
+
have_feature "newpad", headers, library
|
53
|
+
have_feature "doupdate", headers, library, false
|
54
|
+
|
55
|
+
puts
|
56
|
+
create_header
|
57
|
+
create_makefile "pad"
|
58
|
+
|
@@ -0,0 +1,235 @@
|
|
1
|
+
#include "ruby.h"
|
2
|
+
#include "extconf.h"
|
3
|
+
|
4
|
+
/* begin code from ruby's ext/curses/curses.c */
|
5
|
+
#if defined(HAVE_NCURSES_H)
|
6
|
+
# include <ncurses.h>
|
7
|
+
#elif defined(HAVE_NCURSES_CURSES_H)
|
8
|
+
# include <ncurses/curses.h>
|
9
|
+
#elif defined(HAVE_CURSES_COLR_CURSES_H)
|
10
|
+
# ifdef HAVE_STDARG_PROTOTYPES
|
11
|
+
# include <stdarg.h>
|
12
|
+
# else
|
13
|
+
# include <varargs.h>
|
14
|
+
# endif
|
15
|
+
# include <curses_colr/curses.h>
|
16
|
+
#else
|
17
|
+
# include <curses.h>
|
18
|
+
#endif
|
19
|
+
|
20
|
+
static VALUE mCurses;
|
21
|
+
|
22
|
+
struct windata {
|
23
|
+
WINDOW *window;
|
24
|
+
};
|
25
|
+
|
26
|
+
static void
|
27
|
+
no_window(void)
|
28
|
+
{
|
29
|
+
rb_raise(rb_eRuntimeError, "already closed window");
|
30
|
+
}
|
31
|
+
|
32
|
+
#define GetWINDOW(obj, winp) do {\
|
33
|
+
if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\
|
34
|
+
rb_raise(rb_eSecurityError, "Insecure: operation on untainted window");\
|
35
|
+
Data_Get_Struct((obj), struct windata, (winp));\
|
36
|
+
if ((winp)->window == 0) no_window();\
|
37
|
+
} while (0)
|
38
|
+
|
39
|
+
static void
|
40
|
+
window_free(void *p)
|
41
|
+
{
|
42
|
+
struct windata *winp = p;
|
43
|
+
if (winp->window && winp->window != stdscr) delwin(winp->window);
|
44
|
+
winp->window = 0;
|
45
|
+
xfree(winp);
|
46
|
+
}
|
47
|
+
|
48
|
+
static size_t
|
49
|
+
window_memsize(const void *p)
|
50
|
+
{
|
51
|
+
const struct windata *winp = p;
|
52
|
+
size_t size = sizeof(*winp);
|
53
|
+
if (!winp) return 0;
|
54
|
+
if (winp->window && winp->window != stdscr) size += sizeof(winp->window);
|
55
|
+
return size;
|
56
|
+
}
|
57
|
+
|
58
|
+
static VALUE
|
59
|
+
prep_window(VALUE class, WINDOW *window)
|
60
|
+
{
|
61
|
+
VALUE obj;
|
62
|
+
struct windata *winp;
|
63
|
+
|
64
|
+
if (window == NULL) {
|
65
|
+
rb_raise(rb_eRuntimeError, "failed to create window");
|
66
|
+
}
|
67
|
+
|
68
|
+
obj = rb_obj_alloc(class);
|
69
|
+
Data_Get_Struct(obj, struct windata, winp);
|
70
|
+
winp->window = window;
|
71
|
+
|
72
|
+
return obj;
|
73
|
+
}
|
74
|
+
/* end code from ruby's ext/curses/curses.c */
|
75
|
+
|
76
|
+
/*
|
77
|
+
* Document-method: Curses::Pad.new
|
78
|
+
*
|
79
|
+
* call-seq:
|
80
|
+
* new(height, width)
|
81
|
+
*
|
82
|
+
* Construct a new Curses::Pad with constraints of +height+ lines, +width+
|
83
|
+
* columns
|
84
|
+
*
|
85
|
+
*/
|
86
|
+
static VALUE
|
87
|
+
pad_initialize(VALUE obj, VALUE h, VALUE w)
|
88
|
+
{
|
89
|
+
struct windata *padp;
|
90
|
+
WINDOW *window;
|
91
|
+
|
92
|
+
rb_secure(4);
|
93
|
+
rb_funcall(mCurses, rb_intern("init_screen"), 0);
|
94
|
+
Data_Get_Struct(obj, struct windata, padp);
|
95
|
+
if (padp->window) delwin(padp->window);
|
96
|
+
window = newpad(NUM2INT(h), NUM2INT(w));
|
97
|
+
wclear(window);
|
98
|
+
padp->window = window;
|
99
|
+
|
100
|
+
return obj;
|
101
|
+
}
|
102
|
+
|
103
|
+
/*
|
104
|
+
* Document-method: Curses::Pad.subwin
|
105
|
+
*
|
106
|
+
* call-seq:
|
107
|
+
* subpad(height, width, begin_x, begin_y)
|
108
|
+
*
|
109
|
+
* Construct a new subpad with constraints of +height+ lines, +width+ columns,
|
110
|
+
* begin at +begin_x+ line, and +begin_y+ columns on the pad.
|
111
|
+
*
|
112
|
+
*/
|
113
|
+
static VALUE
|
114
|
+
pad_subpad(VALUE obj, VALUE height, VALUE width, VALUE begin_x, VALUE begin_y)
|
115
|
+
{
|
116
|
+
struct windata *padp;
|
117
|
+
WINDOW *subpad;
|
118
|
+
VALUE pad;
|
119
|
+
int h, w, x, y;
|
120
|
+
|
121
|
+
h = NUM2INT(height);
|
122
|
+
w = NUM2INT(width);
|
123
|
+
x = NUM2INT(begin_x);
|
124
|
+
y = NUM2INT(begin_y);
|
125
|
+
GetWINDOW(obj, padp);
|
126
|
+
subpad = subwin(padp->window, h, w, x, y);
|
127
|
+
pad = prep_window(rb_obj_class(obj), subpad);
|
128
|
+
|
129
|
+
return pad;
|
130
|
+
}
|
131
|
+
|
132
|
+
/*
|
133
|
+
* Document-method: Curses::Pad.refresh
|
134
|
+
*
|
135
|
+
* call-seq:
|
136
|
+
* pad.refresh(pad_minrow, pad_mincol, screen_minrow, screen_mincol, screen_maxrow, screen_maxcol)
|
137
|
+
*
|
138
|
+
* Refreshes the pad immediately. +pad_minrow+ and pad_mincol+ define the
|
139
|
+
* upper-left corner of the rectangle to be displayed. +screen_minrow+,
|
140
|
+
* +screen_mincol+, +screen_maxrow+, +screen_maxcol+ define the edges of the
|
141
|
+
* rectangle to be displayed on the screen.
|
142
|
+
*
|
143
|
+
*/
|
144
|
+
static VALUE
|
145
|
+
pad_refresh(VALUE obj, VALUE pminrow, VALUE pmincol, VALUE sminrow,
|
146
|
+
VALUE smincol, VALUE smaxrow, VALUE smaxcol)
|
147
|
+
{
|
148
|
+
struct windata *padp;
|
149
|
+
int pmr, pmc, smr, smc, sxr, sxc;
|
150
|
+
|
151
|
+
pmr = NUM2INT(pminrow);
|
152
|
+
pmc = NUM2INT(pmincol);
|
153
|
+
smr = NUM2INT(sminrow);
|
154
|
+
smc = NUM2INT(smincol);
|
155
|
+
sxr = NUM2INT(smaxrow);
|
156
|
+
sxc = NUM2INT(smaxcol);
|
157
|
+
|
158
|
+
GetWINDOW(obj, padp);
|
159
|
+
prefresh(padp->window, pmr, pmc, smr, smc, sxr, sxc);
|
160
|
+
|
161
|
+
return Qnil;
|
162
|
+
}
|
163
|
+
|
164
|
+
/*
|
165
|
+
* Document-method: Curses::Pad.noutrefresh
|
166
|
+
*
|
167
|
+
* call-seq:
|
168
|
+
* pad.noutrefresh(pad_minrow, pad_mincol, screen_minrow, screen_mincol, screen_maxrow, screen_maxcol)
|
169
|
+
*
|
170
|
+
* Marks the pad for refresh at the next call to Curses.doupdate.
|
171
|
+
* +pad_minrow+ and pad_mincol+ define the upper-left corner of the rectangle
|
172
|
+
* to be displayed. +screen_minrow+, +screen_mincol+, +screen_maxrow+,
|
173
|
+
* +screen_maxcol+ define the edges of the rectangle to be displayed on the
|
174
|
+
* screen.
|
175
|
+
*
|
176
|
+
*/
|
177
|
+
static VALUE
|
178
|
+
pad_noutrefresh(VALUE obj, VALUE pminrow, VALUE pmincol, VALUE sminrow,
|
179
|
+
VALUE smincol, VALUE smaxrow, VALUE smaxcol)
|
180
|
+
{
|
181
|
+
struct windata *padp;
|
182
|
+
int pmr, pmc, smr, smc, sxr, sxc;
|
183
|
+
|
184
|
+
pmr = NUM2INT(pminrow);
|
185
|
+
pmc = NUM2INT(pmincol);
|
186
|
+
smr = NUM2INT(sminrow);
|
187
|
+
smc = NUM2INT(smincol);
|
188
|
+
sxr = NUM2INT(smaxrow);
|
189
|
+
sxc = NUM2INT(smaxcol);
|
190
|
+
|
191
|
+
GetWINDOW(obj, padp);
|
192
|
+
#ifdef HAVE_DOUPDATE
|
193
|
+
pnoutrefresh(padp->window, pmr, pmc, smr, smc, sxr, sxc);
|
194
|
+
#else
|
195
|
+
prefresh(padp->window, pmr, pmc, smr, smc, sxr, sxc);
|
196
|
+
#endif
|
197
|
+
|
198
|
+
return Qnil;
|
199
|
+
}
|
200
|
+
|
201
|
+
void
|
202
|
+
Init_pad(void) {
|
203
|
+
VALUE cWindow, cPad;
|
204
|
+
|
205
|
+
rb_require("curses");
|
206
|
+
|
207
|
+
mCurses = rb_path2class("Curses");
|
208
|
+
|
209
|
+
if (rb_const_defined_at(mCurses, rb_intern("Pad")))
|
210
|
+
return;
|
211
|
+
|
212
|
+
cWindow = rb_path2class("Curses::Window");
|
213
|
+
|
214
|
+
/*
|
215
|
+
* Document-class: Curses::Pad
|
216
|
+
*
|
217
|
+
* == Description
|
218
|
+
*
|
219
|
+
* A Pad is like a Window but allows for scrolling of contents that cannot
|
220
|
+
* fit on the screen. Pads do not refresh automatically, use Pad#refresh
|
221
|
+
* or Pad#noutrefresh instead.
|
222
|
+
*
|
223
|
+
*/
|
224
|
+
cPad = rb_define_class_under(mCurses, "Pad", cWindow);
|
225
|
+
|
226
|
+
/* remember to update Rakefile */
|
227
|
+
rb_const_set(cPad, rb_intern("VERSION"), rb_str_new2("1.0"));
|
228
|
+
|
229
|
+
/* inherits alloc_func from cWindow */
|
230
|
+
rb_define_method(cPad, "initialize", pad_initialize, 2);
|
231
|
+
rb_define_method(cPad, "subpad", pad_subpad, 4);
|
232
|
+
rb_define_method(cPad, "refresh", pad_refresh, 6);
|
233
|
+
rb_define_method(cPad, "noutrefresh", pad_noutrefresh, 6);
|
234
|
+
rb_undef_method(cPad, "subwin");
|
235
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'tempfile'
|
3
|
+
require 'curses'
|
4
|
+
require 'curses/pad'
|
5
|
+
|
6
|
+
class TestCursesPad < MiniTest::Unit::TestCase
|
7
|
+
|
8
|
+
def setup
|
9
|
+
skip 'using built-in Curses::Pad' unless
|
10
|
+
Curses::Pad.const_defined? :VERSION
|
11
|
+
|
12
|
+
Curses.init_screen
|
13
|
+
end
|
14
|
+
|
15
|
+
def teardown
|
16
|
+
Curses.close_screen
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_initialize
|
20
|
+
pad = Curses::Pad.new Curses.lines, Curses.cols
|
21
|
+
|
22
|
+
assert_equal 0, pad.curx
|
23
|
+
assert_equal 0, pad.cury
|
24
|
+
|
25
|
+
assert_equal Curses.cols, pad.maxx
|
26
|
+
assert_equal Curses.lines, pad.maxy
|
27
|
+
|
28
|
+
assert_equal 0, pad.begx
|
29
|
+
assert_equal 0, pad.begy
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_noutrefresh
|
33
|
+
pad = Curses::Pad.new Curses.lines * 2, Curses.cols
|
34
|
+
|
35
|
+
pad.noutrefresh 3, 4, 5, 6, 7, 8
|
36
|
+
|
37
|
+
Curses.doupdate
|
38
|
+
|
39
|
+
assert_equal 0, pad.curx
|
40
|
+
assert_equal 0, pad.cury
|
41
|
+
|
42
|
+
assert_equal Curses.cols, pad.maxx
|
43
|
+
assert_equal Curses.lines * 2, pad.maxy
|
44
|
+
|
45
|
+
assert_equal 6, pad.begx
|
46
|
+
assert_equal 5, pad.begy
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_refresh
|
50
|
+
pad = Curses::Pad.new Curses.lines * 2, Curses.cols
|
51
|
+
|
52
|
+
pad.refresh 3, 4, 5, 6, 7, 8
|
53
|
+
|
54
|
+
assert_equal 0, pad.curx
|
55
|
+
assert_equal 0, pad.cury
|
56
|
+
|
57
|
+
assert_equal Curses.cols, pad.maxx
|
58
|
+
assert_equal Curses.lines * 2, pad.maxy
|
59
|
+
|
60
|
+
assert_equal 6, pad.begx
|
61
|
+
assert_equal 5, pad.begy
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_subpad
|
65
|
+
pad = Curses::Pad.new Curses.lines, Curses.cols
|
66
|
+
|
67
|
+
subpad = pad.subpad 5, 4, 3, 2
|
68
|
+
|
69
|
+
assert_equal 0, subpad.curx
|
70
|
+
assert_equal 0, subpad.cury
|
71
|
+
|
72
|
+
assert_equal 4, subpad.maxx
|
73
|
+
assert_equal 5, subpad.maxy
|
74
|
+
|
75
|
+
assert_equal 2, subpad.begx
|
76
|
+
assert_equal 3, subpad.begy
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
metadata
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: curses-pad
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Eric Hodel
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain:
|
12
|
+
- !binary |-
|
13
|
+
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURlRENDQW1DZ0F3SUJB
|
14
|
+
Z0lCQVRBTkJna3Foa2lHOXcwQkFRVUZBREJCTVJBd0RnWURWUVFEREFka2Nt
|
15
|
+
SnkKWVdsdU1SZ3dGZ1lLQ1pJbWlaUHlMR1FCR1JZSWMyVm5iV1Z1ZERjeEV6
|
16
|
+
QVJCZ29Ka2lhSmsvSXNaQUVaRmdOdQpaWFF3SGhjTk1USXdNakk0TVRjMU5E
|
17
|
+
STFXaGNOTVRNd01qSTNNVGMxTkRJMVdqQkJNUkF3RGdZRFZRUUREQWRrCmNt
|
18
|
+
SnlZV2x1TVJnd0ZnWUtDWkltaVpQeUxHUUJHUllJYzJWbmJXVnVkRGN4RXpB
|
19
|
+
UkJnb0praWFKay9Jc1pBRVoKRmdOdVpYUXdnZ0VpTUEwR0NTcUdTSWIzRFFF
|
20
|
+
QkFRVUFBNElCRHdBd2dnRUtBb0lCQVFDYmJnTHJHTEdJREU3NgpMVi9jdnhk
|
21
|
+
RXpDdVl1UzNvRzlQclNabnVEd2V5U1VmZHAvc28wY0RxK2o4YnF5Nk96WlN3
|
22
|
+
MDdnZGp3Rk1TZDZKClU1ZGRaQ1Z5d241bm5BUStVaTdqTVc1NENZdDUvSDZm
|
23
|
+
MlVTNlUwaFFPakpSNmNwZml5bWd4R2RmeVRpVmN2VG0KR2ovb2tXclFsME5q
|
24
|
+
WU9ZQnBEaSs5UFBtYUgyUm1MSnUwZEIvTnlsc0RuVzVqNnlOMUJFSThNZkpS
|
25
|
+
UitIUktaWQptVXRnekJ3RjFWNEtJWlE4RXVMNkkvbkhWdTA3aTZJa3JwQWd4
|
26
|
+
cFhVZmRKUUppMG9aQXFYdXJBVjN5VHhrRndkCmc2MllyclcyNm1EZStwWkJ6
|
27
|
+
UjZicExFK1BtWEN6ejdVeFVxM0FFMGdQSGJpTVhpZTNFRkUwb3huc1UzbElk
|
28
|
+
dWgKc0NBTmlROEJBZ01CQUFHamV6QjVNQWtHQTFVZEV3UUNNQUF3Q3dZRFZS
|
29
|
+
MFBCQVFEQWdTd01CMEdBMVVkRGdRVwpCQlM1azRaNzVWU3BkTTBBY2xHMlV2
|
30
|
+
ekZBL1ZXNURBZkJnTlZIUkVFR0RBV2dSUmtjbUp5WVdsdVFITmxaMjFsCmJu
|
31
|
+
UTNMbTVsZERBZkJnTlZIUklFR0RBV2dSUmtjbUp5WVdsdVFITmxaMjFsYm5R
|
32
|
+
M0xtNWxkREFOQmdrcWhraUcKOXcwQkFRVUZBQU9DQVFFQVBlV3pGbnJjdkM2
|
33
|
+
ZVZ6ZGxobWpVdWIyczZxaWVCa29uZ0tSREhRejVNRWVRdjRMUwpTQVJub0hZ
|
34
|
+
K3VDQVZMLzF4R0FobXB6cVEzZkpHV0s5ZUJhY1cvZThFNUdGOXhRY1YzbUUx
|
35
|
+
YkEwV05haURsWDVqClUyYUkrWkdTYmxxdkhVQ3hLQkhSMXM3VU1Ic2J6MXNh
|
36
|
+
T21nZFJUeVB4MGp1SnM2OG9jYlVUZVlCTFd1OVY0S1AKemRHQUcySlhPMmdP
|
37
|
+
TmczYjR0WUR2cEJMYnJ5K0tPWDI3aUFKdWxVYUg5VGlUT1VMTDRJVEpWRnNL
|
38
|
+
MG1ZVnFtUgpROFRubzlTM2U0WEdHUDFaV2ZMclRXRUpiYXZGZmhHSHV0MmlN
|
39
|
+
UndmQzdzL1lJTEFITkFUb3BhSmRIOUROcGQxClU4MXpHSE1VQk92ei9WR1Q2
|
40
|
+
d0p3WUozZW1TMm5mQTJOT0hGZmdBPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUt
|
41
|
+
LS0tLQo=
|
42
|
+
date: 2012-04-18 00:00:00.000000000 Z
|
43
|
+
dependencies:
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: rdoc
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
48
|
+
requirements:
|
49
|
+
- - ~>
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '3.10'
|
52
|
+
type: :development
|
53
|
+
prerelease: false
|
54
|
+
version_requirements: !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ~>
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '3.10'
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: rake-compiler
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ~>
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0.8'
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 0.8.1
|
71
|
+
type: :development
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ~>
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0.8'
|
79
|
+
- - ! '>='
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 0.8.1
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: hoe
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ~>
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '3.0'
|
98
|
+
description: ! 'curses-pad adds newpad() support as Curses::Pad to the ruby curses
|
99
|
+
extension.
|
100
|
+
|
101
|
+
Curses::Pad makes it easy to create scrollable windows using curses.'
|
102
|
+
email:
|
103
|
+
- drbrain@segment7.net
|
104
|
+
executables: []
|
105
|
+
extensions:
|
106
|
+
- ext/curses/pad/extconf.rb
|
107
|
+
extra_rdoc_files:
|
108
|
+
- History.rdoc
|
109
|
+
- Manifest.txt
|
110
|
+
- README.rdoc
|
111
|
+
files:
|
112
|
+
- .autotest
|
113
|
+
- History.rdoc
|
114
|
+
- Manifest.txt
|
115
|
+
- README.rdoc
|
116
|
+
- Rakefile
|
117
|
+
- ext/curses/pad/extconf.rb
|
118
|
+
- ext/curses/pad/pad.c
|
119
|
+
- test/test_curses_pad.rb
|
120
|
+
- .gemtest
|
121
|
+
homepage: https://github.com/drbrain/curses-pad
|
122
|
+
licenses: []
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options:
|
125
|
+
- --main
|
126
|
+
- README.rdoc
|
127
|
+
require_paths:
|
128
|
+
- lib
|
129
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
131
|
+
requirements:
|
132
|
+
- - ! '>='
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: 1.9.2
|
135
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
none: false
|
137
|
+
requirements:
|
138
|
+
- - ! '>='
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: '0'
|
141
|
+
requirements: []
|
142
|
+
rubyforge_project: curses-pad
|
143
|
+
rubygems_version: 1.8.22
|
144
|
+
signing_key:
|
145
|
+
specification_version: 3
|
146
|
+
summary: curses-pad adds newpad() support as Curses::Pad to the ruby curses extension
|
147
|
+
test_files:
|
148
|
+
- test/test_curses_pad.rb
|
metadata.gz.sig
ADDED