GLFW-b 1.4.7 → 1.4.7.1
raw patch · 3 files changed
+29/−27 lines, 3 filesdep ~base
Dependency ranges changed: base
Files
- GLFW-b.cabal +1/−1
- Graphics/UI/GLFW/Types.hs +26/−24
- README.md +2/−2
GLFW-b.cabal view
@@ -1,5 +1,5 @@ name: GLFW-b-version: 1.4.7+version: 1.4.7.1 category: Graphics author: Brian Lewis <brian@lorf.org>
Graphics/UI/GLFW/Types.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-} module Graphics.UI.GLFW.Types where @@ -8,6 +9,7 @@ import Data.IORef (IORef) import Data.Typeable (Typeable) import Foreign.Ptr (Ptr)+import GHC.Generics import Bindings.GLFW @@ -24,7 +26,7 @@ | Error'VersionUnavailable | Error'PlatformError | Error'FormatUnavailable- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) -------------------------------------------------------------------------------- -- Initialization and version information@@ -33,19 +35,19 @@ { versionMajor :: Int , versionMinor :: Int , versionRevision :: Int- } deriving (Data, Eq, Ord, Read, Show, Typeable)+ } deriving (Data, Eq, Ord, Read, Show, Typeable, Generic) -------------------------------------------------------------------------------- -- Monitor handling newtype Monitor = Monitor { unMonitor :: Ptr C'GLFWmonitor- } deriving (Data, Eq, Ord, Show, Typeable)+ } deriving (Data, Eq, Ord, Show, Typeable, Generic) data MonitorState = MonitorState'Connected | MonitorState'Disconnected- deriving (Data, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Eq, Ord, Read, Show, Typeable, Generic) data VideoMode = VideoMode { videoModeWidth :: Int@@ -54,7 +56,7 @@ , videoModeGreenBits :: Int , videoModeBlueBits :: Int , videoModeRefreshRate :: Int- } deriving (Data, Eq, Ord, Read, Show, Typeable)+ } deriving (Data, Eq, Ord, Read, Show, Typeable, Generic) -- It would be bad to give clients a way to construct invalid gamma ramps with -- lists of unequal length, so this constructor should not be exported.@@ -62,7 +64,7 @@ { gammaRampRed :: [Int] , gammaRampGreen :: [Int] , gammaRampBlue :: [Int]- } deriving (Data, Eq, Ord, Read, Show, Typeable)+ } deriving (Data, Eq, Ord, Read, Show, Typeable, Generic) -- Smart constructor for GammaRamp. makeGammaRamp :: [Int] -> [Int] -> [Int] -> Maybe GammaRamp@@ -97,7 +99,7 @@ newtype Window = Window { unWindow :: Ptr C'GLFWwindow- } deriving (Data, Eq, Ord, Show, Typeable)+ } deriving (Data, Eq, Ord, Show, Typeable, Generic) data WindowHint = WindowHint'Resizable Bool@@ -125,34 +127,34 @@ | WindowHint'OpenGLForwardCompat Bool | WindowHint'OpenGLDebugContext Bool | WindowHint'OpenGLProfile OpenGLProfile- deriving (Data, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Eq, Ord, Read, Show, Typeable, Generic) data FocusState = FocusState'Focused | FocusState'Defocused- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data IconifyState = IconifyState'Iconified | IconifyState'NotIconified- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data ContextRobustness = ContextRobustness'NoRobustness | ContextRobustness'NoResetNotification | ContextRobustness'LoseContextOnReset- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data OpenGLProfile = OpenGLProfile'Any | OpenGLProfile'Compat | OpenGLProfile'Core- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data ClientAPI = ClientAPI'OpenGL | ClientAPI'OpenGLES- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) -------------------------------------------------------------------------------- -- Input handling@@ -279,13 +281,13 @@ | Key'RightAlt | Key'RightSuper | Key'Menu- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data KeyState = KeyState'Pressed | KeyState'Released | KeyState'Repeating- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data Joystick = Joystick'1@@ -304,12 +306,12 @@ | Joystick'14 | Joystick'15 | Joystick'16- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data JoystickButtonState = JoystickButtonState'Pressed | JoystickButtonState'Released- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data MouseButton = MouseButton'1@@ -320,40 +322,40 @@ | MouseButton'6 | MouseButton'7 | MouseButton'8- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data MouseButtonState = MouseButtonState'Pressed | MouseButtonState'Released- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data CursorState = CursorState'InWindow | CursorState'NotInWindow- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data CursorInputMode = CursorInputMode'Normal | CursorInputMode'Hidden | CursorInputMode'Disabled- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data StickyKeysInputMode = StickyKeysInputMode'Enabled | StickyKeysInputMode'Disabled- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data StickyMouseButtonsInputMode = StickyMouseButtonsInputMode'Enabled | StickyMouseButtonsInputMode'Disabled- deriving (Data, Enum, Eq, Ord, Read, Show, Typeable)+ deriving (Data, Enum, Eq, Ord, Read, Show, Typeable, Generic) data ModifierKeys = ModifierKeys { modifierKeysShift :: Bool , modifierKeysControl :: Bool , modifierKeysAlt :: Bool , modifierKeysSuper :: Bool- } deriving (Data, Eq, Ord, Read, Show, Typeable)+ } deriving (Data, Eq, Ord, Read, Show, Typeable, Generic) --------------------------------------------------------------------------------
README.md view
@@ -2,12 +2,12 @@ creating windows with OpenGL contexts and managing input and events. GLFW-b depends on [bindings-GLFW][3], which, as of the time of this writing,-binds to GLFW 3.0.1, [released 2013-06-17][4].+binds to GLFW 3.1, [released 2015-01-18][4]. For a demonstration of GLFW-b, see [GLFW-b-demo][5]. [1]: http://www.haskell.org/ [2]: http://www.glfw.org/ [3]: https://github.com/bsl/bindings-GLFW-[4]: http://www.glfw.org/Version-3.0.1-released.html+[4]: http://www.glfw.org/Version-3.1-released.html [5]: https://github.com/bsl/GLFW-b-demo