Commit Graph

4117 Commits (76983d6ba7a588582618d8fb34edaca1edd86965)
 

Author SHA1 Message Date
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
nick black c9fb385ebe fold out test breakage #1250 4 years ago
nick black 91e932ed26 ncvisual_render: handle NCSCALE_NONE_HIRES #1250 4 years ago
nick black 56d94e9392 intro: add a bar on top to match bottom 4 years ago
nick black 15664b9799 ncdirect: handle new scalings #1250 4 years ago
nick black dd1cdc40d5 add NCSCALE_NONE_HIRES, NCSCALE_SCALE_HIRES #1250 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
Nick Black 770a8a4392 Update issue templates
@joseluis wanted an "other" with a blank template.
4 years ago
nick black a4bad2318f
dragon: don't force 3x2 4 years ago
nick black 3f26c36458
direct: honor transparency in image blitting #1252 4 years ago
nick black 9268109778
update man pages for ncvisual_media_defblitter() #1114 4 years ago
nick black 1fa4580a3e
throw some D's on that bitch #1114
If the TERM string contains either of "kitty", "vte", or
"gnome", enable sextants. Fuck it, we'll do it live!
4 years ago
joseLuís bef4f534e9 rust: fix missing imports 4 years ago
nick black 4d8efcab82
Progress towards NCBLIT_3x2 by default
Add a new member 'sextants' to the terminfo cache (both
notcurses and ncvisual contain one of these, and both
initialize it the same way -- interrogate_terminfo()).
Add a new function, 'notcurses_media_defblitter()', and
deprecate 'ncvisual_default_blitter()' (the latter didn't
receive enough information to return NCBLIT_3x2). Update
all callers. Add new *internal* function rgba_default_blitter(),
so this logic can be freely changed in the future. If
sextants are available, and we're scaling, return NCBLIT_3x2.
Once we detect sextant availability, we'll have sexblitter
as a default -- stay tuned! #1114
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
nick black b8c33a6caf
ncplane_highgradient: use direct blitting #1249 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
nick black 4e5dbfd2b9
render: use hpa in place of cuf #1245 4 years ago
nick black 1002347c9e
HACKING: document right-to-left shittery 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 e174ad44e2 update rust version in readme 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
nick black f1cd068da3
add atma.png for keller 4 years ago
nick black e6a45d5422
wcwidth: print running measure 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
nick black 878842942d
TERMS.md: document block-drawing 4 years ago
nick black 6ca8949845 add kittyzapper PoC #1117 4 years ago
nick black 0578e86e02 introduce terminal-specific heuristics
Kitty conflates an RGB background specification that aligns
with the default background color with that actual background
color. This can result in translucent background when we're
expecting opaque ones. Detect kitty (strstr check of terminal
name for "kitty"), and if it's active, mark `bg_collides_default`
with the rgb of the default background color. For now, we assume
this to be (0,0,0), but we ought improve it by determining (or
setting, if that's impossible) the precise default bg color.
Closes #1117.
4 years ago
nick black 7df2c7cd04
ncdirect: use sgr0, properly align images 4 years ago
nick black e1b1654d1e
NEWS: mention ncdirect image render split 4 years ago
nick black 0ceb129125
document kitty properties #1117 4 years ago
nick black d3fc0db1ee
Merge branch 'master' of github.com:dankamongmen/notcurses 4 years ago