Commit Graph

3891 Commits (b6c84cfce2b1251fc795c1807d9e5943b5cce2da)
 

Author SHA1 Message Date
joseLuís b6c84cfce2 rust: more 2.1.2 catch-ups
- deprecate old ncdirect_style_* functions.
- add `NCSCALE_*_HIRES` constants.
- BONUS: update ncdirect_raster_frame, removed parameters.
4 years ago
nick black 58bc9bd3bc
fix up writeout stats, report in shutdown banner 4 years ago
nick black 0e8faed3f5
ncneofetch: check LOGO field in /etc/os-release #1246 4 years ago
nick black 638dde7657
remove unnecessary args from ncdirect_raster_frame() #1248 4 years ago
nick black 1d8fcbb5e4
ncdirect: styles{set, on, off} -> _styles #1247 4 years ago
nick black 66349ecbd0
progress bar unit tests: skip non-utf8 4 years ago
nick black 1c4d942cfc DualCell{Left, Right} unit tests #1258 4 years ago
nick black f608df2af8 progbar PoC: call through on 1 #1258 4 years ago
nick black 8824495924 uniblock demo: properly set progress 4 years ago
nick black f729d855f9 complete SingleCellDown/SingleCellUp tests #1258 4 years ago
nick black cd8dd4232c Progress bar unit test SingleCellUp #1258 4 years ago
nick black b0c6f697e0
yield: render in pfill loop so we never look locked up 4 years ago
nick black 68f5ea711e
demo: move HUD over by 2, don't block legend 4 years ago
nick black 0ef4c63e17
remove redundant OTHER template #1251 4 years ago
nick black dad7a02b25
add test file for progressbars #1258 4 years ago
nick black f22ddfa72f
progbar: don't overrun on 1.0 #1257 4 years ago
joseLuís 5d90e7de15 rust: update more NcPlane methods' return type to NcResult.
- rustfmt, comments…
4 years ago
joseLuís b6fcd2783d tools: update funtion-summary.sh & generated data 4 years ago
joseLuís 9dda358364 rust: make modifications to match v2.1.2
- add new ffi::functions: ncplane_resize_maximize, notcurses_cansextant,
- substitute rust reimplementions of ncplane_at_cursor_cell & ncplane_at_yx_cell by ffi ones.
- substitute ncvisual_default_blitter by ncvisual_defblitter.
- rename cell style functions
4 years ago
joseLuís 55d49a43f6 rust: continue NcMenu PoC example; fixes
- modify ncmenu constructor Accept &mut[] instead of Vec<> to avoid FFI related problems. Furthermore, from rust 1.48 it's easy to convert a Vec into an array using the std::convert::TryInto trait.
- fix ncmenu method names.
- fix & refactor Notcurses contructors; add `with_debug` constructor.
- make NcPlane.set_base receive a char instead of a reference, since it's copy.
- add `rre` cargo alias for running examples on release.
4 years ago
joseLuís a880eaf018 rust: new NcMenu PoC example & more error refactoring.
- new example poc-menu (WIP).
- improve constructors for NcMenu*.
- divide NcMenu* methods into submodules.
- fix return type for NcPlane constructors.
- use NcResult on functions returning references.
- fix a couple of Notcurses methods.
- add more NcChannelPair methods.
- refactor NcInput constructors.
- rename error_ptr![] to error_ref_mut![]
- new macro cstring_mut![].
- new error_ref![] macro.
- update examples & tests.
- bump version in readme.
4 years ago
nick black 55d563b646
v2.1.2 4 years ago
joseLuís 2762e9e561 rust: refactor errors for NcPlane & NcReader.
- add ncplane_new_bound_test helper function.
- update examples & tests as needed.
- rustfmt & minor fixes.
4 years ago
joseLuís e966348321 rust: add NcMenu methods & fix error_ptr macro 4 years ago
joseLuís e75432fcf2 rust: deprecate ncvisual_default_blitter 4 years ago
joseLuís 05d5c36622 rust: remove integration tests
- they really are unit tests.
- move version test to its right place.
- BONUS: add rstring![] macro.
4 years ago
nick black c9fb385ebe fold out test breakage #1250 4 years ago
nick black 91e932ed26 ncvisual_render: handle NCSCALE_NONE_HIRES #1250 4 years ago
nick black 56d94e9392 intro: add a bar on top to match bottom 4 years ago
nick black 15664b9799 ncdirect: handle new scalings #1250 4 years ago
nick black dd1cdc40d5 add NCSCALE_NONE_HIRES, NCSCALE_SCALE_HIRES #1250 4 years ago
joseLuís fbe4352233 rust: refactor sleep macros
- receive a variable number of arguments.
- make rsleep use methods and deal with NcResult.
- new fsleep to flush an NcDirect context.
- fix macro usages in examples.
4 years ago
joseLuís 763f3efdc5 rust: continue refactoring the error system.
- deal with null()|null_mut() being returned from
  functions, previously ignored.
