Commit Graph

4015 Commits

Author SHA1 Message Date
nick black
54b44513c4
Wide EGC tweaks
Don't bias the nccell width by 1, or 0-length EGCs become
255 columns. We weren't actually using the width to drive
much anything until now, so this wasn't a problem, but it
is exposed as an error once we got rid of CELL_WIDE_ASIAN
and start looping through the actual egc column width.
Closes #1278, closes #1277
2021-01-03 17:42:28 -05:00
nick black
5636a146e4
Wide unit test: rewrite without CELL_WIDEASIAN_MASK #1277 2021-01-03 14:55:58 -05:00
nick black
e6cf1d3844
postpaint: value-result to postpaint_cell for x
postpaint_cell sometimes needs to skip over the following
cells, due to a multicolumn EGC. postpaint() was only
passing x as a value parameter, though, and thus any
changes made weren't escaping out to postpaint(). replace
it with a value-result parameter. might fix #1276.
2021-01-03 14:49:35 -05:00
nick black
320ed68b30
drone: ctest -V 2021-01-03 14:12:34 -05:00
nick black
ab846f9ac8
ncneofetch improvements
* Use NCBLIT_DEFAULT rather than explicit 2x2, so that we use
  NCBLIT_3x2 on terminals which support it.
* Use NCSCALE_SCALE_HIRES rather than NCSCALE_SCALE.
* Support LOGO in /etc/os-release, with or without quotes.

Closes #1246.
2021-01-03 13:52:00 -05:00
joseLuís
5eb8ac0be4 rust: improve documentation 2021-01-03 16:26:26 +01:00
nick black
4427713f0f
ncdirect: drop signals in ncdirect_stop_minimal 2021-01-03 02:52:30 -05:00
nick black
21f6b5fc8a
notcurses.3: talk about piles, update threading section #1264 2021-01-03 02:48:12 -05:00
nick black
6d6416064e
ncdirect: set up fatal signal handlers #1271 2021-01-03 02:36:58 -05:00
nick black
3a658dad3e
drone: update to new ubuntu builder 2021-01-03 01:45:14 -05:00
nick black
9245fda17f
genericize setup_signals() for ncdirect #1271 2021-01-03 01:31:22 -05:00
nick black
998cf02f34
add NCDIRECT_NO_QUIT_SIGHANDLERS #1271 2021-01-02 23:18:28 -05:00
nick black
8b0de2aa1b
introduce ncwidth() to handle sextants on pre-U13 libcs #1274 2021-01-02 22:06:28 -05:00
nick black
4a57436bb8
ncdirect_putstr: handle palette-indexed color 2021-01-02 21:24:37 -05:00
nick black
555a3262b1
add channel_palindex and friends 2021-01-02 21:23:38 -05:00
nick black
a991e0f624
ncdirect_putstr(): fix up foreground default #1269 2021-01-02 21:15:16 -05:00
nick black
478d7cb514
update channels in ncdirect palindex #1275 2021-01-02 21:11:21 -05:00
joseLuís
797ef4b0ae rust: more changes and improvements
- raw field of new wrapping structs is now public just to the crate.
- NcNotcurses.stdplane method now doesn't return an NcResult since it can't fail.
- rename NcNotcurses to Notcurses and NcNotcursesOptions to NotcursesOptions.
- rename NcPlane::new_termsize constructor to with_termsize.
- bump MSV to 1.48 for the doc links.
- improve lib documentation.
- minor fixes.
2021-01-03 02:40:41 +01:00
nick black
9dcbda54ef
postpaint_cell()/ncplane_putc(): handle EGCs of more than 2 columns #1273 2021-01-02 20:01:22 -05:00
nick black
8285b131c6
cell_duplicate_far: drop obsolete FIXME 2021-01-02 18:01:17 -05:00
nick black
e5fd6a832a
back out running postpaint_cell() #1272 2021-01-02 17:07:29 -05:00
joseLuís
bad3449205 rust: rename Notcurses to FullMode; update doc 2021-01-02 22:58:35 +01:00
joseLuís
f5f9397f7b rust: add new wrapper type over NcDirect called DirectMode. 2021-01-02 22:50:48 +01:00
nick black
32bacf19e5
drone: use new unstable builder 2021-01-02 16:05:38 -05:00
nick black
9021526f45
ncneofetch: always call notcurses_stop #1246 2021-01-02 14:23:33 -05:00
joseLuís
6b2805937d rust: add new wrapper type over notcurses struct.
Create new wrapping types that can safely encapsulate the mutable references,
and implement Drop and automatic (de)referencing.

