Commit Graph

235 Commits (dd1e7f3b7ed50786ec2a75ddfb5f96c6ac87750f)

Author SHA1 Message Date
joseLuís e23cd63aac rust: improve comments
- use new syntax for doclinks
- improve some comments
- add README
4 years ago
nick black 7fa89b45da rust: unfuck ncaligns #1115 4 years ago
nick black 9ce821a045 [headscratch] 4 years ago
nick black ee019b2d5a rust: clear all mention of ncplane->horiz #1115 4 years ago
nick black bc245e09fc rust: drop ncplane_options__bindgen_ty_1 4 years ago
joseLuís 4de2652f8d rust: more fixes and improvements
- fix notcurses_init unit test
- fix fn call name: `nplane_at_cursor_cell` → `ncplane_at_cursor_cell`.
- make LIBC_FILE & NC_FILE type aliases with doc comment.
- add lib module comment.
- improve direct-cursor example.
- fix full-text example and rename it to full-basics.
4 years ago
joseLuís 9fe0363937 rust: improve testing
- add new alias `t_all` for running every test even if some fail.
- call it from `.drone.yml` to have more complete testing picture.
- add a new test for `notcurses_init` as the first test.
4 years ago
joseLuís 1f77571174 rust: cleanup
- remove deprecated functions ncplane_new & nctablet_ncplane
- fix some comments
- run rustfmt
4 years ago
joseLuís 9563c9e02e rust: new NcFile type to wrap libc::FILE
The notcurses FILE type (`NC_FILE`) is imported via bindgen as a struct,
while the equivalent Rust libc::FILE (`LIBC_FILE`) is an opaque enum.
Several methods are provided to convert back and forth between both types,
so it works both with rust libc operations and notcurses file I/O operations.

