Anonymous

Notcurses: Difference between revisions

From dankwiki
 
(8 intermediate revisions by the same user not shown)
Line 8: Line 8:
I published a coherent textbook, "[https://www.amazon.com/dp/B086PNVNC9 Hacking the Planet! with Notcurses]", in April 2020. More details are available [[Hacking_The_Planet!_with_Notcurses|here]].
I published a coherent textbook, "[https://www.amazon.com/dp/B086PNVNC9 Hacking the Planet! with Notcurses]", in April 2020. More details are available [[Hacking_The_Planet!_with_Notcurses|here]].


I recorded a [[DANKTECH]] video, "[https://www.youtube.com/watch?v=mOmMcFXdd6k Console sex with Notcurses]" as a gentle intro (its demo has been superseded by the [https://www.youtube.com/watch?v=dcjkezf1ARY 2.3.0 demo]). You can run this same demo on your local machine with <tt>[https://nick-black.com/notcurses/notcurses-demo.1.html notcurses-demo]</tt>.
I recorded a [[DANKTECH]] video, "[https://www.youtube.com/watch?v=mOmMcFXdd6k Console sex with Notcurses]" as a gentle intro (its demo has been superseded by the [https://www.youtube.com/watch?v=dcjkezf1ARY NOTCURSES III demo]). You can run this same demo on your local machine with <tt>[https://nick-black.com/notcurses/notcurses-demo.1.html notcurses-demo]</tt>.


==Features==
==Features==
* Advanced and extensive runtime querying for terminal capabilities
* Optional use of "alternate screen" where available (<tt>enter_ca_mode</tt>/<tt>exit_ca_mode</tt> terminfo capabilities)
* Optional use of "alternate screen" where available (<tt>enter_ca_mode</tt>/<tt>exit_ca_mode</tt> terminfo capabilities)
* All APIs use 24-bit 8bpc RGB color natively
* All APIs use 24-bit 8bpc RGB color natively
Line 18: Line 19:
** [[#Sprites|Sprites!]]
** [[#Sprites|Sprites!]]
* Full support for [[#Unicode|Unicode]], including wide glyphs and bidirectional text
* Full support for [[#Unicode|Unicode]], including wide glyphs and bidirectional text
** Composed keys (number pad, etc.) are mapped into [https://unicode.org/charts/PDF/U100000.pdf Private Supplementary Area B]
** Composed keys (number pad, etc.) are mapped outside the defined Unicode regions
* Image/video support via ffmpeg or OpenImageIO
* Image/video support via ffmpeg or OpenImageIO
* Subregion fade in/out
* Subregion fade in/out, text pulsing
* [[#Linear_interpolation|Linear interpolation]] for coloring geometric objects
* [[#Linear_interpolation|Linear interpolation]] for coloring geometric objects
* Multiple [[#Blitters|blitters]], rotation, and arbitrary scaling
* Multiple cell and pixel [[#Blitters|blitters]], rotation, and arbitrary scaling


==Rendering==
==Rendering==
Line 143: Line 144:
Notcurses provides input from keyboards and mice. Single Unicode codepoints are received from the keyboard, directly encoded as <tt>char32_t</tt>s. The input system must deal with numerous keyboard signals which do not map to Unicode code points. This includes the keypad arrows and function keys. These "synthesized" codepoints are enumerated in <tt>notcurses.h</tt>, and mapped into the [https://unicode.org/charts/PDF/U100000.pdf Supplementary Private Use Area-B] (U+100000..U+10FFFD). Mouse button events are similarly mapped into the SPUA-B.
Notcurses provides input from keyboards and mice. Single Unicode codepoints are received from the keyboard, directly encoded as <tt>char32_t</tt>s. The input system must deal with numerous keyboard signals which do not map to Unicode code points. This includes the keypad arrows and function keys. These "synthesized" codepoints are enumerated in <tt>notcurses.h</tt>, and mapped into the [https://unicode.org/charts/PDF/U100000.pdf Supplementary Private Use Area-B] (U+100000..U+10FFFD). Mouse button events are similarly mapped into the SPUA-B.


All events carry a <tt>ncinput</tt> structure with them. For mouse events, the x and y coordinates are reported within this struct. For all events, modifiers (e.g. "Alt") are carried as bools in this struct.
All events carry a <tt>ncinput</tt> structure with them. For mouse events, the x and y coordinates are reported within this struct. For all events, modifiers (e.g. "Alt") are carried as the <tt>modifiers</tt> bitfield in this struct.


==Transparency/Contrasting==
==Transparency/Contrasting==
Line 287: Line 288:
! Release !! Date !! Key features
! Release !! Date !! Key features
|-
|-
| 3.0.0 || late 2021
| [https://github.com/dankamongmen/notcurses/releases/tag/v3.0.0 3.0.0] || 2021-12-01
| Pixel plots
| New input system, kitty keyboard/GPM/XTMODKEYS support
|-
|-
| 2.4.0 || real soon now
| [https://github.com/dankamongmen/notcurses/releases/tag/v2.4.0 2.4.0] || 2021-09-06
| Microsoft Windows and macOS support, Linux framebuffer graphics, "CLI mode"
| Microsoft Windows and macOS support, Linux framebuffer graphics, "CLI mode"
|-
|-