Commit Graph

573 Commits (4f86f1b0fd560ad5fd0c4577cca0e4a84876c899)

Author SHA1 Message Date
joseLuís 6ab072c953 [rust] update example pixel-cell & remove poc-planebase 3 years ago
joseLuís 1e69b48bbd [rust] add example issue-1559 #1559 3 years ago
joseLuís c7f1c32f7f [rust] update pixel-cell example; #1546 3 years ago
joseLuís 8209bc6841 [rust] use deprecated blacklist_function; #1339 3 years ago
joseLuís 08a3edb71f [rust] update pixel-cell example; #1546 3 years ago
joseLuís 88c89f2d30 [rust] add ncvisual_inflate; update function-summary; fixes
- add ncvisual_inflate function
- update function-summary script & related data
- update cell inner comments.
- fix several doc inner links.
3 years ago
joseLuís eaee89c99f [rust] renamed FullMode & DirectMode to Nc & NcD
- improve pixel-cell example.
- rustfmt
3 years ago
nick black e1d97bfb62
[rust] cell_ -> nccell_ drudgery #1532 3 years ago
nick black b070b69eb2
get last remaining cell_ functions -> nccell_ #1532 3 years ago
joseLuís 452b7cd535 [rust] renamed cell_* functions to nccell_* 3 years ago
Nick Black e591ec2e98
cell -> nccell throughout much of remaining API (#1535)
cell -> nccell throughout much of the API #1532
3 years ago
nick black e017dcba89
v2.2.6 3 years ago
joseLuís 5f96acc9e3 [rust] refacture NcVisual module
- separate the methods into its own module.
- add constants NCVISUAL_OPTION_ADDALPHA, NCVISUAL_OPTION_HORALIGNED, NCVISUAL_OPTION_VERALIGNED
- add NcRgba type.
- update the docs.
3 years ago
joseLuís 48ab7e0945 [rust] fix #1509
- fix bugs in macros: error, error_ref & error_ref_mut
- remove issue-1509 example
- minor improvements
- rustfmt
3 years ago
nick black 76241f81d2 [rust] adapt pixel-cell.rs 3 years ago
nick black bb0d6c2e80 [rust] update fullsize_pixel_without_plane() 3 years ago
nick black bac7d634d9 [visual] pipe transcolor through, use it everywhere #1518 3 years ago
joseLuís 932f4c1b7c [rust] simplify issue-1509 example 3 years ago
nick black 33929cf91e
[rust] update to nccell 3 years ago
joseLuís bc80350384 [rust] several fixes
- fix after renaming cell functions.
- fix some NcVisual method names and docs
- fix some rustdoc warnings
3 years ago
nick black 849ec2748f
[rust] nccell updates 3 years ago
nick black ff76dba6ed
cell_strdup -> nccell_strdup 3 years ago
joseLuís 1afe6f162e rust: add new pixel geometry functionality
- add NcPlane method .pixelgeom.
- upgrade full-capabilities example.
- fix NcVisual method .blitter_geom docs.
- rustfmt
3 years ago
joseLuís 66d4f323e8 rust: fix .gitignore; remove issue example
- make .gitignore just ignore the *root* build dir
- remove unneeded rust/.gitignore
- remove no longer needed issue-rgba.rs
3 years ago
Nick Black 04b1ba8ed2
Dankamongmen/unify geom (#1514)
deprecate ncvisual_geom() in favor of new ncvisual_blitter_geom(), which allows caller to get the blitter used. replace the checks and calculations in ncvisual_render() with a call to ncvisual_blitter_geom(), unifying the two paths (and eliminating several bugs in the unloved ncvisual_geom()).
3 years ago
joseLuís 429ca673d3 rust: several fixes; add example for issue #1509
- fix method name: NcPlane.at_yx_cell().
- tell bidngen derive more traits when it can
- update .gitignore so it doesn't ignore rust/build
3 years ago
joseLuís 7d51756a12 rust: new poc-planebase example; doc improvements
- improve NcVisual.from_rgba documentation.
- fix Notcurses.term_dim_yx documentation.
- new example `poc-planebase` to help find the bug.
- improve full-capabilities example a little.
3 years ago
joseLuís 60c874f835 rust: impl ncplane_as_rgba; refactor macros
- rename and refactor NcPlane method rgba() to as_rgba().
- add example `issue-rgba` that shows a problem when the plane has text.
- refactor `error_ref` & `error_ref_mut` macros to allow custom return values
3 years ago
joseLuís 4996bebad0 rust: add constant NCOPTION_NO_CLEAR_BITMAPS 3 years ago
joseLuís 7c6083ee1a rust: add missing functions & constants; refactor
- implement methods for ncplane_resize_marginalized & notcurses_debug_caps.
- add constants NCPLANE_OPTION_MARGINALIZED & NCPLANE_OPTION_VERALIGNED.
- signature updates for NcChannel* & NcPixel trait methods.
- minor improvements.
3 years ago
joseLuís 36a7355cd8 rust: minor examples updates 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 435b8cb6a7 rust: refactor examples & palette_size method
- refactor Notcurses.palette_size() to return an NcResult.
- refactor & rename example direct-text.rs to direct-capabilities.rs.
- new example full-capabilities.rs
3 years ago
joseLuís 1e274287f6 rust: add NcTree widget.
- created all methods except .goto().
- WIP callback types.
- minor updates.
- rustfmt.
3 years ago
joseLuís aa9bf7a0e7 rust: add ncplane_abs_yx, ncplane_abs_y, ncplane_abs_x
- minor updates
3 years ago
joseLuís 29ac41440c rust: add NcPlane methods resize_maximize & rgba; fix #1508 3 years ago
joseLuís 8cf52672cb rust: rustfmt 3 years ago
joseLuís 63d8645f04 rust: improve pixel-cell example 3 years ago
joseLuís 89e38c11f3 rust: add ncvisual methods & pixel-cell example 3 years ago
joseLuís 1c5ee9eb8c rust: add more functions and methods
- add functions: ncdirect_core_init & notcurses_core_init (methods pending)
- add functions & methods: ncdirect_readline & notcurses_can_braille
- minor fixes
3 years ago
joseLuís 5492119263 rust: add *_check_pixel_support functions + example 3 years ago
nick black 6760929f91
rust: s/blacklist/blocklist/g 3 years ago
nick black 8c78b089e1
v2.2.5 3 years ago
joseLuís 43d1f7192b rust: refactor NcError constructor methods 3 years ago
nick black 57114c8005
[bitmaps] remove redundant PixelWipeBlocks test 3 years ago
nick black a8a42c2a50 [planes] implement ncplane_resize_marginalized() #1472 3 years ago
nick black 50df69ab31 [planes] implement MARGINALIZED in ncplane_create() #1472 3 years ago
nick black a9d9093e22 rust: fix up notcurses_align() unification #1468 3 years ago
nick black df85fb55ba [bitmaps] fix bitmap placement when making a new plane #1468 3 years ago
nick black 229c1ab3c2 ncplane_new_internal: use ncplane_valign() #1468 3 years ago
nick black fc79dcd77a update rust for halign/valign #1468 3 years ago
nick black 033ae7f93e [capabilities] eradicate notcurses_canpixel() 3 years ago
nick black 1a1305faee rust: adapt NcDirect::render_frame() #1411 3 years ago
nick black bc84987af5
v2.2.3 3 years ago
nick black 70be457071
rust: hide blitset definition 3 years ago
nick black 74f7597d09 rust: drop unused import 3 years ago
nick black 53c52e30ff remove c++/rust channel wholesalers 3 years ago
nick black 16ec1c3618 rust: purge NCOPTION_VERIFY_SIXEL 3 years ago
nick black 7724f6301e s/notcurses_cansixel/notcurses_canpixel/g #200 3 years ago
nick black 901ccc2d28 rust/python: ncblit_sixel -> ncblit_pixel 3 years ago
Ben Spencer 9625450848 rust: fix a couple of doc comments 3 years ago
nick black d732ffc1f4
rust: use CELL_BG_ALPHA_MASK not CHANNEL_ALPHA_MASK 3 years ago
nick black c10f5a40ce
v2.2.2 3 years ago
nick black f775ae6b59 rust: update stats() 3 years ago
nick black be4a9154a8
v2.2.1 3 years ago
nick black 3cdf7160de
v2.2.0 3 years ago
nick black 54ca2249df
v2.1.8 4 years ago
nick black 46f17f4794
add LICENSE to rust/ 4 years ago
nick black 68776b24e8 Add José to Cargo.toml, copy LICENSE #1163 4 years ago
nick black 6c48c82171 rust: CELL_NOBACKGROUND_MASK oughtn't be exported 4 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
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.
4 years ago
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.
4 years ago
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.
4 years ago
joseLuís 5d1dfe1d02 rust fix poc-direct; update readme deps badge 4 years ago
joseLuís ab2675b358 rust: add poc-direct example
- fix NcDirect dim_[y|x] methods.
- add NcDirect.dim_yx() method.
4 years ago
joseLuís a9413eafb2 rust: add poc-kittyzapper example
- fix ncdirect_[b|f]g_rgb8 functions.
- fix NcDirect.bg_rgb8 method.
- new printf![] macro.
4 years ago
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.
4 years ago
joseLuís 7d53abc1b1 rust: finish Notcurses methods & fix tests 4 years ago
joseLuís b62c1ec74b rust: refactor NcCell constructors 4 years ago
joseLuís 815507293d rust: fix tests 4 years ago
joseLuís c07b68f783 rust: add example poc-cjkscroll 4 years ago
joseLuís bf7f5de745 rust: fix putchar related methods.
- refactor NcCell constructors.
- add Notcurses.term_dim_yx method.
- reduce name imports.
- fix comments.
4 years ago
joseLuís ca38d9109e rust: add NcCell Methods.
- improve some apis.
- made some functions const.
- add comments and intra-doc links.
- fix comments.
4 years ago
joseLuís bda47b7403 rust: add methods for NcResizeCb & NcPalette.
- fix intra-doc links.
- refactor palette module.
4 years ago
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.
4 years ago
joseLuís 3be38890c9 rust: refactor input module.
- unify NcInput & NcKey in the same module.
- fix lifetimes issue.
4 years ago
joseLuís 298f250ee8 rust: refactor unsafe functions.
- remove unneeded unsafe.
- simplify lifetimes.
- fix ncplane_gradient_sized.
- fix NcChannelPair
- fix comments.
- rustfmt.
4 years ago
joseLuís af11b123fa rust: add NcProgBar widget 4 years ago
joseLuís 4c048ef625 rust: finish adding Notcurses methods. 4 years ago
joseLuís fa693a89c1 rust: add most Notcurses methods.
- fix some comments.
4 years ago
joseLuís fd1b81c0f8 rust: add NcPixel methods.
- finish updating the functions.
4 years ago
joseLuís 0db4e48a6b rust: endianess updates for NcPixel & NcCell
- Update NcPixel functions, and their descriptions.
- Update NcPixel constructor.
4 years ago
joseLuís 6752741982 rust: add dynamic linesig control
- add new functions notcurses_linesigs_disable & notcurses_linesigs_enable.
- fix comments.
4 years ago
joseLuís 240b58d52b rust: update msrv in readme 4 years ago
joseLuís de56912cc4 rust: keep adding NcPlane methods & more
- new type NcResizeCb.
- new functions ncresizecb_safe & ncresizecb_unsafe.
- update NcPlaneOptions constructors.
- Improve & fix comments.
4 years ago
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.
4 years ago
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.
4 years ago
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.
4 years ago
joseLuís 2957893da9 rust: update cell tests; minor doc fix 4 years ago
joseLuís 7f175cf37c rust: NcCell width-aware constructors #1203 #1205 4 years ago
nick black 2d07bbee59
Merge branch 'master' of github.com:dankamongmen/notcurses 4 years ago
nick black d6d5757b1d
v2.1.1 4 years ago
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.
4 years ago
nick black 6edafd1f84
v2.1.0 4 years ago
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.
4 years ago
nick black 8497ee1877
v2.0.12 4 years ago
joseLuís b229f0247c rust: update some comments 4 years ago
nick black eb485cda21
v2.0.11 4 years ago
nick black 10c8dec7c0
fix up notcurses_debug rust test #1189 4 years ago
nick black 361a253aea
v2.0.10 4 years ago
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.
4 years ago
joseLuís 98d86ec286 rust: remove cc build dep. & stdout.c file; #355 4 years ago
joseLuís a0e1577b56 rust: fix comments 4 years ago
joseLuís 96eaa29484 rust: add lib doc comments with examples 4 years ago
joseLuís c46c06a2e9 rust: move NcScale & NcVisual to visual module 4 years ago
joseLuís 01f7434a9a rust: rename bindgen module to ffi 4 years ago
joseLuís d19c753227 rust: use cstring macro instead of CString function 4 years ago
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.
4 years ago
joseLuís 5def609c73 rust: add stats methods 4 years ago
joseLuís e822e85a14 rust: Drop trait doesn't work with &muts; del impls 4 years ago
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
4 years ago
joseLuís 6ad18bfa7b rust: refactoring and corrections.
- reorder cell, ncchannel & ncplane reimplemented functions.
- minor fixes and corrections.
- improve doc comments.
4 years ago
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.
4 years ago
joseLuís 38bdc627a4 rust: more refactoring
- new macros module, with sleep![] and cstring![] macros.
- rename NCell constructors.
- more plane methods.
- improve doc comments.
4 years ago
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.
4 years ago
joseLuís 24640eb80e rust: big modules refactor
- remove the types module, and move the types definitions
  into submodules
- improve multiple comments
4 years ago
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
4 years ago
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
4 years ago
nick black 8083b46e3b
v2.0.9 4 years ago
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
4 years ago
joseLuís a4e7513b11 rust: downgrade bindgen & pkg-config #355 4 years ago
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
4 years ago
nick black 2a45620cd6
v2.0.8 4 years ago
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
4 years ago
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
4 years ago
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
4 years ago
nick black ebc80915a3 c++/rust struck #1138 4 years ago
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.
4 years ago
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.
4 years ago
joseLuís 1dda2d7d58 rust: add new functions
- ncpile_create
- ncplane_reparent_family
- ncplane_resizecb
4 years ago
nick black 73b2f1bf19
v2.0.7 4 years ago
nick black acdcf9e41f
v2.0.6 4 years ago
nick black 537caa2173
v2.0.5 4 years ago
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