Commit Graph

279 Commits

Author SHA1 Message Date
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.
2020-11-18 01:48:54 +01:00
joseLuís
1f77571174 rust: cleanup
- remove deprecated functions ncplane_new & nctablet_ncplane
- fix some comments
- run rustfmt
2020-11-17 11:40:58 +01:00
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`
2020-11-17 01:44:29 +01:00
joseLuís
107cb05fce rust: refactor examples 2020-11-16 23:53:07 +01:00
joseLuís
2e47618a6a rust: 2+ notcurses convenience constructors 2020-11-16 18:06:15 +01:00
joseLuís
08b000de28 rust: remove no_std; fix #1119 2020-11-15 22:43:22 +01:00
joseLuís
d9a74dab26 rust: start adding notcurses tests 2020-11-15 18:04:53 +01:00
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.
2020-11-15 17:49:12 +01:00
nick black
259b2b6012
make it clear that sixel is not yet supported 2020-11-11 03:12:37 -05:00
nick black
7622cefc3a
v2.0.4 2020-11-10 10:50:30 -05:00
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.
2020-11-09 19:59:39 +01:00
nick black
0d31a03be9
v2.0.3 2020-11-09 13:45:59 -05:00
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.
2020-11-09 19:13:13 +01:00
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
2020-11-09 16:01:48 +01:00
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
2020-11-08 18:35:35 +01:00
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
2020-11-08 14:00:09 +01:00
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.
2020-11-07 18:34:42 +01:00
joseLuís
d82f0934b3 rust: show inline documentation for curated bindings 2020-11-06 14:56:31 +01:00
joseLuís
27628e961a rust: improve bindings 2020-11-06 13:59:32 +01:00
joseLuís
a40cabb9d0 rust: move integration tests out of lib.rs 2020-11-06 13:57:29 +01:00
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.
2020-11-06 13:40:52 +01:00
joseLuís
98a2fcf336 rust: explicit bindgen imports for a better world 2020-11-05 20:50:05 +01:00
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.
2020-11-05 18:35:11 +01:00
joseLuís
d59d05990b rust: direct mode changes
- rename ncdirect_start to ncdirect_new
- add direct mode option flags
- fix examples
- refactor comments
2020-11-04 18:31:12 +01:00
joseLuís
94827c12a2 rust: update dependencies 2020-11-04 12:02:13 +01:00
joseLuís
fed2d7cb9b rust: fix comments 2020-11-03 21:05:57 +01:00
joseLuís
e8ff092f50 rust: fix input; add constructor 2020-11-03 20:59:57 +01:00
joseLuís
2f3d99e4e7 rust: fix visual 2020-11-03 20:40:04 +01:00
joseLuís
cfb2bf0824 rust: add input module with 1 static function 2020-11-03 20:26:33 +01:00
joseLuís
09bdf6ebd4 rust: add visual module 2020-11-03 19:59:13 +01:00
joseLuís
cb16c52eef rust: review functions; update headers 2020-11-03 19:59:10 +01:00
joseLuís
40621b7b95 rust: finish converting missing rgb calls 2020-11-03 19:56:54 +01:00
joseLuís
42250179f3 rust: add Blitter and Scale types 2020-11-03 19:56:28 +01:00
nick black
8189d21709
v2.0.2 2020-10-25 10:10:50 -04:00
nick black
a4546c86e3
v2.0.1 2020-10-19 03:15:32 -04:00
nick black
65974aeb0b
v2.0.0 2020-10-12 12:33:21 -04:00
nick black
8c9611d085
v1.7.6 2020-10-09 20:07:01 -04:00
nick black
c6c157a5ad
notcurses_stats_alloc() everywhere 2020-10-07 04:24:10 -04:00
nick black
20a49d053d
v1.7.5 2020-09-29 13:12:17 -04:00
joseLuís
bcc5481899 rust: update example
- use ncdirect_flush function for flushing
2020-09-22 13:34:10 +02:00
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`
2020-09-22 13:33:13 +02:00
joseLuís
a09ed747ca rust: update example direct-cursor 2020-09-21 20:03:18 +02:00
nick black
f02263e977
v1.7.4 2020-09-20 17:30:46 -04:00
nick black
21b8a50da0
rust: s/NCCHANNEL_ALPHA_MASK/CHANNEL_ALPHA_MASK/g 2020-09-20 16:16:40 -04:00
nick black
97dc50db1a kill stray entry in NEWS 2020-09-20 05:52:27 -04:00
nick black
4459efa216
v1.7.3 2020-09-19 21:21:52 -04:00
nick black
e42dbdfd60 _stainable() -> _stained() #985 2020-09-18 02:02:08 -04:00
nick black
bc097a5674
v1.7.2 2020-09-10 04:14:01 -04:00
nick black
70f062aff5
v1.7.1 2020-08-31 21:49:39 -04:00
nick black
64fe8f6c07
v1.7.0 2020-08-30 19:12:16 -04:00
nick black
4c7a1d0427 ncdirect_init: add flags parameter #976 2020-08-30 13:38:33 -04:00
nick black
c93243fd54
v1.6.20 2020-08-30 01:25:44 -04:00
nick black
e92b7fd6ea
v1.6.19 2020-08-27 12:43:28 -04:00
nick black
6526e58c00
v1.6.18.4 2020-08-27 12:30:29 -04:00
nick black
6ea73e6e45
v1.6.18.3 2020-08-27 08:18:38 -04:00
nick black
550c02d8ac
v1.6.18.2 2020-08-27 07:26:28 -04:00
nick black
d11d8175d0
v1.6.18.1 2020-08-27 03:10:48 -04:00
nick black
6d7f9eb501
v1.6.18 2020-08-25 18:24:19 -04:00
nick black
026b94969d cffi heap allocations are zero-initialized #942 2020-08-23 22:27:50 -04:00
joseLuís
1e6558fed9 new type aliases FullMode & Input 2020-08-23 18:29:17 +02:00
joseLuís
246cde91f9 +notcurses_align & modify ncplane_align #937 2020-08-23 18:27:14 +02:00
nick black
4ebf8f748c
v1.6.16 2020-08-22 23:12:04 -04:00
joseLuís
eab553d3d1 rust: update libc 2020-08-21 10:31:31 +02:00
joseLuís
2c1c150969 rust: add more type aliases, format
add new type aliases for: cell, ncplane, palette256, ncalign_e &
ncdirect + alignment constants.
2020-08-21 10:26:49 +02:00
joseLuís
ed748a5162 rust: new example: direct cursor
issue: only updates the screen after a newline
2020-08-20 18:02:03 +02:00
joseLuís
8c2d7bc5ac rust: EGC type safe wrapping for real this time 2020-08-20 17:25:24 +02:00
joseLuís
73961c04ce rust: rename ffi:: namespace to nc::
+rustfmt
2020-08-20 16:50:28 +02:00
joseLuís
9dc847c8b5 rust: add simple wrapper over ncdirect_init 2020-08-20 16:40:15 +02:00
joseLuís
d17460b875 rust: del uneeded alias 2020-08-20 16:01:25 +02:00
joseLuís
e975211a29 rust: even safer casting to char 2020-08-20 16:00:22 +02:00
joseLuís
356b44b015 rust: finish up EGC type safe wrapping. 2020-08-20 15:53:57 +02:00
joseLuís
3e4a074f8f rust: del ncplane_highgradient_sized due to #922 2020-08-19 19:17:10 +02:00
joseLuís
cac8202e03 rust: egc char related fixes 2020-08-19 18:36:49 +02:00
joseLuís
f25ba1b83c rust: +11 plane functions, ±finishing ncplane.
- Functions ncplane_putw* considered unnecessary from Rust.
- Functions & macros ncplane_printf* pending evaluation.
2020-08-19 18:09:58 +02:00
joseLuís
9b827f22b6 rust: +6 plane functions 2020-08-19 03:21:29 +02:00
joseLuís
915d59fb3e rust: +2 cell functions, finishing cells
- cell_prime and cells_load_box are unsafe fn, until a safer abstraction
  is built around gcluster, to avoid raw pointers dereferencing.
