Commit Graph

75 Commits

Author SHA1 Message Date
Francisco Vallarino
a16e8599df
Prepare release 1.6.0.1 (#314)
* Relax upper bounds for several packages

* Update Changelog
2024-01-08 02:35:36 +01:00
Francisco Vallarino
58b08083e3
Prepare release 1.6.0.0 (#310)
* Upgrade Stackage nightly

* Update Changelog

* Bump version

* Add 'Project status' section to README
2023-12-05 12:58:01 +01:00
Francisco Vallarino
1f6157c93f
Fix build issues with GHC 9.6 (#308) 2023-11-28 00:03:07 +01:00
Francisco Vallarino
5b90aebae9
Improve development time application reload (#239)
* Consider SDL.TextEditingEvent as an action event

* When a frame requires rendering, make sure the next one is also rendered to avoid artifacts. It still does not render every frame

* Fix lint

* Fix typo

* Add foreign-store dependency

* Reuse window and avoid reinitializing SDL when running on ghci and code is reloaded

* Restore previous model and widget root on code changes

* Attempt to check if model's type changed (failed, since fingerprinting is not reliable)

* Add Show instances to various widgets

* Add configuration for fingerprint functions

* Merge new root with stored root, to account for code changes in new root and data in old

* Store the complete MonomerCtx type for app reload

* Use recover-rtti for model change detection

* Process WidgetResult when merging reloaded widget root

* Validate model changes in Composite

* Fix lint

* Fix unit tests

* Force hpack version in monomer.cabal

* Add appDisableModelReuse configuration option to always ignore previous model version

* Minor setup docs update

* Revert to AppConfig only being parameterized by e

* Restore recover-rtti dependency

* Revert "Revert to AppConfig only being parameterized by e"

This reverts commit 0a66513807.

* Revert to previous version without restore-rtti dependency

* Try to overcome build issue by enforcing ubuntu-20.04

* Do not commit .dylib files

* For hpack version

* Fix docs

* Fix missing imports

* Fix typo
2023-02-24 18:14:08 +01:00
Francisco Vallarino
ef4f10a07e
Prepare release 1.5.1.0 (#256)
* Bump version

* Update Changelog
2023-02-05 00:30:57 +01:00
Francisco Vallarino
14c87ef176
Use pkg-config for glew linking (#219)
* Use monomer.cabal with correct bounds for text-show

* Use pkg-config for glew linking

* Use correct pkg-config-dependencies field (as defined in hpack)
2022-10-27 20:08:55 +02:00
Francisco Vallarino
51c87b6f6e
Add "examples" flag to optionally build examples and tutorials (#218)
* Add ignore-examples flag to avoid building examples unless required. Add a small dev-test-app executable to help testing of the library

* Rename ignore-examples to examples, make build logic clearer

* Update monomer.cabal

* Update docs
2022-10-27 18:42:44 +02:00
Francisco Vallarino
5b16417591
Bump text-show version to build on Stackage nightly (#217) 2022-10-22 13:16:51 +02:00
Francisco Vallarino
484fff1043
Release 1.5.0.0 version (#209)
* Update Changelog

* Bump version
2022-10-09 18:22:01 -03:00
klausweiss
619ac2d567
Loading fonts from memory (#199)
* Compiles, doesn't work

* s/FontDefPath/FontDefFile/g

* Some ffi changes

* Rename toUString

* Demo in the todo app. TO BE REVERTED

* Alloc an unsigned char* array for font

* Remove unused language extensions

* Remove unused and sort imports

* Use useAsCStringLen and malloc manually

* Use nanovg from klausweiss/nanovg-hs (TO BE REVERTED)

* Use newer klausweiss/nanovg-hs (TO BE REVERTED)

* Use nanovg 0.8.1 from hackage

* Revert "Demo in the todo app. TO BE REVERTED"

This reverts commit 06d061ae76.

* Add documentation to some functions in FFI.hs

* Unused import

* Improve appFontDef docs

* s/appFontDefMem/appFontDefMemory

* Bump nanovg-hs to 0.8.1 in monomer.nix

* Revert "s/appFontDefMem/appFontDefMemory"

This reverts commit 5403752dbc.

* Reference file-embed in appFontDefMem docs

* s/appFontDefFile/appFontDef

* Stop using record syntax for FontDef

* Revert "Stop using record syntax for FontDef"

This reverts commit 03d16ce9f7.
2022-09-11 07:28:02 -03:00
Francisco Vallarino
55ae7f88f1
Bump version (#151) 2022-05-14 12:00:22 -03:00
Francisco Vallarino
dc3b889ad0
Release 1.4.0.0 (#135)
* Make ColorPicker's sample color use rounded corners

* Bump version to 1.4.0.0

* Fix Haddock links
2022-04-30 15:16:24 -03:00
Francisco Vallarino
5d70174e62
Reduce dependencies on unused or lightly used packages (#70)
* Remove dependency on OpenGL package (keep only OpenGLRaw)

* Remove scientific dependency

* Remove unused unordered-containers dependency

* Remove dependency on Safe package

* Remove directory, HUnit and silently packages dependency from tests section
2022-01-23 17:55:56 -03:00
Francisco Vallarino
f4e4dddd99
Relax upper bounds for packages (#69)
* Relax upper bounds for packages mentioned in https://packdeps.haskellers.com/feed?needle=monomer

* Update Changelog

* Bump version
2022-01-23 12:45:06 -03:00
Francisco Vallarino
f641f99a4b Use correct lower bound for SDL2 2021-10-28 21:08:19 -03:00
Francisco Vallarino
afadfbb60a
Add SetFocusOnKey/MoveFocusFromKey to Composite (#37)
* Add SetFocusOnKey/MoveFocusFromKey to Composite. This makes setting focus from user event handlers more predictable

* Bump version. Update Changelog
2021-10-28 16:33:39 -03:00
Francisco Vallarino
4accc0cb82
Do not run tests involving copy/paste unless environment variable USE_SDL_VIDEO_SUBSYSTEM = 1 (#35) 2021-10-28 11:49:00 -03:00
Francisco Vallarino
a5b2dac8ae Relax aeson upper bounds 2021-10-25 14:47:12 -03:00
Francisco Vallarino
f0934b476d
Replace composite model with user model only on init and merge (#29)
* Use previous model version when calling dispose (current model may make prisms/indexed invalid, causing issues when using singular)

* Only replace composite model with user model on init and merge

* Add new unit test to composite

* Update/improve Changelog

* Bump version
2021-10-06 18:19:15 -03:00
Francisco Vallarino
6fab35c929
Fix mouse wheel/trackpad handling (#27)
* Do not force scroll direction based on Wheel direction argument (axis movement arguments already have that information applied)

* Bump version

* Handle wheel movement at event conversion level. Apply adjustments based on platform

* Restore old naming convention

* Update changelog
2021-10-04 20:06:50 -03:00
Francisco Vallarino
d1f9833626 Bump version. Update Changelog 2021-09-22 18:32:51 -03:00
Francisco Vallarino
4428b126df Add OpenGL example 2021-09-22 18:27:53 -03:00
Francisco Vallarino
2bfe8a8fe8
Fix space leak when rebuilding UI and handling events (#19)
* Basic tests with Strict/StrictData. These will be progressively replaced by strict fields/bang patterns, and also squashed before merging.

* Change pragmas, reduce Strict, replace with StrictData/BangPatterns in containers. Reduce space leaks

* Format package.yaml

* Remove unneeded bangs, restore tutorial main

* Bump version and update Changelog
2021-08-28 21:37:10 -03:00
Francisco Vallarino
7b8eab78ef Use the recently published nanovg-0.8.0.0 from Hackage, instead of the version from the PR's commit. 2021-08-18 09:44:52 -03:00
Francisco Vallarino
6c176979b0 Remove extra GHC flags from tests 2021-08-13 00:22:23 -03:00
Francisco Vallarino
68a8eb786c Export configuration types to have Haddock generate documentation 2021-08-13 00:10:51 -03:00
Francisco Vallarino
4b7dc3eeaf Minor fix in package.yaml 2021-08-09 11:42:03 -03:00
Francisco Vallarino
38bb502596 Remove development helpers/notes 2021-08-09 00:10:32 -03:00
Francisco Vallarino
a2a2d39bc9 Add image to README, navigation links in tutorial. Clarify docs 2021-08-08 19:12:03 -03:00
Francisco Vallarino
027012ea0a Rephrase some sections in docs 2021-08-08 11:51:30 -03:00
Francisco Vallarino
2e46e3aa46 Update version bounds 2021-08-01 01:34:09 -03:00
Francisco Vallarino
a38617c313 Set version bounds. Set Monomer version to 1.0 2021-07-30 23:27:05 -03:00
Francisco Vallarino
8afdafd3c0 Fix dialog styling 2021-07-18 21:36:16 -03:00
Francisco Vallarino
702aea6842 Add threaded flags to examples. Update tasks 2021-07-06 20:39:08 -03:00
Francisco Vallarino
7a6cfc2ac5 Remove usage of locks in NanoVGRenderer and FontManager. In particular, as expected, using them inside unsafePerformIO was a really bad idea 2021-07-06 00:31:00 -03:00
Francisco Vallarino
8839442012 Initial support for continuous windows resize 2021-07-04 23:41:45 -03:00
Francisco Vallarino
edcb106656 Add FontManager, based on nanovg font management logic 2021-07-03 19:39:46 -03:00
Francisco Vallarino
2393bb78b9 Make application DPI aware on Windows, handle window size and event scaling 2021-06-20 15:05:18 -03:00
Francisco Vallarino
a43df6503a Fix Windows build (update to latest nanovg-hs and update package.yaml) 2021-06-19 16:30:09 -03:00
Francisco Vallarino
a09fdabed5 Renumber tutorials again 2021-06-09 23:20:36 -03:00
Francisco Vallarino
798ede6df0 Add Tutorial 02 code 2021-06-08 13:17:18 -03:00
Francisco Vallarino
e09cfc0975 Add styling tutorial 2021-06-08 00:22:21 -03:00
Francisco Vallarino
ba18b1faeb Add initial batch of Haddock documentation 2021-05-28 20:08:01 -03:00
Francisco Vallarino
5fba31a15e Add initial dateField 2021-05-10 00:48:17 -03:00
Francisco Vallarino
0c6d3f67a8 Add initial external link widget 2021-05-02 16:24:30 -03:00
Francisco Vallarino
4efe1ff892 Add initial commit for generative example 2021-04-27 01:03:36 -03:00
Francisco Vallarino
14753e9f0f Remove widgetRestore, related types and logic. Remove CBOR and Serialise dependencies 2021-04-24 15:09:47 -03:00
Francisco Vallarino
1d262fcf09 Show pct variation in producer example. Add cursor combinators to simplify usage 2021-03-14 14:53:30 -03:00
Francisco Vallarino
baf452a612 Split types in ticker example; add keyboard handling 2021-03-12 17:46:22 -03:00
Francisco Vallarino
1c78389211 Initial ticker example 2021-03-12 10:38:38 -03:00