Commit Graph

358 Commits (c6c137d68891c356477a2a6519af0943af72abea)

Author SHA1 Message Date
nick black 3cdf7160de
v2.2.0 3 years ago
nick black 54ca2249df
v2.1.8 3 years ago
nick black 46f17f4794
add LICENSE to rust/ 3 years ago
nick black 68776b24e8 Add José to Cargo.toml, copy LICENSE #1163 3 years ago
nick black 6c48c82171 rust: CELL_NOBACKGROUND_MASK oughtn't be exported 3 years ago
nick black 121f10a9c5
v2.1.7 4 years ago
nick black 57271d09ce
v2.1.6 4 years ago
nick black 3ecdde74d0
v2.1.5 4 years ago
joseLuís da5f86cc8f rust: rename NcDimension to NcDim; rustfmt 4 years ago
joseLuís 1622375d41 rust: add NCDIRECT_OPTION_NO_QUIT_SIGHANDLERS 4 years ago
joseLuís 1218e8fb7f rust: refactor module header summary info
- refactor headers for Notcurses & NcDirect modules.
4 years ago
joseLuís 6938188b19 rust: NcCell updates
- update NcCell documentation according to last release.
- implement NcCell.load method.
- bonus: remove old "width bias" info from the python bindings.
- bonus: add some (commented out) profile settings to Cargo.toml.
4 years ago
nick black e617acecc7
v2.1.4 4 years ago
José Luis Cruz 1c12b73a80 remove warning 4 years ago
nick black 69e54bf9e3 rust: drop more wideasian 4 years ago
nick black a229d64703 purge some wideasian cruft from rust wrappers 4 years ago
joseLuís 5eb8ac0be4 rust: improve documentation 4 years ago
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.
4 years ago
joseLuís bad3449205 rust: rename Notcurses to FullMode; update doc 4 years ago
joseLuís f5f9397f7b rust: add new wrapper type over NcDirect called DirectMode. 4 years ago
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.
4 years ago
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).
4 years ago
joseLuís 3bf9f11c80 rust: improve direct-cursor example.
- add `rand` as a dev-dependency.
4 years ago
joseLuís 9156cec58f rust: add handy constructors for NcChannel
- fix direct-cursor example.
4 years ago
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.
4 years ago
joseLuís 1d4653e7c8 rust: rename NcInput's new() to new_empty(); add new() 4 years ago
joseLuís a29e9f0014 rust: fix ncdirect_getc_blocking(), and corresponding method 4 years ago
nick black 70b74a749b
v2.1.3 4 years ago
joseLuís 8c29276c70 rust: improve some comments 4 years ago
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.
4 years ago
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.
4 years ago
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.
4 years ago
joseLuís 624bee6d71 rust: add most NcCell methods
- add & fix comments.
- add methods links.
4 years ago
joseLuís 7b4c105fdf rust: finish updating rust for ncdirect changes
- update function and method names.
- update intra-doc links.
- update examples.
4 years ago
nick black a7b131a11c
update rust for ncdirect changes 4 years ago
joseLuís ff2a22a9a9 rust: Finish adding NcChannel* methods.
- make channels_set[f|b]g_rgb() functions (and corresponding methods) return the NcChannelPair, taking advantage of the fact that those functions can't fail in Rust.
- documentation fixes.
- fix NCSCALE definition typo.
4 years ago
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
joseLuís 5d90e7de15 rust: update more NcPlane methods' return type to NcResult.
- rustfmt, comments…
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
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
joseLuís bef4f534e9 rust: fix missing imports 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