- new notcurses_debug() test as the first usage of `NcFile`
4 years ago
joseLuís 107cb05fce rust: refactor examples 4 years ago
joseLuís 2e47618a6a rust: 2+ notcurses convenience constructors 4 years ago
joseLuís 08b000de28 rust: remove no_std; fix #1119 4 years ago
joseLuís d9a74dab26 rust: start adding notcurses tests 4 years ago
joseLuís 00f5001342 rust: ncplane constructors
- new NcPlane & NcPlaneOptions constructors.
- new NcHoriz enum for NcPlaneOptions horiz parameter.
- Make NCPLANE_OPTION_HORALIGNED u64 for consistency with expected value type.
4 years ago
nick black 259b2b6012
make it clear that sixel is not yet supported 4 years ago
nick black 7622cefc3a
v2.0.4 4 years ago
joseLuís 04882971a2 rust: more refactoring
- make Notcurses `new()` constructor not output banners.
- add an additional constructor `with_banners()`.
- add new aliases for running examples silently.
- improve comments & run rustfmt.
4 years ago
nick black 0d31a03be9
v2.0.3 4 years ago
joseLuís 7a164c3009 rust: continue reworking the API & improve documentation
- remove macros module and move macros to types submodules.
- document the macros.
- add ncmetric macros.
- add missing constants for NcVisual and ncmetric.
- add missing function ncstrwidth
- remove types/colors module and move the content to types/channel
- add more doc comments.
4 years ago
joseLuís f22dfd78b5 rust: continue reworking the API & improve documentation
- separate the `types` module into submodules to improve clarity & maintenance.
- more constructors for NcMenu, NcMenuItem, NcMenuSection, NcMenuOptions.
- add more missing docs, specially for constants
4 years ago
joseLuís 08a0da358e rust: continue reworking the API & improve documentation
- remove _IO_FILE import and usage.
- create handy constructors for NcDirect & Notcurses.
  (but can't implement destructors for copy types…).
- when possible substitute mutable pointers `*mut` for mutable references `&mut`
  with associated lifetimes.
- new widgets module, starting with NcReader & NcReaderOptions constructors
4 years ago
joseLuís 965a0771d8 rust: continue reworking the API & improve documentation
- rename `Pixel` to `NcPixel`
- rename `cell_simple_initializer` to `cell_char_initializer`
  and `cell_load_simple` to `cell_load_char`
- create constructor for `NcReader`
- fix and improve documentation for several types.
- Add `NcDirectOptions` struct and `NcDirectOptionHoriz` union
4 years ago
joseLuís 4673a86ea2 rust: API refactor & improve documentation
- rename EGC to Egc, EGCBackstop to EgcBackstop and ChannelPair to Channels.
- make the original type aliased structs non-public (e.g. ncdirect, ncalign…)
- fix and improve documentation for several types.
- revert renaming crate to nc on use.
- directly import the used types at the beginning of the module.

Now the rustdoc generated documentation is much cleaner.
4 years ago
joseLuís d82f0934b3 rust: show inline documentation for curated bindings 4 years ago
joseLuís 27628e961a rust: improve bindings 4 years ago
joseLuís a40cabb9d0 rust: move integration tests out of lib.rs 4 years ago
joseLuís c8316d75ae rust: continue improving bindings and API
- use libc types and functions directly when possible
	- char32_t -> u32 -> char
	- size_t -> u64
	- free()
	- strcmp()
	NOTE: it seems libc::timespec doesn't work with notcurses_getc()
- rename types
  	- Input -> NcInput
	- Scale -> NcScale
- `suppuabize` function is now private.
- `bindings` module is now public.
- improve comments.
4 years ago
joseLuís 98a2fcf336 rust: explicit bindgen imports for a better world 4 years ago
joseLuís 4beec0845f rust: type changes
- rename types in order to make them more similar to the original ones,
  and so that they play better alongside the higher types defined by
  notcurses-rs.
  	- Plane -> NcPlane
	- DirectMode -> NcDirect
	- DirectModeFlags -> NcDirectFlags
	- FullMode -> Notcurses
	- Align -> NcAlign
	- Blitter -> NcBlitter
	- Scale -> NcScale
- make `types` module re-exportable.
- rename nc module to notcurses.
- improve comments.
4 years ago
joseLuís d59d05990b rust: direct mode changes
- rename ncdirect_start to ncdirect_new
- add direct mode option flags
- fix examples
- refactor comments
4 years ago
joseLuís 94827c12a2 rust: update dependencies 4 years ago
joseLuís fed2d7cb9b rust: fix comments 4 years ago
joseLuís e8ff092f50 rust: fix input; add constructor 4 years ago
joseLuís 2f3d99e4e7 rust: fix visual 4 years ago
joseLuís cfb2bf0824 rust: add input module with 1 static function 4 years ago
joseLuís 09bdf6ebd4 rust: add visual module 4 years ago
joseLuís cb16c52eef rust: review functions; update headers 4 years ago
joseLuís 40621b7b95 rust: finish converting missing rgb calls 4 years ago
joseLuís 42250179f3 rust: add `Blitter` and `Scale` types 4 years ago
nick black 8189d21709
v2.0.2 4 years ago
nick black a4546c86e3
v2.0.1 4 years ago
nick black 65974aeb0b
v2.0.0 4 years ago
nick black 8c9611d085
v1.7.6 4 years ago
nick black c6c157a5ad
notcurses_stats_alloc() everywhere 4 years ago
nick black 20a49d053d
v1.7.5 4 years ago
joseLuís bcc5481899 rust: update example
- use ncdirect_flush function for flushing
4 years ago
joseLuís 5be9edd6f4 rust: convert all rgb calls & new plane functions #1024
- add (TBD) ncplane_putchar, ncplane_putchar_yx
- delete ncplane_bound, ncplane_new, ncplane_pusimple & ncplane_putsimple_yx
- rename `.*_[bf]g.*_rgb` → .`*_[bf]g.*_rgb8`
- rename `.*_[bf]g` → .`*_[bf]g.*_rgb`
4 years ago
joseLuís a09ed747ca rust: update example direct-cursor 4 years ago
nick black f02263e977
v1.7.4 4 years ago
nick black 21b8a50da0
rust: s/NCCHANNEL_ALPHA_MASK/CHANNEL_ALPHA_MASK/g 4 years ago