- Notcurses
  - rename Notcurses* to NcNotcurses*.
  - rename NotcursesOptions to NcNotcursesOptions.
  - new Notcurses struct.
    - implement Drop, AsRef, AsMut, Deref & DerefMut.
    - override stop method to be no-op.
    - reimplement constructors and associated methods.
  - remove without_altscreen_with_banners constructor.
- update examples and tests.
- rustfmt.
2021-01-02 19:45:15 +01:00
nick black
af07822d35 Document base cell better
Improve the documentation for ncplane_set_base_cell() and
ncplane_set_base(). Go by render.c's authority (all three
channels are independently checked for transparency, and
replaced with the base cell if so--egc, fg, and bg). Add a
BASE CELL section to notcurses_plane.3. Check for, and reject,
an nccell which is secondary among a multicolumn EGC.

Closes #1238.
2021-01-02 13:28:15 -05:00
nick black
cc49c715a6
ffmpeg: averr is a raw int 2021-01-02 01:56:42 -05:00
nick black
bc4fe21ed1
get smxx/rmxx from terminfo 2021-01-02 01:56:41 -05:00
joseLuís
9323f17d92 rust: keep improving errors & fix some return types
- add more string messages to error! macro invocations for NcPlane & NcCell methods.
- refactor NcPlane.base() to return the NcCell.
- fix cell_prime & NcCell.prime to accept gcluster as &str, as well as cells_load_box.
- fix several return types (u32 instead of NcDimension for counting).
2021-01-01 21:49:34 +01:00
joseLuís
3bf9f11c80 rust: improve direct-cursor example.
- add `rand` as a dev-dependency.
2021-01-01 21:47:41 +01:00
joseLuís
9156cec58f rust: add handy constructors for NcChannel
- fix direct-cursor example.
2021-01-01 20:56:30 +01:00
joseLuís
500456e2e5 rust: continue working on the poc-menu example.
- change return type of NcMenu.selected to Option.
- change type to &str in ncplane_set_base.
- bonus: update some comments.
2021-01-01 14:17:01 +01:00
joseLuís
1d4653e7c8 rust: rename NcInput's new() to new_empty(); add new() 2021-01-01 13:59:30 +01:00
joseLuís
a29e9f0014 rust: fix ncdirect_getc_blocking(), and corresponding method 2021-01-01 13:06:59 +01:00
nick black
70b74a749b
v2.1.3 2020-12-31 02:57:16 -05:00
nick black
a9ccbc28f9
ncls: support -V/--version #1266 2020-12-31 02:31:28 -05:00
nick black
e37b466eea
notcurses-demo: support 'V' for version out #1266 2020-12-31 02:28:47 -05:00
nick black
4616d60ae9
notcurses-view: support 'V' for version out #1266 2020-12-31 02:28:32 -05:00
nick black
0bcb107ae6
fallin: don't carry cell across planes #1265 2020-12-31 00:50:10 -05:00
nick black
7ab2bddde7
notcurses-tester: no alternate screen 2020-12-31 00:32:47 -05:00
nick black
5c3818b103
notcurses-demo.1: use proper pandoc syntax 2020-12-30 22:42:18 -05:00
nick black
84d6d0fae2
mention notcurses-demo geometry requirements 2020-12-30 22:37:07 -05:00
joseLuís
8c29276c70 rust: improve some comments 2020-12-31 03:56:36 +01:00
nick black
99f04fd7e3
correct title for notcurses_progbar.3 link in index.html 2020-12-30 21:45:12 -05:00
joseLuís
5e7bf86b9c rust: almost complete poc-menu example, still has bugs.
- add NcMenuSection::new_separator() constructor.
- rename constructor method for an empty NcInput to new();
- fix notcurses_getc_blocking() function name and error logic.
- improve comments.
- change type of NCMENU_OPTION_* to u64 (like in C API)
- fix error_str![] macro.
- improve error messages.
2020-12-31 00:11:49 +01:00
joseLuís
31e7305ce8 rust: start improving errors reporting.
- refactor error![] macro, switch place for $msg & $ok parameters.
- add more meaningful NcError return values in several functions related with poc-menu example, for starters.
- the poc-menu example now doesn't randomly fail, IDKW but OK I guess.
- minor unrelated corrections.
2020-12-30 19:11:55 +01:00
joseLuís
8e5e60f588 rust: Continue with poc-menu example.
- add NcPlane.pustr_aligned() method.
- disable notcurses_stddim_yx* functions & methods for now.
- make input argument optional for notcurses_getc_nblocking().
- update full-basics example.
- fix comments.
2020-12-30 18:40:54 +01:00
nick black
e522429dfb
direct: reorder declarations to please freebsd 2020-12-30 10:58:02 -05:00
nick black
f471ab15df
update copyrights for 2021, ho humm 2020-12-30 03:41:58 -05:00