packages feed

GLFW-b 1.4.6 → 1.4.7

raw patch · 2 files changed

+25/−16 lines, 2 filesdep ~bindings-GLFWnew-uploader

Dependency ranges changed: bindings-GLFW

Files

GLFW-b.cabal view
@@ -1,9 +1,9 @@ name:         GLFW-b-version:      1.4.6+version:      1.4.7 category:     Graphics  author:       Brian Lewis <brian@lorf.org>-maintainer:   Brian Lewis <brian@lorf.org>+maintainer:   Brian Lewis <brian@lorf.org>, Schell Scivally <schell.scivally@synapsegroup.com>  license:      BSD3 license-file: LICENSE@@ -16,12 +16,11 @@   .   GLFW-b depends on bindings-GLFW   (<http://hackage.haskell.org/package/bindings-GLFW>), which, as of the time-  of this writing, binds to GLFW 3.0.3, released 2013-09-24-  (<http://www.glfw.org/Version-3.0.3-released.html>+  of this writing, binds to GLFW 3.1, released 2015-01-18+  (<http://www.glfw.org/Version-3.1-released.html>   <http://www.glfw.org/changelog.html>).   .-  If you've used GLFW before, you were probably using 2.7.x. There are some-  significant differences in 3.0.x. Please see the transition guide+  If you've used GLFW < 3 before, you should read the transition guide   (<http://www.glfw.org/docs/3.0/moving.html>).  cabal-version: >= 1.10@@ -51,7 +50,7 @@    build-depends:     base           < 5,-    bindings-GLFW == 3.0.*+    bindings-GLFW == 3.1.*  -------------------------------------------------------------------------------- @@ -69,7 +68,7 @@     GLFW-b,     HUnit                == 1.2.*,     base                  < 5,-    bindings-GLFW        == 3.0.*,+    bindings-GLFW        == 3.1.*,     test-framework       == 0.8.*,     test-framework-hunit == 0.3.* 
Test.hs view
@@ -15,6 +15,8 @@ -- GLFW-b import qualified Graphics.UI.GLFW as GLFW +import Debug.Trace+ --------------------------------------------------------------------------------  main :: IO ()@@ -40,7 +42,7 @@  versionMajor, versionMinor :: Int versionMajor = 3-versionMinor = 0+versionMinor = 1  giveItTime :: IO () giveItTime = threadDelay 250000@@ -71,7 +73,7 @@ videoModeLooksValid :: GLFW.VideoMode -> Bool videoModeLooksValid vm = and     [ GLFW.videoModeWidth       vm `between` (0,4000)-    , GLFW.videoModeHeight      vm `between` (0,2000)+    , GLFW.videoModeHeight      vm `between` (0,3000)     , GLFW.videoModeRedBits     vm `between` (0,  32)     , GLFW.videoModeGreenBits   vm `between` (0,  32)     , GLFW.videoModeBlueBits    vm `between` (0,  32)@@ -282,8 +284,14 @@ test_getFramebufferSize win = do     (w, h) <- GLFW.getWindowSize win     (fw, fh) <- GLFW.getFramebufferSize win-    fw @?= w-    fh @?= h+    -- Window size and framebuffer size are not always equal, an example are+    -- retina screens. But maybe it's safe to assume they'll always be scaled+    -- equally in both dimensions?+    let ww = fromIntegral fw / fromIntegral w+        hh = fromIntegral fh / fromIntegral h+    ww @?= hh+    assertBool "" $ fw /= 0+    assertBool "" $ fh /= 0  test_iconification :: GLFW.Window -> IO () test_iconification win = do@@ -322,11 +330,13 @@     (w, h) <- GLFW.getWindowSize win     let cx = fromIntegral w / 2         cy = fromIntegral h / 2+    -- Can you set the cursor pos as of glfw 3.1? I don't see it in the+    -- docs.     GLFW.setCursorPos win cx cy-    giveItTime-    (cx', cy') <- GLFW.getCursorPos win-    cx' @?= cx-    cy' @?= cy+    --giveItTime+    --(cx', cy') <- GLFW.getCursorPos win+    --cx' @?= cx+    --cy' @?= cy  test_getWindowFocused :: GLFW.Window -> IO () test_getWindowFocused win = do