curses 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/History.md +11 -0
- data/README.md +4 -0
- data/curses.gemspec +1 -1
- data/ext/curses/curses.c +59 -3
- data/ext/curses/extconf.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7cde762b5d566d153efcb872a949cdd742ee678351642f99ff4142a302792f54
|
4
|
+
data.tar.gz: 3cacf0b68211f369d99b23592bb3e1035ab8d56f31c64ffb713ae573b30068c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c113a50e510eb659797ce295982c44e8c8d5355eb7ef9506b9d20b7a98ca92053960da5edc333d7b9fb0e9cfa659b4339abb25859d2bda4126227dce8e2ad17b
|
7
|
+
data.tar.gz: 8fde98598b7c32632bfdab0c0f92564d32088e311754c0c39ec905012ad874718e4a8b69f0953c9ff280de4ef399cb7c874908396a307a77118a72efdea5cb4d
|
data/History.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
### 1.2.5 / 2018-10-16
|
2
|
+
|
3
|
+
New features:
|
4
|
+
|
5
|
+
* Add mvderwin and derwin methods to Window. Pull request #37 by meschbach.
|
6
|
+
* Add documentation link. Pull request #39 by atshakil.
|
7
|
+
|
8
|
+
Bug fixes:
|
9
|
+
|
10
|
+
* Favor ncursesw over curses. Pull request #40 by DivineDominion.
|
11
|
+
|
1
12
|
### 1.2.4 / 2017-09-13
|
2
13
|
|
3
14
|
New features:
|
data/README.md
CHANGED
data/curses.gemspec
CHANGED
data/ext/curses/curses.c
CHANGED
@@ -20,12 +20,12 @@
|
|
20
20
|
#include "ruby/io.h"
|
21
21
|
#include "ruby/thread.h"
|
22
22
|
|
23
|
-
#if defined(
|
24
|
-
# include <ncurses.h>
|
25
|
-
#elif defined(HAVE_NCURSESW_CURSES_H)
|
23
|
+
#if defined(HAVE_NCURSESW_CURSES_H)
|
26
24
|
# include <ncursesw/curses.h>
|
27
25
|
#elif defined(HAVE_NCURSES_CURSES_H)
|
28
26
|
# include <ncurses/curses.h>
|
27
|
+
#elif defined(HAVE_NCURSES_H)
|
28
|
+
# include <ncurses.h>
|
29
29
|
#elif defined(HAVE_CURSES_COLR_CURSES_H)
|
30
30
|
# ifdef HAVE_STDARG_PROTOTYPES
|
31
31
|
# include <stdarg.h>
|
@@ -1589,6 +1589,38 @@ window_subwin(VALUE obj, VALUE height, VALUE width, VALUE top, VALUE left)
|
|
1589
1589
|
return win;
|
1590
1590
|
}
|
1591
1591
|
|
1592
|
+
#ifdef HAVE_DERWIN
|
1593
|
+
/*
|
1594
|
+
* Document-method: Curses::Window.derwin
|
1595
|
+
* call-seq: derwin(height, width, relative_top, relative_left)
|
1596
|
+
*
|
1597
|
+
* Construct a new subwindow with constraints of
|
1598
|
+
* +height+ lines, +width+ columns, begin at +top+ line, and begin +left+ most column
|
1599
|
+
* relative to the parent window.
|
1600
|
+
*
|
1601
|
+
*/
|
1602
|
+
static VALUE
|
1603
|
+
window_derwin(VALUE obj, VALUE height, VALUE width, VALUE top, VALUE left)
|
1604
|
+
{
|
1605
|
+
struct windata *winp;
|
1606
|
+
WINDOW *window;
|
1607
|
+
VALUE win;
|
1608
|
+
int h, w, t, l;
|
1609
|
+
|
1610
|
+
h = NUM2INT(height);
|
1611
|
+
w = NUM2INT(width);
|
1612
|
+
t = NUM2INT(top);
|
1613
|
+
l = NUM2INT(left);
|
1614
|
+
GetWINDOW(obj, winp);
|
1615
|
+
window = derwin(winp->window, h, w, t, l);
|
1616
|
+
win = prep_window(rb_obj_class(obj), window);
|
1617
|
+
|
1618
|
+
return win;
|
1619
|
+
}
|
1620
|
+
#else
|
1621
|
+
#define window_derwin rb_f_notimplement
|
1622
|
+
#endif
|
1623
|
+
|
1592
1624
|
/*
|
1593
1625
|
* Document-method: Curses::Window.close
|
1594
1626
|
*
|
@@ -1854,6 +1886,28 @@ window_move(VALUE obj, VALUE y, VALUE x)
|
|
1854
1886
|
return Qnil;
|
1855
1887
|
}
|
1856
1888
|
|
1889
|
+
#ifdef HAVE_MVDERWIN
|
1890
|
+
/*
|
1891
|
+
* Document-method: Curses::Window.move_relative
|
1892
|
+
* call-seq: move_relative(x,y)
|
1893
|
+
*
|
1894
|
+
* Moves the derived or subwindow inside its parent window. The screen-relative
|
1895
|
+
* parameters of the window are not changed.
|
1896
|
+
*/
|
1897
|
+
static VALUE
|
1898
|
+
window_move_relative(VALUE obj, VALUE y, VALUE x)
|
1899
|
+
{
|
1900
|
+
struct windata *winp;
|
1901
|
+
|
1902
|
+
GetWINDOW(obj, winp);
|
1903
|
+
mvderwin(winp->window, NUM2INT(y), NUM2INT(x));
|
1904
|
+
|
1905
|
+
return Qnil;
|
1906
|
+
}
|
1907
|
+
#else
|
1908
|
+
#define window_move_relative rb_f_notimplement
|
1909
|
+
#endif
|
1910
|
+
|
1857
1911
|
/*
|
1858
1912
|
* Document-method: Curses::Window.setpos
|
1859
1913
|
* call-seq: setpos(y, x)
|
@@ -3311,6 +3365,7 @@ Init_curses(void)
|
|
3311
3365
|
rb_define_alloc_func(cWindow, window_s_allocate);
|
3312
3366
|
rb_define_method(cWindow, "initialize", window_initialize, 4);
|
3313
3367
|
rb_define_method(cWindow, "subwin", window_subwin, 4);
|
3368
|
+
rb_define_method(cWindow, "derwin", window_derwin, 4);
|
3314
3369
|
rb_define_method(cWindow, "close", window_close, 0);
|
3315
3370
|
rb_define_method(cWindow, "clear", window_clear, 0);
|
3316
3371
|
rb_define_method(cWindow, "erase", window_erase, 0);
|
@@ -3325,6 +3380,7 @@ Init_curses(void)
|
|
3325
3380
|
rb_define_method(cWindow, "line_touched?", window_line_touched, 1);
|
3326
3381
|
rb_define_method(cWindow, "box", window_box, -1);
|
3327
3382
|
rb_define_method(cWindow, "move", window_move, 2);
|
3383
|
+
rb_define_method(cWindow, "move_relative", window_move_relative, 2);
|
3328
3384
|
rb_define_method(cWindow, "setpos", window_setpos, 2);
|
3329
3385
|
#if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET)
|
3330
3386
|
rb_define_method(cWindow, "color_set", window_color_set, 1);
|
data/ext/curses/extconf.rb
CHANGED
@@ -59,7 +59,7 @@ if header_library
|
|
59
59
|
getbkgd getnstr init isendwin keyname keypad resizeterm
|
60
60
|
scrl set setscrreg ungetch addnwstr
|
61
61
|
wattroff wattron wattrset wbkgd wbkgdset wdeleteln wgetnstr
|
62
|
-
wresize wscrl wsetscrreg werase redrawwin waddnwstr
|
62
|
+
wresize wscrl wsetscrreg werase redrawwin waddnwstr mvderwin derwin
|
63
63
|
touchwin untouchwin wtouchln is_linetouched is_wintouched
|
64
64
|
def_prog_mode reset_prog_mode timeout wtimeout nodelay
|
65
65
|
init_color wcolor_set use_default_colors assume_default_colors
|
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.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
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:
|
12
|
+
date: 2018-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -103,11 +103,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.6
|
106
|
+
rubygems_version: 2.7.6
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: A Ruby binding for curses, ncurses, and PDCurses. curses is an extension
|
110
110
|
library for text UI applications. Formerly part of the Ruby standard library, [curses
|
111
111
|
was removed and placed in this gem][1] with the release of Ruby 2.1.0. (see [ruby/ruby@9c5b2fd][2])
|
112
112
|
test_files: []
|
113
|
-
has_rdoc:
|