Commit Graph

522 Commits

Author SHA1 Message Date
nick black
033ae7f93e [capabilities] eradicate notcurses_canpixel() 2021-03-25 20:41:02 -04:00
nick black
1a1305faee rust: adapt NcDirect::render_frame() #1411 2021-03-14 22:48:47 -04:00
nick black
bc84987af5
v2.2.3 2021-03-08 07:10:50 -05:00
nick black
70be457071
rust: hide blitset definition 2021-03-07 22:59:02 -05:00
nick black
74f7597d09 rust: drop unused import 2021-02-27 19:03:42 -05:00
nick black
53c52e30ff remove c++/rust channel wholesalers 2021-02-27 19:03:42 -05:00
nick black
16ec1c3618 rust: purge NCOPTION_VERIFY_SIXEL 2021-02-27 19:03:42 -05:00
nick black
7724f6301e s/notcurses_cansixel/notcurses_canpixel/g #200 2021-02-27 19:03:42 -05:00
nick black
901ccc2d28 rust/python: ncblit_sixel -> ncblit_pixel 2021-02-27 19:03:42 -05:00
Ben Spencer
9625450848 rust: fix a couple of doc comments 2021-02-21 15:11:21 -05:00
nick black
d732ffc1f4
rust: use CELL_BG_ALPHA_MASK not CHANNEL_ALPHA_MASK 2021-02-21 08:22:25 -05:00
nick black
c10f5a40ce
v2.2.2 2021-02-18 07:07:26 -05:00
nick black
f775ae6b59 rust: update stats() 2021-02-18 04:14:41 -05:00
nick black
be4a9154a8
v2.2.1 2021-02-09 19:34:03 -05:00
nick black
3cdf7160de
v2.2.0 2021-02-08 09:35:34 -05:00
nick black
54ca2249df
v2.1.8 2021-02-03 08:34:49 -05:00
nick black
46f17f4794
add LICENSE to rust/ 2021-02-02 20:36:46 -05:00
nick black
68776b24e8 Add José to Cargo.toml, copy LICENSE #1163 2021-02-02 17:59:44 -05:00
nick black
6c48c82171 rust: CELL_NOBACKGROUND_MASK oughtn't be exported 2021-02-02 00:57:58 -05:00
nick black
121f10a9c5
v2.1.7 2021-01-21 03:21:31 -05:00
nick black
57271d09ce
v2.1.6 2021-01-21 02:44:00 -05:00
nick black
3ecdde74d0
v2.1.5 2021-01-15 05:14:07 -05:00
joseLuís
da5f86cc8f rust: rename NcDimension to NcDim; rustfmt 2021-01-08 19:25:46 +01:00
joseLuís
1622375d41 rust: add NCDIRECT_OPTION_NO_QUIT_SIGHANDLERS 2021-01-08 19:22:12 +01:00
joseLuís
1218e8fb7f rust: refactor module header summary info
- refactor headers for Notcurses & NcDirect modules.
2021-01-04 22:13:08 +01:00
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.
2021-01-04 14:29:56 +01:00
nick black
e617acecc7
v2.1.4 2021-01-03 19:55:32 -05:00
José Luis Cruz
1c12b73a80 remove warning 2021-01-03 19:20:19 -05:00
nick black
69e54bf9e3 rust: drop more wideasian 2021-01-03 19:20:19 -05:00
nick black
a229d64703 purge some wideasian cruft from rust wrappers 2021-01-03 19:20:19 -05:00
joseLuís
5eb8ac0be4 rust: improve documentation 2021-01-03 16:26:26 +01:00
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.
2021-01-03 02:40:41 +01:00
joseLuís
bad3449205 rust: rename Notcurses to FullMode; update doc 2021-01-02 22:58:35 +01:00
joseLuís
f5f9397f7b rust: add new wrapper type over NcDirect called DirectMode. 2021-01-02 22:50:48 +01:00
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.
2021-01-02 19:45:15 +01:00
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).
2021-01-01 21:49:34 +01:00
joseLuís
3bf9f11c80 rust: improve direct-cursor example.
- add `rand` as a dev-dependency.
2021-01-01 21:47:41 +01:00
joseLuís
9156cec58f rust: add handy constructors for NcChannel
- fix direct-cursor example.
2021-01-01 20:56:30 +01:00
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.
2021-01-01 14:17:01 +01:00
joseLuís
1d4653e7c8 rust: rename NcInput's new() to new_empty(); add new() 2021-01-01 13:59:30 +01:00
joseLuís
a29e9f0014 rust: fix ncdirect_getc_blocking(), and corresponding method 2021-01-01 13:06:59 +01:00
nick black
70b74a749b
v2.1.3 2020-12-31 02:57:16 -05:00
joseLuís
8c29276c70 rust: improve some comments 2020-12-31 03:56:36 +01:00
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.
2020-12-31 00:11:49 +01:00
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.
2020-12-30 19:11:55 +01:00
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.
2020-12-30 18:40:54 +01:00
joseLuís
624bee6d71 rust: add most NcCell methods
- add & fix comments.
- add methods links.
2020-12-30 00:48:09 +01:00
joseLuís
7b4c105fdf rust: finish updating rust for ncdirect changes
- update function and method names.
- update intra-doc links.
- update examples.
2020-12-29 02:56:01 +01:00
nick black
a7b131a11c
update rust for ncdirect changes 2020-12-28 20:15:26 -05:00
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.
2020-12-28 17:59:27 +01:00
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.
2020-12-28 13:47:44 +01:00
joseLuís
5d90e7de15 rust: update more NcPlane methods' return type to NcResult.
- rustfmt, comments…
2020-12-27 20:27:46 +01:00
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
2020-12-27 19:55:13 +01:00
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.
2020-12-27 19:00:32 +01:00
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.
2020-12-26 20:29:06 +01:00
nick black
55d563b646
v2.1.2 2020-12-26 02:53:40 -05:00
joseLuís
2762e9e561 rust: refactor errors for NcPlane & NcReader.
- add ncplane_new_bound_test helper function.
- update examples & tests as needed.
- rustfmt & minor fixes.
2020-12-26 07:34:26 +01:00
joseLuís
e966348321 rust: add NcMenu methods & fix error_ptr macro 2020-12-26 06:16:54 +01:00
joseLuís
e75432fcf2 rust: deprecate ncvisual_default_blitter 2020-12-26 05:46:05 +01:00
joseLuís
05d5c36622 rust: remove integration tests
- they really are unit tests.
- move version test to its right place.
- BONUS: add rstring![] macro.
2020-12-26 05:41:17 +01:00
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.
2020-12-26 05:14:27 +01:00
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.
2020-12-26 03:58:55 +01:00
joseLuís
bef4f534e9 rust: fix missing imports 2020-12-25 23:12:08 +01:00
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.
2020-12-25 20:10:31 +01:00
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.
2020-12-25 19:35:21 +01:00
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.
2020-12-25 17:41:02 +01:00
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.
2020-12-25 05:16:34 +01:00
joseLuís
5d1dfe1d02 rust fix poc-direct; update readme deps badge 2020-12-25 00:53:03 +01:00
joseLuís
ab2675b358 rust: add poc-direct example
- fix NcDirect dim_[y|x] methods.
- add NcDirect.dim_yx() method.
2020-12-24 19:56:12 +01:00
joseLuís
a9413eafb2 rust: add poc-kittyzapper example
- fix ncdirect_[b|f]g_rgb8 functions.
- fix NcDirect.bg_rgb8 method.
- new printf![] macro.
2020-12-24 18:40:33 +01:00
joseLuís
3c8328c9cc rust: add all NcDirect methods.
- add missing ncdirect_* static inline functions.
- update Notcurses.getc().
- add NcTime constructor.
- add NcSigSet type + constructor.
- minor fixes.
2020-12-24 18:02:33 +01:00
joseLuís
7d53abc1b1 rust: finish Notcurses methods & fix tests 2020-12-24 03:24:39 +01:00
joseLuís
b62c1ec74b rust: refactor NcCell constructors 2020-12-24 03:04:46 +01:00
joseLuís
815507293d rust: fix tests 2020-12-23 22:12:04 +01:00
joseLuís
c07b68f783 rust: add example poc-cjkscroll 2020-12-23 21:50:23 +01:00
joseLuís
bf7f5de745 rust: fix putchar related methods.
- refactor NcCell constructors.
- add Notcurses.term_dim_yx method.
- reduce name imports.
- fix comments.
2020-12-23 21:49:36 +01:00
joseLuís
ca38d9109e rust: add NcCell Methods.
- improve some apis.
- made some functions const.
- add comments and intra-doc links.
- fix comments.
2020-12-23 20:07:25 +01:00
joseLuís
bda47b7403 rust: add methods for NcResizeCb & NcPalette.
- fix intra-doc links.
- refactor palette module.
2020-12-23 18:45:19 +01:00
joseLuís
1afa9cc1db rust: add more methods.
- add NcChannel & NcChannelPair methods.
- add more NcPlane methods.
- add comments and intra-links.
- refactor intra-links style in all modules.
2020-12-23 13:38:28 +01:00
joseLuís
3be38890c9 rust: refactor input module.
- unify NcInput & NcKey in the same module.
- fix lifetimes issue.
2020-12-23 00:40:28 +01:00
joseLuís
298f250ee8 rust: refactor unsafe functions.
- remove unneeded unsafe.
- simplify lifetimes.
- fix ncplane_gradient_sized.
- fix NcChannelPair
- fix comments.
- rustfmt.
2020-12-23 00:27:29 +01:00
joseLuís
af11b123fa rust: add NcProgBar widget 2020-12-23 00:12:30 +01:00
joseLuís
4c048ef625 rust: finish adding Notcurses methods. 2020-12-22 15:17:50 +01:00
joseLuís
fa693a89c1 rust: add most Notcurses methods.
- fix some comments.
2020-12-22 15:01:07 +01:00
joseLuís
fd1b81c0f8 rust: add NcPixel methods.
- finish updating the functions.
2020-12-21 21:15:10 +01:00
joseLuís
0db4e48a6b rust: endianess updates for NcPixel & NcCell
- Update NcPixel functions, and their descriptions.
- Update NcPixel constructor.
2020-12-21 20:34:50 +01:00
joseLuís
6752741982 rust: add dynamic linesig control
- add new functions notcurses_linesigs_disable & notcurses_linesigs_enable.
- fix comments.
2020-12-21 16:44:04 +01:00
joseLuís
240b58d52b rust: update msrv in readme 2020-12-20 19:00:08 +01:00
joseLuís
de56912cc4 rust: keep adding NcPlane methods & more
- new type NcResizeCb.
- new functions ncresizecb_safe & ncresizecb_unsafe.
- update NcPlaneOptions constructors.
- Improve & fix comments.
2020-12-20 18:56:46 +01:00
joseLuís
183d6473cd rust: continue adding NcPlane methods.
- add new module fade.
  - new type NcFadeCb.
  - move NcFadeCtx here.
