Commit Graph

16 Commits (47fa86f90d85296e8dd51d8ba10618a8f8efa36d)

Author SHA1 Message Date
joseLuís 06b0b2360a [rust] fix poc-menu example 3 years ago
joseLuís 3e9b2c1fe4 [rust] rename `NcChannelPair` to `NcChannels`
- deprecate `NcChannelPair`
3 years ago
joseLuís 48876b42fb [rust] rename several constructor methods
For semantic consistency with the Rust API guidelines.

- rename most `NcChannel` & `NcCell` methods starting with `with_`* to `from_`*.
- update examples.
3 years ago
joseLuís bcd09be7d3 [rust] deprecate `Notcurses` use and rename it to `Nc`.
In order to be consistent with the rest of the naming scheme, and in order to avoid conflicts with the higher level rust wrappers, which will be using `Notcurses` for the wrapper struct from now on.

- also deprecate `NotcursesOptions` and rename it to `NcOptions`.
- update examples, docs and readme.
3 years ago
joseLuís 129e208438 [rust] refactor Notcurses & NcDirect wrapping approach
- remove `Nc` & `NcD` wrappers, to move them to notcurses-rs library.
- update the summary header format for Notcurses and NcDirect
- update docs and examples
3 years ago
joseLuís eaee89c99f [rust] renamed FullMode & DirectMode to Nc & NcD
- improve pixel-cell example.
- rustfmt
3 years ago
joseLuís ae2af14281 rust: new methods, refactor methods and planes example
- add NcChannelPair constructors.
- change some NcChannel methods to return Self: set(), set_alpha()
- add NcPlane methods move_rel() & resize_simple_rel().
- add example full-planes (WIP).
- remove proto-example full-basics.
- small update of poc-menu example.
3 years ago
joseLuís aa9bf7a0e7 rust: add ncplane_abs_yx, ncplane_abs_y, ncplane_abs_x
- minor updates
3 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 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 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 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 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 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