packages feed

GPipe-GLFW 1.2.1 → 1.2.2

raw patch · 2 files changed

+15/−9 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Graphics.GPipe.Context.GLFW.Input: registerScrollCallback :: MonadIO m => Maybe ScrollCallback -> ContextT GLFWWindow os f m ()
+ Graphics.GPipe.Context.GLFW.Input: type ScrollCallback = Window -> Double -> Double -> IO ()

Files

GPipe-GLFW.cabal view
@@ -1,5 +1,5 @@ name:                GPipe-GLFW-version:             1.2.1+version:             1.2.2 cabal-version:       >=1.10 build-type:          Simple author:              Patrick Redmond@@ -8,12 +8,13 @@ copyright:      Patrick Redmond category:       Graphics stability:      Experimental-synopsis:       GLFW OpenGL context creation for GPipe homepage:       https://github.com/plredmond/GPipe-GLFW+synopsis:       GLFW OpenGL context creation for GPipe description:-                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.-                See the GPipe package and resources for more information.+                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. maintainer:     Patrick Redmond  library@@ -42,4 +43,4 @@   type:     git   location: git@github.com:plredmond/GPipe-GLFW.git   subdir:   GPipe-GLFW-  tag:      v1.2.1+  tag:      v1.2.2
src/Graphics/GPipe/Context/GLFW/Input.hs view
@@ -6,17 +6,18 @@   getCursorPos,   getMouseButton,   getKey,+  registerScrollCallback,   windowShouldClose,   -- * Re-exported from GLFW-  MouseButtonState(..), MouseButton(..), KeyState(..), Key(..)+  MouseButtonState(..), MouseButton(..), KeyState(..), Key(..), ScrollCallback ) where  import Graphics.GPipe.Context.GLFW.Unsafe (GLFWWindow(..))  import Control.Monad.IO.Class (MonadIO) import Graphics.GPipe.Context (ContextT, withContextWindow)-import qualified Graphics.UI.GLFW as GLFW (getCursorPos, getMouseButton, getKey, windowShouldClose)-import Graphics.UI.GLFW (MouseButtonState(..), MouseButton(..), KeyState(..), Key(..))+import qualified Graphics.UI.GLFW as GLFW (getCursorPos, getMouseButton, getKey, windowShouldClose, setScrollCallback)+import Graphics.UI.GLFW (MouseButtonState(..), MouseButton(..), KeyState(..), Key(..), ScrollCallback)  -- | Gets the current cursor position, in pixels relative to the top-left corner -- of the window.@@ -30,6 +31,10 @@ -- | Gets the state of the specified 'Key'. getKey :: MonadIO m => Key -> ContextT GLFWWindow os f m KeyState getKey k = withContextWindow (\(GLFWWindow w) -> GLFW.getKey w k)++-- | Registers the specified 'ScrollCallback'.+registerScrollCallback :: MonadIO m => Maybe ScrollCallback -> ContextT GLFWWindow os f m ()+registerScrollCallback callback = withContextWindow (\win -> GLFW.setScrollCallback (getGLFWWindow win) callback)  -- | Returns 'True' if the window should close (e.g. because the user pressed -- the \'x\' button).