eventloop 0.8.2.0 → 0.8.2.1
raw patch · 3 files changed
+6/−6 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Eventloop.Module.StatefulGraphics: Modified :: StatefulBB -> GraphicPerformed
+ Eventloop.Module.StatefulGraphics: Modified :: StatefulBB -> StatefulBB -> GraphicPerformed
Files
- eventloop.cabal +1/−1
- src/Eventloop/Module/StatefulGraphics/StatefulGraphics.hs +4/−4
- src/Eventloop/Module/StatefulGraphics/Types.hs +1/−1
eventloop.cabal view
@@ -6,7 +6,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change -version: 0.8.2.0 +version: 0.8.2.1 synopsis: A different take on an IO system. Based on Amanda's IO loop, this eventloop takes a function that maps input events to output events. It can easily be extended by modules that represent IO devices or join multiple modules together. description: A different take on an IO system. Based on Amanda's IO loop, this eventloop takes a function that maps input events to output events. It can easily be extended by modules that represent IO devices or join multiple modules together. Each module exists of a initialize and teardown function that are both called once at startup and shutting down. During run-time, a module can provice a preprocessor function (which transforms input events before they get to the eventloop),
src/Eventloop/Module/StatefulGraphics/StatefulGraphics.hs view
@@ -104,7 +104,7 @@ calculateRemove :: StatefulBB -> ClearPart calculateRemove (StatefulBB _ bb)- = ClearRectangle (round $ xMin bb, round $ yMin bb) (round width, round height)+ = ClearRectangle (floor $ xMin bb, floor $ yMin bb) (ceiling width + 1, ceiling height + 1) where height = (yMax bb) - (yMin bb) width = (xMax bb) - (xMin bb)@@ -127,9 +127,9 @@ (toRedraw, toRemove) = calculateRedraws state performed (_, toRedraw', toRemove') = calculateRedrawsForRemoved (state, toRedraw, toRemove) sg -calculateRedraws state ((Modified sg):performed)+calculateRedraws state ((Modified old_sg new_sg):performed) -- noDimChange oldGraphic newGraphic = calculateDraws toCheck toRedraw (Drawn sg) TODO Modified -> Drawn optimalization- = calculateRedraws state ((Removed sg):(Drawn sg):performed)+ = calculateRedraws state ((Removed old_sg):(Drawn new_sg):performed) calculateRedraws state (NoOp:performed) = calculateRedraws state performed@@ -221,7 +221,7 @@ performStatefulGraphicsOut :: GraphicsState -> StatefulGraphicsOut -> (GraphicsState, GraphicPerformed) performStatefulGraphicsOut state (Draw statefulGraphic) = case oldStatefulGraphicM of- Just oldStatefulGraphic -> (state', Modified statefulBB)+ Just oldStatefulGraphic -> (state', Modified oldStatefulGraphic statefulBB) Nothing -> (state', Drawn statefulBB) where statefulBB = (StatefulBB statefulGraphic bb)
src/Eventloop/Module/StatefulGraphics/Types.hs view
@@ -19,7 +19,7 @@ data GraphicPerformed = Drawn StatefulBB- | Modified StatefulBB+ | Modified StatefulBB StatefulBB | Removed StatefulBB | NoOp