- new macros: error_ptr & error_str to deal with
  functions returning *mut T & *const c_char into
  NcResult<&mut T> or NcResult<String>, respectively.
4 years ago
Nick Black 770a8a4392 Update issue templates
@joseluis wanted an "other" with a blank template.
4 years ago
nick black a4bad2318f
dragon: don't force 3x2 4 years ago
nick black 3f26c36458
direct: honor transparency in image blitting #1252 4 years ago
nick black 9268109778
update man pages for ncvisual_media_defblitter() #1114 4 years ago
nick black 1fa4580a3e
throw some D's on that bitch #1114
If the TERM string contains either of "kitty", "vte", or
"gnome", enable sextants. Fuck it, we'll do it live!
4 years ago
joseLuís bef4f534e9 rust: fix missing imports 4 years ago
nick black 4d8efcab82
Progress towards NCBLIT_3x2 by default
Add a new member 'sextants' to the terminfo cache (both
notcurses and ncvisual contain one of these, and both
initialize it the same way -- interrogate_terminfo()).
Add a new function, 'notcurses_media_defblitter()', and
deprecate 'ncvisual_default_blitter()' (the latter didn't
receive enough information to return NCBLIT_3x2). Update
all callers. Add new *internal* function rgba_default_blitter(),
so this logic can be freely changed in the future. If
sextants are available, and we're scaling, return NCBLIT_3x2.
Once we detect sextant availability, we'll have sexblitter
as a default -- stay tuned! #1114
4 years ago
joseLuís 36e81a573a rust: finish NcDirect & Notcurses methods.
- add missing NcDirect methods: raster_frame & render_frame.
- finish refactoring Notcurses methods.
  - turn more Option returns into NcResult.
4 years ago
joseLuís 6049e07d27 rust: continue refactoring the error system.
- made const NotcursesOptions constructors.
- refactor Notcurses constructors to return NcResult.
- pass NotcursesOptions by value, since it's Copy.
- update tests.
- add helper modules for Notcurses & NcPlane.
  - new initialization functions to be used in tests.
- BONUS:
  - refactor NcDirect
  - update examples.
4 years ago
nick black b8c33a6caf
ncplane_highgradient: use direct blitting #1249 4 years ago
joseLuís b12abeddc9 rust: finish NcDirect error system refactor
- change Option return type for NcResult when appropriate.
- make NcDirect constructors return NcResult.
- rename NcError::new() to with_msg() and simplify new().
- refactor examples:
  - rename direct-image.rs to direct-image-c.rs
  - recreate using rust methods, as direct-image-rust.rs
  - differentiate more throughly between both styles.
  - remove the sys namespace on both examples.
4 years ago
nick black 4e5dbfd2b9
render: use hpa in place of cuf #1245 4 years ago
nick black 1002347c9e
HACKING: document right-to-left shittery 4 years ago
joseLuís 1687af89e0 rust: refactor error system.
We need to use Result<> to manage error flow,
at least on the methods API. This way it will
finally feel idiomatic Rust and more concise.
Also, we can't return a non Result from main.

- rename NcResult to NcIntResult.
- new NcError & NcResult types.
- new error![] macro to reduce boilerplate.
- change return type of NcDirect methods to NcResult.
  - refactor several examples to return NcResult:
    direct-cursor, poc-direct & poc-kittyzapper.
- BONUS: fix test not stopping notcurses context.
- update lib doc-comment.
- fix typo in readme.
4 years ago
joseLuís 5d1dfe1d02 rust fix poc-direct; update readme deps badge 4 years ago
joseLuís ab2675b358 rust: add poc-direct example
- fix NcDirect dim_[y|x] methods.
- add NcDirect.dim_yx() method.
4 years ago
joseLuís a9413eafb2 rust: add poc-kittyzapper example
- fix ncdirect_[b|f]g_rgb8 functions.
- fix NcDirect.bg_rgb8 method.
- new printf![] macro.
4 years ago