GPipe-GLFW 1.4.1 → 1.4.1.1
raw patch · 5 files changed
+63/−5 lines, 5 filesdep ~basePVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Graphics.GPipe.Context.GLFW.Window: getFrameBufferSize :: (ContextHandler ctx, MonadIO m) => Window os c ds -> ContextT ctx os m (V2 Int)
+ Graphics.GPipe.Context.GLFW.Window: getWindowSize :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe (Int, Int))
Files
- CHANGELOG.md +41/−0
- GPipe-GLFW.cabal +5/−4
- src/Graphics/GPipe/Context/GLFW/Calls.hs +5/−0
- src/Graphics/GPipe/Context/GLFW/Input.hs +1/−0
- src/Graphics/GPipe/Context/GLFW/Window.hs +11/−1
+ CHANGELOG.md view
@@ -0,0 +1,41 @@+### 1.4.1.1++* Split changelog to own file (before this, it's located in README.md).+* [lambdael](https://github.com/lambdael) added `glfwGetWindowSize`.+* [Bump upper bound on `base` dependency](https://github.com/fpco/stackage/issues/2670). Bump stack LTS.++### 1.4.1++* Split `Wrapped` module to `Window` and `Misc` modules.+* Don't expose `ErrorCallback`, do expose the `Error` type for custom error callbacks.+* Switch from ad-hoc parenting for shared contexts, to the "ancestor" pattern described in [#24](https://github.com/plredmond/GPipe-GLFW/issues/24#issuecomment-299681824).+* Adjustments to debug logging format.+* Add smoketest for window close functions & sequential GPipe windows.+* Bump deps to `GPipe-2.2.1`++### 1.4.0++* Rewrite for new window handling interface.+* Separate smoke tests to own package.++### 1.3.0++* Overhaul `Graphics.GPipe.Context.GLFW.Input` to expose most of the functionality in [GLFW Input guide](http://www.glfw.org/docs/latest/input_guide.html).++### 1.2.3++* [SwiftsNamesake](https://github.com/SwiftsNamesake) bumped version constraints.+* Add a smoke test and stubs for shared-context tests.++### 1.2.2++* [grtlr](https://github.com/grtlr) added scroll callback registration.+* Add a readme to be a good citizen and update documentation.++### 1.2.1++* [bch29](https://github.com/bch29) refactored and added new GLFW input callback registration functions as well as the `unsafe` module to access the GLFW window directly.++### 1.2++* [bch29](https://github.com/bch29) exposed more of the underlying GLFW hints.
GPipe-GLFW.cabal view
@@ -1,5 +1,5 @@ name: GPipe-GLFW-version: 1.4.1+version: 1.4.1.1 cabal-version: >=1.10 build-type: Simple author: Patrick Redmond@@ -14,12 +14,13 @@ GPipe-GLFW is a utility library to enable the use of GLFW as the OpenGL window and context handler for GPipe. GPipe is a typesafe functional API based on the conceptual model of- OpenGL, but without the imperative state machine.+ OpenGL. maintainer: Patrick Redmond+data-files: CHANGELOG.md library hs-source-dirs: src- build-depends: base >= 4.7 && <4.10+ build-depends: base >= 4.7 && <4.11 , stm >= 2.4 && <2.5 , containers >= 0.5 && <0.6 , async >= 2.1 && <2.3@@ -47,4 +48,4 @@ type: git location: https://github.com/plredmond/GPipe-GLFW.git subdir: GPipe-GLFW- tag: v1.4.1+ tag: v1.4.1.1
src/Graphics/GPipe/Context/GLFW/Calls.hs view
@@ -230,3 +230,8 @@ -- * This function must only be called from the main thread. setDropCallback :: EffectMain -> GLFW.Window -> Maybe GLFW.DropCallback -> IO () setDropCallback onMain window cb = onMain $ GLFW.setDropCallback window cb++-- |+-- * This function must only be called from the main thread.+getWindowSize :: OnMain (Int, Int) -> GLFW.Window -> IO (Int, Int )+getWindowSize onMain window = onMain $ GLFW.getWindowSize window
src/Graphics/GPipe/Context/GLFW/Input.hs view
@@ -160,6 +160,7 @@ import qualified Graphics.GPipe.Context.GLFW.Calls as Call + {- Keyboard -} -- | Register or unregister a callback to receive 'KeyState' changes to any 'Key'.
src/Graphics/GPipe/Context/GLFW/Window.hs view
@@ -23,6 +23,13 @@ setWindowShouldClose, setWindowCloseCallback, +-- ** Window size+getWindowSize,++-- ** Framebuffer size+-- | Reexported from "Graphics.GPipe.Context".+GPipe.getFrameBufferSize,+ -- * Buffer swapping -- | Buffer swapping is initiated via the 'GPipe' @swapBuffers@ function. @@ -35,13 +42,16 @@ -- stdlib import Control.Monad.IO.Class (MonadIO) --thirdparty-import qualified Graphics.GPipe.Context as GPipe (ContextT, Window())+import qualified Graphics.GPipe.Context as GPipe (ContextT, Window(), getFrameBufferSize) --local import Graphics.GPipe.Context.GLFW.Handler (Handle(..)) import qualified Graphics.GPipe.Context.GLFW.Calls as Call import qualified Graphics.GPipe.Context.GLFW.Wrappers as Wrappers -- TODO: function docstrings++getWindowSize :: MonadIO m => GPipe.Window os c ds -> GPipe.ContextT Handle os m (Maybe (Int, Int))+getWindowSize = Wrappers.withWindowRPC Call.getWindowSize windowShouldClose :: MonadIO m => GPipe.Window os c ds -> GPipe.ContextT Handle os m (Maybe Bool) windowShouldClose = Wrappers.withWindow Call.windowShouldClose