Commit Graph

296 Commits

Author SHA1 Message Date
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