packages feed

moffy-samples-events 0.1.1.0 → 0.2.1.0

raw patch · 3 files changed

+13/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Control.Moffy.Samples.Followbox.Event: type FollowboxEv = GetThreadId :- LockEv :+: RandomEv :+: DeleteEvent :- MouseEv :+: StoreJsons :- LoadJsons :- HttpGet :- CalcTextExtents :- GetTimeZone :- Browse :- BeginSleep :- EndSleep :- RaiseError :- 'Nil
+ Control.Moffy.Samples.Followbox.Event: type FollowboxEv = SetArea :- GetArea :- GetThreadId :- LockEv :+: RandomEv :+: DeleteEvent :- MouseEv :+: StoreJsons :- LoadJsons :- HttpGet :- CalcTextExtents :- GetTimeZone :- Browse :- BeginSleep :- EndSleep :- RaiseError :- 'Nil
- Control.Moffy.Samples.Followbox.Handle: handleFollowboxWith :: (Maybe DiffTime -> f -> Handle' IO (CalcTextExtents :- GuiEv)) -> f -> Browser -> Maybe GithubNameToken -> HandleF IO (GuiEv :+: FollowboxEv)
+ Control.Moffy.Samples.Followbox.Handle: handleFollowboxWith :: (Maybe DiffTime -> f -> Handle' IO (CalcTextExtents :- GuiEv)) -> f -> TVar (Map Int (Point, Point)) -> Browser -> Maybe GithubNameToken -> HandleF IO (GuiEv :+: FollowboxEv)

Files

moffy-samples-events.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           moffy-samples-events-version:        0.1.1.0+version:        0.2.1.0 synopsis:       Events for sample codes of moffy description:    Please see the README on GitHub at <https://github.com/YoshikuniJujo/moffy-samples-events#readme> category:       Control
src/Control/Moffy/Samples/Followbox/Event.hs view
@@ -46,6 +46,8 @@  import Control.Moffy.Samples.Followbox.TypeSynonym (Uri, ErrorMessage) +import Control.Moffy.Samples.Event.Area+ ---------------------------------------------------------------------------  -- * STORE AND LOAD JSON OBJECT LIST@@ -176,7 +178,8 @@ type SigF s = Sig s FollowboxEv type ReactF s r = React s FollowboxEv r -type FollowboxEv = GetThreadId :- LockEv :+: RandomEv :+: DeleteEvent :- MouseEv :+:+type FollowboxEv = SetArea :- GetArea :-+	GetThreadId :- LockEv :+: RandomEv :+: DeleteEvent :- MouseEv :+: 	StoreJsons :- LoadJsons :- HttpGet :- CalcTextExtents :- GetTimeZone :- 	Browse :- BeginSleep :- EndSleep :- RaiseError :- 'Nil 
src/Control/Moffy/Samples/Followbox/Handle.hs view
@@ -44,6 +44,11 @@  import Data.OneOrMoreApp as Ooma +import Control.Concurrent.STM+import Control.Moffy.Samples.Handle.Area qualified as A+import Control.Moffy.Samples.Event.Area qualified as A+import Data.Map (Map)+ ---------------------------------------------------------------------------  -- * STATE@@ -101,9 +106,10 @@  handleFollowboxWith :: 	(Maybe DiffTime -> f -> Handle' IO (CalcTextExtents :- GuiEv)) ->-	f -> Browser -> Maybe GithubNameToken ->+	f -> TVar (Map Int (A.Point, A.Point)) -> Browser -> Maybe GithubNameToken -> 	HandleF IO (GuiEv :+: FollowboxEv)-handleFollowboxWith h f brws mba = retrySt $+handleFollowboxWith h f va brws mba = retrySt $+	liftHandle' (A.handle va) `mergeSt` 	liftHandle' handleGetThreadId `mergeSt` handleLock `mergeSt` 	handleRandom `mergeSt` 	handleStoreJsons `mergeSt` handleLoadJsons `mergeSt`