Releases: mattpolzin/ncurses-idris
Apple Silicon compatibility
Thanks to @dunhamsteve for tracking down and fixing a drawing bug related to this library's NCurses calls on M1 Macs (and presumably other Apple Silicon architectures).
Also a shoutout to @gallais for the Snake and Tetris examples you can now find in this repo's examples
directory.
Compatibility with idris-indexed v0.0.9
Updates this NCurses library to support the breaking changes in v0.0.9 of the Indexed library.
Refactor support Makefile
Refactor support file build process to be triggered by Idris package build hooks rather than from root Makefile.
0.2.0: Merge pull request #22 from mattpolzin/better-dx
Improvements
- drastically improve the usability of the
inWindow
function by reducing the number of times that proofs ofIsActive
,InWindow
, andHasWindow
need to be manually hinted at by the developer.
A lot of code like
inWindow "win" $
doSomething x y z @{setWindowIsActiveStill} @{setWindowHasWindowStill}
can become
inWindow "win" $
doSomething x y z
Breaking Changes
N/A
Standard Stuff
Improvements
- improve performance slightly and mostly in edge cases.
- add a first performance test case.
- fix a bug where
getPos
was getting the cursor position butsetPos
was setting the current window position. - fix bug with
Control.NCurses.Pretty
not tracking push/pop of attributes correctly.
Breaking Changes
Rename Control.NCurses
getPos
to getWindowPos
, setPos
to setWindowPos
, getSize
to getWindowSize
, and setSize
to setWindowSize
.
Add ability to set window background colors
Adds NCurses.Core
setBackground
and setBackground'
functions and adds Control.NCurses
setBackground
function.
Fix bug where width & height were swapped.
Fixed a bug where Control.NCurses.setSize
was setting width to height and vice versa.
Fix bug where some keys were the same value with keypad turned on
Merge pull request #18 from mattpolzin/fix-char-retrieval Fix key retrieval via FFI
Window positioning and attribute updating
Breaking Changes
- rename
nChangeAttr
tonChangeAttrAt
and same fornChangeAttr'
->nChangeAttrAt'
. - move
Attribute
'sDefaultColors
into the newColorAttr
type along with theNamedColor
constructor that used to beAttribute
'sColor
constructor.
Additions
deleteWindow
andmoveWindow
inNCurses.Core
.nChangeAttr
reintroduced inNCurses.Core
(see note about renaming above) but as a function that does not move the cursor prior to changing the attribute for some number length of characters.updateAttr
andsetPos
inControl.NCurses
.
Add `inWindow` function.
Additions
- The
inWindow
function forControl.NCurses
allows you to call out to a function that will act within a different window without modifying the NCurses state afterwards (in effect, switch to a window, run some code, switch back).
Breaking Changes
Window.defaultWindow
has been renamed toDefaultWindow
.