packages feed

GLUT 2.3.0.0 → 2.3.1.0

raw patch · 4 files changed

+41/−5 lines, 4 filesdep ~OpenGLdep ~OpenGLRawdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: OpenGL, OpenGLRaw, base, containers

API changes (from Hackage documentation)

+ Graphics.UI.GLUT.Callbacks.Window: keyboardCallback :: SettableStateVar (Maybe KeyboardCallback)
+ Graphics.UI.GLUT.Callbacks.Window: keyboardUpCallback :: SettableStateVar (Maybe KeyboardCallback)
+ Graphics.UI.GLUT.Callbacks.Window: mouseCallback :: SettableStateVar (Maybe MouseCallback)
+ Graphics.UI.GLUT.Callbacks.Window: specialCallback :: SettableStateVar (Maybe SpecialCallback)
+ Graphics.UI.GLUT.Callbacks.Window: specialUpCallback :: SettableStateVar (Maybe SpecialCallback)
+ Graphics.UI.GLUT.Callbacks.Window: type KeyboardCallback = Char -> Position -> IO ()
+ Graphics.UI.GLUT.Callbacks.Window: type MouseCallback = MouseButton -> KeyState -> Position -> IO ()
+ Graphics.UI.GLUT.Callbacks.Window: type SpecialCallback = SpecialKey -> Position -> IO ()

Files

GLUT.cabal view
@@ -1,5 +1,5 @@ name: GLUT-version: 2.3.0.0+version: 2.3.1.0 license: BSD3 license-file: LICENSE maintainer: Jason Dagit <dagitj@gmail.com>, Sven Panne <sven.panne@aedion.de>@@ -150,10 +150,10 @@    c-sources:       cbits/HsGLUT.c    if flag(split-base)-      build-depends: base >= 3 && < 5, array >= 0.3 && < 0.5, containers >= 0.3 && < 0.5+      build-depends: base >= 3 && < 5, array >= 0.3 && < 0.5, containers >= 0.3 && < 0.6    else       build-depends: base < 3-   build-depends: OpenGL == 2.5.*, OpenGLRaw == 1.2.*, StateVar == 1.0.*, Tensor == 1.0.*+   build-depends: OpenGL == 2.6.*, OpenGLRaw == 1.3.*, StateVar == 1.0.*, Tensor == 1.0.*    ghc-options: -Wall    if os(windows) && flag(UseNativeWindowsLibraries)       cpp-options: "-DCALLCONV=stdcall"
Graphics/UI/GLUT/Callbacks/Window.hs view
@@ -24,6 +24,15 @@    -- * Window close callback    CloseCallback, closeCallback, +   -- * Keyboard callback+   KeyboardCallback, keyboardCallback, keyboardUpCallback,++   -- * Special callback+   SpecialCallback, specialCallback, specialUpCallback,++   -- * Mouse callback+   MouseCallback, mouseCallback,+    -- * Keyboard and mouse input callback    Key(..), SpecialKey(..), MouseButton(..), KeyState(..), Modifiers(..),    KeyboardMouseCallback, keyboardMouseCallback,@@ -276,6 +285,7 @@  -------------------------------------------------------------------------------- +-- | A keyboard callback type KeyboardCallback = Char -> Position -> IO ()  setKeyboardCallback :: Maybe KeyboardCallback -> IO ()@@ -284,6 +294,11 @@    where unmarshal cb c x y = cb (chr (fromIntegral c))                                  (Position (fromIntegral x) (fromIntegral y)) +-- | Controls the keyboard callback for the /current window/. This is+-- activated only when a key is pressed.+keyboardCallback :: SettableStateVar (Maybe KeyboardCallback)+keyboardCallback = makeSettableStateVar setKeyboardCallback+ --------------------------------------------------------------------------------  setKeyboardUpCallback :: Maybe KeyboardCallback -> IO ()@@ -293,6 +308,10 @@    where unmarshal cb c x y = cb (chr (fromIntegral c))                                  (Position (fromIntegral x) (fromIntegral y)) +-- | Controls the keyboard callback for the /current window/. This is+-- activated only when a key is released.+keyboardUpCallback :: SettableStateVar (Maybe KeyboardCallback)+keyboardUpCallback = makeSettableStateVar setKeyboardUpCallback --------------------------------------------------------------------------------  -- | Special keys@@ -355,6 +374,7 @@  -------------------------------------------------------------------------------- +-- | A special key callback type SpecialCallback = SpecialKey -> Position -> IO ()  setSpecialCallback :: Maybe SpecialCallback -> IO ()@@ -363,6 +383,10 @@    where unmarshal cb k x y = cb (unmarshalSpecialKey k)                                  (Position (fromIntegral x) (fromIntegral y)) +-- | Controls the special key callback for the /current window/. This is+-- activated only when a special key is pressed.+specialCallback :: SettableStateVar (Maybe SpecialCallback)+specialCallback = makeSettableStateVar setSpecialCallback --------------------------------------------------------------------------------  setSpecialUpCallback :: Maybe SpecialCallback -> IO ()@@ -371,6 +395,10 @@    where unmarshal cb k x y = cb (unmarshalSpecialKey k)                                  (Position (fromIntegral x) (fromIntegral y)) +-- | Controls the special key callback for the /current window/. This is+-- activated only when a special key is released.+specialUpCallback :: SettableStateVar (Maybe SpecialCallback)+specialUpCallback = makeSettableStateVar setSpecialUpCallback --------------------------------------------------------------------------------  -- | The current state of a key or button@@ -388,6 +416,7 @@  -------------------------------------------------------------------------------- +-- | A mouse callback type MouseCallback = MouseButton -> KeyState -> Position -> IO ()  setMouseCallback :: Maybe MouseCallback -> IO ()@@ -397,6 +426,9 @@                                    (unmarshalKeyState s)                                    (Position (fromIntegral x) (fromIntegral y)) +-- | Controls the mouse callback for the /current window/.+mouseCallback :: SettableStateVar (Maybe MouseCallback)+mouseCallback = makeSettableStateVar setMouseCallback --------------------------------------------------------------------------------  -- | The state of the keyboard modifiers@@ -434,6 +466,10 @@ -- mouse button changes. The callback parameters indicate the new state of the -- key\/button, the state of the keyboard modifiers, and the mouse location in -- window relative coordinates.+--+-- Note that this is a convenience function that should not ordinarily be used+-- in conjunction with `keyboardCallback`, `keyboardUpCallback`,+-- `specialCallback`, `specialUpCallback`, or `mouseCallback`.  keyboardMouseCallback :: SettableStateVar (Maybe KeyboardMouseCallback) keyboardMouseCallback = makeSettableStateVar setKeyboardMouseCallback
Graphics/UI/GLUT/Initialization.hs view
@@ -331,7 +331,7 @@ handleMultisampling spps (WithSamplesPerPixel spp) = (spp : spps, Multisampling) handleMultisampling spps mode                      = (spps, mode) -toBitfield :: (Bits b) => (a -> b) -> [a] -> b+toBitfield :: (Num b, Bits b) => (a -> b) -> [a] -> b toBitfield marshal = foldl (.|.) 0 . map marshal  -- | Contains 'True' if the /current display mode/ is supported, 'False'
Graphics/UI/GLUT/Raw/Functions.hs view
@@ -161,7 +161,7 @@  import Foreign.C.Types import Foreign.Ptr-import Graphics.Rendering.OpenGL.Raw.Core31.TypesInternal+import Graphics.Rendering.OpenGL.Raw.Core31.Types import Graphics.UI.GLUT.Raw.APIEntry import Graphics.UI.GLUT.Raw.Callbacks