- add TOC for NcPlane methods sections.
- fix & improve comments.
- remove deprecated ncplane functions.
2020-12-20 00:30:46 +01:00
joseLuís
84987b61a9 rust: refactor ncbox, ncalign; add NcPlane methods.
- wrap NCBOX* constants.
- new NcBoxMask type.
- new NCRESULT_MAX const.
- add NcPlane box & perimeter methods.
- move NcAlign to notcurses mod.
- update notcurses_align & test.
- improve comments.
- rustfmt.
2020-12-19 18:01:28 +01:00
joseLuís
493298f0f1 rust: new dimension types & NcPlane methods.
- add new NcDimension and NcOffset types.
- add more NcPlane methods.
- remove NcPlane methods:
  - ncplane_put_egc.
- add missing NCKEY_ESC and NCKEY_SPACE keycodes.
- add notcurses methods: getc_nblock.
- fix comments.
- rustfmt.
2020-12-19 03:44:55 +01:00
joseLuís
2957893da9 rust: update cell tests; minor doc fix 2020-12-17 22:03:05 +01:00
joseLuís
7f175cf37c rust: NcCell width-aware constructors #1203 #1205 2020-12-17 12:10:36 +01:00
nick black
2d07bbee59
Merge branch 'master' of github.com:dankamongmen/notcurses 2020-12-16 17:42:11 -05:00
nick black
d6d5757b1d
v2.1.1 2020-12-16 17:42:06 -05:00
joseLuís
4cca3ddd48 rust: working on input
- make char: all NCKEY_* constants.
- make const fn: nckey_mouse_p, ncinput_equal_p & NcInput::new.
- make rsleep!() return the notcurses_render() result.
- new Notcurses constructor with_flags().
- new example: full-input.rs.
- fix comments.
2020-12-16 23:15:29 +01:00
nick black
6edafd1f84
v2.1.0 2020-12-13 03:04:23 -05:00
Nick Black
6106dea18a
track+use width for polycolumn EGCs #1203 (#1205)
Some EGCs are more than 2 columns (wcwidth() never returns more than 2, so far as i can tell, but when multiple characters combine, we use the sum). An example would be ကြေ (Myanmar) which occupies three columns over the course of three characters. Track the width (biased by 1) in cell->width, taking over 8 bits from cell->reserved. Use this width in rasterization. Closes #1203.
2020-12-12 22:25:08 -05:00
nick black
8497ee1877
v2.0.12 2020-12-12 06:42:47 -05:00
joseLuís
b229f0247c rust: update some comments 2020-12-09 17:17:30 +01:00
nick black
eb485cda21
v2.0.11 2020-12-09 00:34:37 -05:00
nick black
10c8dec7c0
fix up notcurses_debug rust test #1189 2020-12-08 05:46:44 -05:00
nick black
361a253aea
v2.0.10 2020-12-06 13:22:26 -05:00
joseLuís
ac29cab8e4 rust: fix documentation building; #1125
- Preparing to host the documentation in the github pages, at least until
- libnotcurses-sys can get into Ubuntu 20.
- fix Cargo.toml, add documentation link.
- update documentation link in README.
- improve lib doc comment, among others.
2020-12-06 17:59:32 +01:00
joseLuís
98d86ec286 rust: remove cc build dep. & stdout.c file; #355 2020-12-06 11:58:46 +01:00
joseLuís
a0e1577b56 rust: fix comments 2020-12-06 11:40:07 +01:00
joseLuís
96eaa29484 rust: add lib doc comments with examples 2020-12-06 11:00:41 +01:00
joseLuís
c46c06a2e9 rust: move NcScale & NcVisual to visual module 2020-12-06 10:59:19 +01:00
joseLuís
01f7434a9a rust: rename bindgen module to ffi 2020-12-05 18:55:10 +01:00
joseLuís
d19c753227 rust: use cstring macro instead of CString function 2020-12-05 04:04:02 +01:00
joseLuís
57d2eddbf5 rust: more refactoring, channel methods, new macro.
- add NcChannel methods
- add the `NcChannelMethods` Trait to be able to use them,
  since you can't implement methods over a primitive otherwise, unlike over a struct like NcPlane. And NcChannel is a type alias of `u32`.
