brick 0.12 released

17 views
Skip to first unread message

Jonathan Daugherty

unread,
Oct 30, 2016, 5:17:36 PM10/30/16
to brick...@googlegroups.com
Hi all,

brick 0.12 is out! This release includes mouse interaction support and
improvements to the way custom events are handled. The latter changes
will require updates; the CHANGELOG summary is below, including some
details on upgrading. Enjoy!

---

This release primarily adds support for mouse interaction. For details,
see the Mouse Support section of the User Guide. This release also
includes breaking API changes for the App type. Here's a migration
guide:

* Event handlers now take "BrickEvent n e" instead of "e", where "e"
was the custom event type used before this change. To recover your
own custom events, pattern-match on "AppEvent"; to recover Vty input
events, pattern-match on "VtyEvent".
* appLiftVtyEvent went away and can just be removed from your App
record constructor.
* If you aren't using the custom event type or were just using Vty's
"Event" type as your App's event type, you can set your event type to
just "e" because you'll now be able to get Vty events regardless of
whether you use a custom event type.

API changes:
* Added the Widget combinator "clickable" to indicate that a widget
should generate mouse click events
* Added the Extent data type and the "reportExtent" widget combinator
to report the positions and sizes of widgets
* Rendering "Result" values now include reported extents and update
their offsets (adds "extents" field and "extentsL" lens)
* Added "lookupExtent", "findClickedExtents", and "clickedExtent" in
EventM to find extents and check them for mouse clicks
* Removed appLiftVtyEvent. Instead of wrapping Vty's events in your own
type, you now get a "BrickEvent" that always contains Vty events but
has the ability to embed *your* custom events. See the User Guide for
details.
* Added demo program MouseDemo.hs
* Added demo program ProgressBarDemo.hs (thanks Kevin Quick)
* Added mapAttrname, mapAttrNames, and overrideAttr functions (thanks
Kevin Quick)
* Make handleEventLensed polymorphic over event type to allow use with
custom events (thanks Kevin Quick)
* Added Ord constraint to some library startup functions

Bug fixes:
* Added Show instance for Editor, List (fixes #63)

Documentation changes:
* Updated documentation to use new "resource name" terminology to
reduce confusion and better explain the purpose of names.
* Updated user guide with sections on mouse support, the rendering
cache, resource names, paste mode, and extents

Package changes:
* Depend on Vty 5.11.3 to get mouse mode support

--
Jonathan Daugherty
Reply all
Reply to author
Forward
0 new messages