curses 1.2.7-x64-mingw32 → 1.3.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +1 -1
- data/.travis.yml +6 -3
- data/History.md +14 -0
- data/Rakefile +10 -7
- data/curses.gemspec +1 -1
- data/ext/curses/curses.c +1266 -140
- data/ext/curses/extconf.rb +10 -0
- data/lib/2.4/curses.so +0 -0
- data/lib/2.5/curses.so +0 -0
- data/lib/2.6/curses.so +0 -0
- data/sample/form.rb +52 -0
- data/sample/menu.rb +4 -4
- metadata +4 -4
- data/lib/2.3/curses.so +0 -0
data/ext/curses/extconf.rb
CHANGED
@@ -150,6 +150,16 @@ if header_library
|
|
150
150
|
$defs << '-DHAVE_MENU'
|
151
151
|
end
|
152
152
|
|
153
|
+
if (have_header("ncursesw/form.h") ||
|
154
|
+
have_header("ncurses/form.h") ||
|
155
|
+
have_header("curses/form.h") ||
|
156
|
+
have_header("form.h")) &&
|
157
|
+
(have_library("formw", "new_form") ||
|
158
|
+
have_library("form", "new_form"))
|
159
|
+
$defs << '-DHAVE_FORM'
|
160
|
+
have_func("form_driver_w")
|
161
|
+
end
|
162
|
+
|
153
163
|
if RUBY_VERSION >= '2.1'
|
154
164
|
create_header
|
155
165
|
create_makefile("curses")
|
data/lib/2.4/curses.so
CHANGED
Binary file
|
data/lib/2.5/curses.so
CHANGED
Binary file
|
data/lib/2.6/curses.so
CHANGED
Binary file
|
data/sample/form.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
require "curses"
|
2
|
+
|
3
|
+
Curses.init_screen
|
4
|
+
Curses.cbreak
|
5
|
+
Curses.noecho
|
6
|
+
Curses.stdscr.keypad = true
|
7
|
+
at_exit do
|
8
|
+
Curses.close_screen
|
9
|
+
end
|
10
|
+
|
11
|
+
fields = [
|
12
|
+
Curses::Field.new(1, 10, 4, 18, 0, 0),
|
13
|
+
Curses::Field.new(1, 10, 6, 18, 0, 0)
|
14
|
+
]
|
15
|
+
fields.each do |field|
|
16
|
+
field.set_back(Curses::A_UNDERLINE)
|
17
|
+
field.opts_off(Curses::O_AUTOSKIP)
|
18
|
+
end
|
19
|
+
|
20
|
+
form = Curses::Form.new(fields)
|
21
|
+
form.post
|
22
|
+
|
23
|
+
Curses.setpos(4, 10)
|
24
|
+
Curses.addstr("Value 1:")
|
25
|
+
Curses.setpos(6, 10)
|
26
|
+
Curses.addstr("Value 2:")
|
27
|
+
|
28
|
+
while ch = Curses.get_char
|
29
|
+
begin
|
30
|
+
case ch
|
31
|
+
when Curses::KEY_F1
|
32
|
+
break
|
33
|
+
when Curses::KEY_DOWN
|
34
|
+
form.driver(Curses::REQ_NEXT_FIELD)
|
35
|
+
form.driver(Curses::REQ_END_LINE)
|
36
|
+
when Curses::KEY_UP
|
37
|
+
form.driver(Curses::REQ_PREV_FIELD)
|
38
|
+
form.driver(Curses::REQ_END_LINE)
|
39
|
+
when Curses::KEY_RIGHT
|
40
|
+
form.driver(Curses::REQ_NEXT_CHAR)
|
41
|
+
when Curses::KEY_LEFT
|
42
|
+
form.driver(Curses::REQ_PREV_CHAR)
|
43
|
+
when Curses::KEY_BACKSPACE
|
44
|
+
form.driver(Curses::REQ_DEL_PREV)
|
45
|
+
else
|
46
|
+
form.driver(ch)
|
47
|
+
end
|
48
|
+
rescue Curses::RequestDeniedError
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
form.unpost
|
data/sample/menu.rb
CHANGED
@@ -5,13 +5,13 @@ Curses.cbreak
|
|
5
5
|
Curses.noecho
|
6
6
|
Curses.stdscr.keypad = true
|
7
7
|
at_exit do
|
8
|
-
Curses.
|
8
|
+
Curses.close_screen
|
9
9
|
end
|
10
10
|
|
11
11
|
menu = Curses::Menu.new([
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
["Apple", "Red fruit"],
|
13
|
+
["Orange", "Orange fruit"],
|
14
|
+
["Banana", "Yellow fruit"]
|
15
15
|
])
|
16
16
|
menu.post
|
17
17
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: curses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Shugo Maeda
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -75,11 +75,11 @@ files:
|
|
75
75
|
- ext/curses/curses.c
|
76
76
|
- ext/curses/depend
|
77
77
|
- ext/curses/extconf.rb
|
78
|
-
- lib/2.3/curses.so
|
79
78
|
- lib/2.4/curses.so
|
80
79
|
- lib/2.5/curses.so
|
81
80
|
- lib/2.6/curses.so
|
82
81
|
- lib/curses.rb
|
82
|
+
- sample/form.rb
|
83
83
|
- sample/hello.rb
|
84
84
|
- sample/menu.rb
|
85
85
|
- sample/mouse.rb
|
@@ -99,7 +99,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
100
100
|
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '2.
|
102
|
+
version: '2.4'
|
103
103
|
- - "<"
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '2.7'
|
data/lib/2.3/curses.so
DELETED
Binary file
|