- create more channel functions, to set the r,g,b separately.
- made some functions const
- add new rsleep![] macro, for rendering before sleeping.
- improve doc comments.
- fix previous commits.
2020-12-05 03:54:52 +01:00
joseLuís
5def609c73 rust: add stats methods 2020-12-05 03:48:55 +01:00
joseLuís
e822e85a14 rust: Drop trait doesn't work with &muts; del impls 2020-12-05 01:58:24 +01:00
joseLuís
2483771af1 rust: Don't derive the Copy trait
- implement the Drop trait for the all the obvious types.
- resolve lifetime issues revealed from not being Copy.
  - return
2020-12-05 01:32:51 +01:00
joseLuís
6ad18bfa7b rust: refactoring and corrections.
- reorder cell, ncchannel & ncplane reimplemented functions.
- minor fixes and corrections.
- improve doc comments.
2020-12-04 13:31:30 +01:00
joseLuís
01e4f7de5a rust: big refactor
- move tests to their own submodules
- move functions reimplementations to reimplemented submodule.
- remove types submodules and move them to their parent.
- add more NcPlane & Notcurses methods
- rename NcChar back to NcEgc, and NcCharBackstop tp NcEgcBackstop
- add ncpile_top & ncpile_bottom functions.
- fix Notcurses stdplane(_mut) methods
- make cell_load_char not return anything since it was always 1.
2020-12-04 02:26:11 +01:00
joseLuís
38bdc627a4 rust: more refactoring
- new macros module, with sleep![] and cstring![] macros.
- rename NCell constructors.
- more plane methods.
- improve doc comments.
2020-12-03 04:30:13 +01:00
joseLuís
4ea2ccc51d rust: more refactor and fixes
- create some more notcurses tests.
- rename `constructors` submodules to `wrapped`.
- fix ncplane_str so to accept &str.
- implement some rusty methods for NcPlane, as a POC.
- improve multiple doc comments.
2020-12-03 02:22:21 +01:00
joseLuís
24640eb80e rust: big modules refactor
- remove the types module, and move the types definitions
  into submodules