2020-08-19 03:18:47 +02:00
joseLuís
11287b6081 rust: rename types, add cell init macros
- +3 macros: cell_initializer, cell_simple_initializer and
  cell_trivial_initializer
- rename GraphemeCluster to EGC and GraphemeClusterBackStop to
EGCBackstop
- improve EGC doc comments
2020-08-18 20:46:12 +02:00
joseLuís
9c08411e27 rust: rustfmt 2020-08-18 18:28:17 +02:00
joseLuís
e324cd404c rust: finish notcurses functions
+4 notcurses functions
2020-08-18 16:27:53 +02:00
joseLuís
154d3ef312 rust: +14 cell functions
WIP: cell_prime & cells_load_box
2020-08-18 15:33:26 +02:00
joseLuís
5eb9dc37d4 rust: finish channel functions
remove channels_blend()
2020-08-18 15:31:33 +02:00
nick black
05da44b06b
hide blending functions #917 2020-08-18 08:41:55 -04:00
joseLuís
a4d5817940 rust: cargo clippy alias 2020-08-18 13:09:39 +02:00
joseLuís
18f90e394c rust: +22 cell functions 2020-08-18 00:01:47 +02:00
joseLuís
6cfd3d6ad7 rust: fix clippy compat with bindgen
and fix a couple of lints in plane.rs
2020-08-17 18:21:37 +02:00
joseLuís
b1b8400165 rust: +8 plane functions; refactor 2020-08-17 17:54:43 +02:00
joseLuís
a5fecf021e rust: update cells code 2020-08-17 17:54:17 +02:00
joseLuís
4382487652 rust: update example 2020-08-17 17:54:07 +02:00
joseLuís
8eefeb2a73 rust: fix builder rerun condition 2020-08-16 21:58:29 +02:00
nick black
49ae79341d
v1.6.15 2020-08-16 11:04:43 -04:00
joseLuís
ccac3d033e rust: update types 2020-08-16 16:22:58 +02:00
joseLuís
59546eaf40 rust: update dependency cstr_core; fixes #898 2020-08-16 16:20:48 +02:00
nick black
dc99d56ac1
v1.6.14 2020-08-16 10:06:33 -04:00
nick black
e897de3700
v1.6.13 2020-08-16 08:54:22 -04:00
nick black
202b88615f
kill ncplane_styles(), duplicates ncplane_attrs() 2020-08-16 07:26:16 -04:00
nick black
8b072c0b5f rust: attrword -> stylemask, u32 -> u16 2020-08-16 01:44:36 -04:00
joseLuís
62e9c28a0a rust: update types info 2020-08-14 11:09:38 +02:00
joseLuís
8c2ed36c3a rust: update types info 2020-08-14 10:40:37 +02:00
joseLuís
9ff74c393a rust: improve types info 2020-08-13 22:15:36 +02:00
joseLuís
d9596883d3 rust: make examples no_std compatible too 2020-08-13 22:14:00 +02:00