Commit Graph

349 Commits

Author SHA1 Message Date
nick black
6ca8949845 add kittyzapper PoC #1117 2020-12-21 23:01:56 -05:00
nick black
d7fd7fa39e
ncdirect_render_image: save/restore colors #1230 2020-12-18 01:51:21 -05:00
nick black
0fb455f0ee
ncls: don't flush output after each line 2020-12-17 17:28:05 -05:00
Nick Black
1bdd2d0555
Progress bar polishing (#1219)
Progress bars now support four 32-bit channels in ncprogbar_options, and uses them to color a gradient. The redraw procedure has been changed from O(n) to O(1). ASCII progress bars have been repaired. Closes #1213.
2020-12-16 16:48:10 -05:00
nick black
2ff20108c8
force LTR override on UC_BIDI_AL #1204 2020-12-15 03:26:14 -05:00
nick black
ca547bc521
progbar: get vertical progbars working #1209 2020-12-13 10:56:34 -05:00
nick black
827d758c19 properly color progbar #1202 2020-12-13 09:12:08 -05:00
nick black
c3b5069eae progbar PoC: use retrograde #1202 2020-12-13 09:12:08 -05:00
nick black
82ffac8eed remove ncprogbar locking options #1202 2020-12-13 09:12:08 -05:00
nick black
e37540c76e ncprogbar: implement core draw loop #1202 2020-12-13 09:12:08 -05:00
nick black
ff798e69e9 progbar PoC: finish up 2020-12-13 09:12:08 -05:00
nick black
1d74979718 progbar core / poc #1202 2020-12-13 09:12:08 -05:00
nick black
97c2d53abf
notcurses-view: remove unused variable 'gotinput' 2020-12-13 02:55:17 -05:00
nick black
228bd17237
rtl PoC #1204 2020-12-13 02:19:07 -05:00
nick black
a2ab467219
whiteout demo: fix up brace extensions 2020-12-13 02:03:52 -05:00
nick black
a3e7b3b5d0
utf8_egc_len: count all printing glyphs #1174 2020-12-12 06:28:17 -05:00
nick black
f66425b819
wcwidth PoC: print total bytes 2020-12-12 06:23:59 -05:00
nick black
1239ac7a29
mathtext PoC: loop properly 2020-12-10 09:22:26 -05:00
nick black
4cf4a4ce0b
egcpool: fix cell_egc_idx() math #1179 2020-12-06 11:55:45 -05:00
nick black
564fcafee3
fileroller/procroller: use alternate screen 2020-12-06 09:03:13 -05:00
nick black
aeae053214
strange things going on with kitty + zalgo... 2020-12-06 07:02:22 -05:00
nick black
1c188508d4 add a 1x1 run to widestomp PoC 2020-12-05 00:39:37 -05:00
nick black
e5306f6197
widestomp PoC: eliminate color weirdness #1175 2020-12-03 13:09:19 -05:00
nick black
b38d742358
wcwidth PoC: only print (!) for errors 2020-12-03 01:12:13 -05:00
nick black
192c583aad
try forcing LC_CTYPE, C.UTF-8 if not inhibited #1150 2020-11-30 21:44:37 -05:00
Marek Habersack
c063ce4e36 [C++] API sync
Added:

  * Pile: new class derived from Plane, which implements all the
    `ncpile_*` calls
  * Plane: `get_parent` (`ncplane_parent`)
  * Plane: protected constructor for use by `Pile` (or other derived
    classes which cannot provide a valid `ncplane*` when invoking parent
    constructor.
  * Plane: `set_plane` for use by the derived classes above.

Changed:

  * Plane: `to_ncplane` is a `const` method now.
2020-11-27 19:35:22 -05:00
nick black
b7ea4e2359
run sgr-full and sgr-direct in test suite #1138 2020-11-27 15:38:36 -05:00
nick black
f82ad10667
Properly set italics/struck following sgr #1138 2020-11-27 15:29:38 -05:00
nick black
fd804be520
beef up sgr-full a bit #1138 2020-11-27 15:18:59 -05:00
nick black
fbe383415f
drop confusing sgr PoC 2020-11-27 15:12:52 -05:00
nick black
725ecc9267
32-bit fixes for various diagnostics 2020-11-27 14:50:18 -05:00
nick black
f89ca15640 sgr-full PoC: add NCSTYLE_STRUCK #1138 2020-11-25 20:04:14 -05:00
nick black
fe164b6210 add NCSTYLE_STRUCK #1138 2020-11-25 20:04:14 -05:00
nick black
7c249bf9b9
menu PoC: implement quit item 2020-11-24 03:23:32 -05:00
nick black
b6e5b60374 ncpile_create() not NCPLANE_OPTION_NEWPILE #1078 2020-11-23 22:58:05 -05:00
nick black
3ad9a40426 hook up piles #1078 2020-11-23 22:58:05 -05:00
nick black
7ee2d98f82
reel PoC: handle resizes 2020-11-18 08:36:59 -05:00
nick black
eef6df8c0a death to horiz #1115 2020-11-17 23:42:36 -05:00
nick black
0215f9482b selector PoC: ncplane_new -> ncplane_create #1115 2020-11-17 23:42:36 -05:00
nick black
4a5fb14bc1 multiselector PoC: out with ncplane_new #1115 2020-11-17 23:42:36 -05:00
nick black
b7ad4fb7a6 fill tests: use ncplane_create #1115 2020-11-17 23:42:36 -05:00
nick black
e4907855d2
blitter POC: add 3x2 2020-11-11 03:13:46 -05:00
nick black
67e7046956
ncreader: implement Alt+B for back by word #983 2020-11-07 05:30:28 -05:00
nick black
55200b09ad sgr-full: add NCSTYLE_BLINK 2020-10-21 01:58:22 -04:00
nick black
0e294626ab menu poc: let menu handle section shortcuts #1058 2020-10-15 07:46:32 -04:00
nick black
32c029e2d5 ncmenu: support disabled sections #1057 2020-10-15 02:58:03 -04:00
nick black
be2bba7be2 implement ncmenu_item_set_status #1057 2020-10-15 02:58:03 -04:00
nick black
60fb4a2351
selector: use easier languages #1053 2020-10-11 09:51:55 -04:00
nick black
bf28170c61
mark cliptop unused in reel poc 2020-10-07 02:28:58 -04:00
nick black
1eff105cb9
reel poc: print error on redraw fail #1036 2020-10-05 15:39:19 -04:00
nick black
4a9be7fa90
include memory.h where necessary 2020-10-03 18:54:34 -04:00
Marek Habersack
a29bfe9c42 [C++] Deal with widgets grabbing full ownership of Panel
Fixes: https://github.com/dankamongmen/notcurses/issues/1009

Whenever a widget is created with its `*_create` function it currently
claims full ownership of the passed panel, including its destruction.
However, the C++ wrapper around the panel is not aware of this and will
attempt to destroy the native panel in the destructor, leading to
segfaults.

Fix this by introduction of a `Widget` class which contains the logic to
properly modify the `Panel` instance to not double-destroy the native
panel.  The solution is a bit fragile since the `Panel` instance is left
intact (we can't free it for the user) in a state that's safe for the
C++ wrapper, but calling any C function via the wrapper **will** pass a
`NULL` pointer in the panel argument - therefore the C functions MUST be
proofed against this.  The proofing belongs in the C backend code since
this protects also C and other language binding users from such abuse.

The Widget class will first verify that the passed `Plane` instance
hasn't already been "disowned" and will throw an exception to the effect
if it was.  Next, it will proceed to take over ownership of the native
panel instance and mark the passed `Panel` as "invalid" (i.e. not owning
any native panel instance anymore)

The above changes require modification of `Panel` instances and so all
the widget constructors taking `const*` or `const&` have been removed
from widget classes.
2020-10-03 13:19:49 -04:00
nick black
7241e0a5e1
demo tabletfxn: cliptop __attribute__ ((unused)) 2020-10-03 02:43:18 -04:00
nick black
bf40e163c8
reel poc: cap return at true size 2020-09-30 03:43:41 -04:00
nick black
683217ef07 normalize style setters #1034 2020-09-29 13:09:44 -04:00
nick black
8d347d14bb
move ncreel to PoCs, don't install #1033 2020-09-28 07:20:16 -04:00
nick black
36aed3c521 add ncplane_create() + ncplane_options #1020 2020-09-20 05:52:27 -04:00
nick black
a4367fcfb5 rip out ncplane_ creation functions #985 2020-09-18 17:46:57 -04:00
nick black
b7a57eaab7 convert all channel rgb calls #985 2020-09-18 01:39:21 -04:00
nick black
25a192c7ba
ncpp_build: disable Plot stuff for now #1009 2020-09-13 15:17:07 -04:00
nick black
c3e5e47a2a
ncreader: conform to the New Way #627 2020-09-13 13:53:11 -04:00
nick black
4f04f1bc31 remove bgchannels field from selector_options #627 2020-09-13 13:22:58 -04:00
nick black
306948507f ncmultiselect: normalize per new widget API #627 #1006 2020-09-13 13:22:58 -04:00
nick black
8839d44454 selector: transfer ownership of ncplane #1006 #627 2020-09-13 13:22:58 -04:00
nick black
784b0a4e2a reader poc: use ncreader's native cursor control #962 2020-09-06 23:10:16 -04:00
nick black
e4326c8fe6 direct PoC: always call ncdirect_stop() 2020-09-06 17:12:31 -04:00
nick black
2f28420034 rename ncplane_putsimple() -> ncplane_putchar() #912 2020-08-31 21:14:29 -04:00
nick black
4c7a1d0427 ncdirect_init: add flags parameter #976 2020-08-30 13:38:33 -04:00
nick black
9ae58194e6 handle_getc(): properly seed ncinput #972 2020-08-30 11:31:45 -04:00
nick black
f64ea58e6c kill stdin buffering #972 2020-08-30 11:31:45 -04:00
nick black
825370e6c9
direct-input: convert to utf8 for display 2020-08-30 04:43:55 -04:00
nick black
d5a4cd2349
add notcurses-direct-pydemo 2020-08-30 03:06:06 -04:00
nick black
b36435bed4
run through with a single glyph 2020-08-30 00:50:20 -04:00
nick black
eb0030bad3
flesh out sgr-full PoC 2020-08-29 18:46:24 -04:00
nick black
201994ab0c
ncdirect: don't make infd nonblocking #919 2020-08-26 23:49:02 -04:00
nick black
9476cb33d5 ncdirect: set up input layer #919 2020-08-26 23:12:59 -04:00
nick black
8595c21495
dirgb poc: use fflush, not printf("\n") 2020-08-26 23:08:43 -04:00
nick black
1a21d193c4
ncreader: kill diagnostics #839 2020-08-25 18:20:14 -04:00
nick black
9b1ae7d970
ncreader: bring cursor back following putegc #839 2020-08-25 18:17:20 -04:00
nick black
9d75f575db
ncplane_set_[fb]channels 2020-08-25 17:28:29 -04:00
nick black
70a28feb63
ncreader: horizontal scrolling mostly works #839 2020-08-25 08:58:49 -04:00
nick black
afc06a0271
reader PoC: accept -hs for horizontal scrolling #839 2020-08-25 08:58:49 -04:00
nick black
7cbb2e9110 zoo demo: show cursor in reader box #835 2020-08-25 06:29:03 -04:00
nick black
a53d5a21a8 disable/enable cursor for rasterize 2020-08-25 04:55:06 -04:00
nick black
cab19cf790 Cursor work (placement, drop RETAIN_CURSOR) #953
notcurses_enable_cursor() now accepts placement arguments.
both it and notcurses_disable_cursor() now return int rather
than void. add notcurses_cursor_move_yx().
2020-08-25 03:11:50 -04:00
nick black
4dd1d6a4c8 Annihilate nc_err_e and all infrastructure #948 2020-08-24 17:20:29 -04:00
nick black
c64f42b717 add sgr-full PoC 2020-08-22 12:51:32 -04:00
nick black
bdea9bc9c8
gradient PoC: sleep between flip #921 2020-08-20 22:35:31 -04:00
nick black
4745c3596d
gradients PoC: add lower block for completeness #921 2020-08-19 12:45:26 -04:00
nick black
086571ff4b
gradients: purge improper cut-and-pasted comment 2020-08-19 12:39:29 -04:00
nick black
1e334fa63e
new 'gradients' PoC #920 2020-08-19 12:33:47 -04:00
nick black
90e98ada07
wcwidth PoC: accept command line args 2020-08-18 04:16:30 -04:00
nick black
26ea0b3785
dirgb PoC: throw in some italics 2020-08-16 17:56:55 -04:00
nick black
807af53fbb sgr/sgr-direct: knock out compiler warnings 2020-08-15 17:38:20 -04:00
nick black
b980d7deee
sgr-direct PoC 2020-08-14 15:55:27 -04:00
nick black
b315c31141
ncdirect: fix style transitions #890 2020-08-14 08:32:27 -04:00
nick black
7d1e4fae54
plug memory leak in PoC direct 2020-08-12 03:03:10 -04:00
nick black
d5eca34cd5
plug memory leak in PoC selector 2020-08-12 03:00:19 -04:00
nick black
2f3fba59c8
revert early-morning idiocy #866 2020-08-08 10:30:57 -04:00
nick black
4232ca1427
blitters PoC: hoist ncv creation from main loop #866 2020-08-08 10:28:38 -04:00