- improve multiple comments
2020-12-02 14:01:09 +01:00
joseLuís
1206a281ec rust: keep refactoring and improving docs
- remove the use of inline code markings inside rustdoc [`links`],
  because they are too visually distracting.
- Use descriptive language in the doc comments, instead of imperative.
- Rename NcChannels to NcChannelPair, for improved clarity.
- Improve more comments, add inner links.
- Improve some tests.
- separate tests and constructors into submodules for cells and channels
2020-12-02 02:12:12 +01:00
joseLuís
279f36ec93 rust: more tests, refactors & improvements
- separate tests and constructors into submodules for cells and channels
- add missing functions channels_set_bg_palindex & channels_set_fg_palindex
- fix bug in channel_palindex_p function
- wrap NCSTYLE_* constants
- add more missing cell tests
- improve many doc comments
- fix some types
2020-12-01 19:26:51 +01:00
nick black
8083b46e3b
v2.0.9 2020-12-01 04:37:37 -05:00
joseLuís
e2ec27d413 rust: more tests, refactors & improvements
- add ncplane_putchar_yx & ncplane_putchar static functions
- complete test for channel_default_p
- add more tests for ncplane
- separate tests and constructors into submodules for ncplane and notcurses
- make public FILE_NC & FILE_LIBC
- improve integration tests.
- clean & rustfmt
- add constant NCRESULT_OK, NCRESULT_ERR and use them to refer to
  the NcResult values when appropriate
2020-11-30 20:03:49 +01:00
joseLuís
a4e7513b11 rust: downgrade bindgen & pkg-config #355 2020-11-30 04:02:21 +01:00
joseLuís
059007bd50 rust: more improvements
- fix bindings module, by not making public the wrapped bindgen types
- add notcurses_stddim_yx_const()
- fix return types of TODO
- add plane constructor new() wrapping ncpile_create()
- add plane constructor new_bound() wrapping ncplane_create()
- add plane constructor new_termsize() wrapping ncpile_create() with the terminal size
- add plane doc comment
2020-11-28 23:25:06 +01:00
nick black
2a45620cd6
v2.0.8 2020-11-27 16:49:56 -05:00
joseLuís
b64a257ecf rust: replace cell macros with constructors
- add NcCell constructors: new(), new_blank(), with_char()
- remove cell initializer macros
- update full-basics example
- add more doc comments
2020-11-26 19:17:08 +01:00
joseLuís
58c3d66c15 rust: add ncpile funcs & upd function-summary
- add functions ncpile_create, ncpile_render, ncpile_rasterize
- add new script tools/blame-nick.sh
- upd script tools/function-summary.sh and the generated data
- upd bindgen version
2020-11-26 13:31:04 +01:00
joseLuís
657da94887 rust: add MSRV
- make a little change to ensure MSRV 1.40.0
- show MSRV (Minimum Supported Rust Version) in README
- show up-to-date state of crate dependencies in README
- update comments
2020-11-26 11:36:44 +01:00
nick black
ebc80915a3 c++/rust struck #1138 2020-11-25 20:04:14 -05:00
joseLuís
433068a5ae rust: further types cleanup
- made sigset_t private.
- made FILE_LIBC & FILE_NC private.
- add NCMETRIC_ prefix to the related constants.
- Improve more comments.
2020-11-25 14:01:25 +01:00
joseLuís
8b6495a894 rust: rename type aliases for consistency
Rename all bound types so that they start by Nc (and constants by NC),
except Notcurses:

- rename Cell to NcCell.
- rename CELL_* constants to NCCELL_*.
- rename Channel to NcChannel & Channels to NcChannels.
- rename CHANNEL_* constants to NCCHANNEL_*.
- rename Egc to NcChar & EgcBackstop to NcCharBackstop.
- rename Palette to NcPalette & PaletteIndex to NcPaletteIndex.
- rename IntResult to NcResult.
- rename Color to NcColor.
- rename Rgb to NcRgb.
- rename AlphaBits to NcAlphaBits.
- rename StyleMask to NcStyleMask.
- rename LIBC_FILE to FILE_LIBC & NC_FILE to FILE_NC.

Also:
- new type NcTime for timespec.
- rustfmt.
2020-11-25 13:27:45 +01:00
joseLuís
1dda2d7d58 rust: add new functions
- ncpile_create
- ncplane_reparent_family
- ncplane_resizecb
2020-11-25 10:50:31 +01:00
nick black
73b2f1bf19
v2.0.7 2020-11-22 00:22:11 -05:00
nick black
acdcf9e41f
v2.0.6 2020-11-21 23:35:24 -05:00
nick black
537caa2173
v2.0.5 2020-11-21 22:29:02 -05:00
joseLuís
e23cd63aac rust: improve comments
- use new syntax for doclinks
- improve some comments
- add README
2020-11-20 20:17:37 +01:00
nick black
7fa89b45da rust: unfuck ncaligns #1115 2020-11-17 23:42:36 -05:00
nick black
9ce821a045 [headscratch] 2020-11-17 23:42:36 -05:00
nick black
ee019b2d5a rust: clear all mention of ncplane->horiz #1115 2020-11-17 23:42:36 -05:00
nick black
bc245e09fc rust: drop ncplane_options__bindgen_ty_1 2020-11-17 23:42:36 -05:00
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.
2020-11-18 02:43:29 +01:00
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