diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,4 +12,16 @@
 
 ## Version 4.5.0.6
 _24 November 2022_
-- Fixed `Font` marshalling ([#6](https://github.com/Anut-py/h-raylib/issues/6))
+
+\[[#6](https://github.com/Anut-py/h-raylib/issues/6)\]
+
+- Fixed `Font` marshalling
+
+## Version 4.5.0.7
+_26 November 2022_
+
+\[[#7](https://github.com/Anut-py/h-raylib/pull/7)\]
+
+- Removed all constants that were enums in the original C API and replaced them with sum types deriving Enum
+- Removed some CInt usage in the main API
+- Removed `Raylib.Constants`
diff --git a/h-raylib.cabal b/h-raylib.cabal
--- a/h-raylib.cabal
+++ b/h-raylib.cabal
@@ -1,6 +1,6 @@
 cabal-version:      2.4
 name:               h-raylib
-version:            4.5.0.6
+version:            4.5.0.7
 synopsis:           Raylib bindings for Haskell
 category:           graphics
 description:
@@ -65,7 +65,6 @@
   exposed-modules:
     Raylib
     Raylib.Colors
-    Raylib.Constants
     Raylib.Types
 
   other-modules:    Raylib.Util
diff --git a/src/Raylib.hs b/src/Raylib.hs
--- a/src/Raylib.hs
+++ b/src/Raylib.hs
@@ -63,8 +63,25 @@
     VrDeviceInfo,
     VrStereoConfig,
     Wave (wave'channels, wave'frameCount),
+    MouseButton,
+    MouseCursor,
+    TraceLogLevel,
+    CameraMode,
+    Gesture,
+    BlendMode,
+    CubemapLayout,
+    FontType,
+    TextureWrap,
+    TextureFilter,
+    ConfigFlag,
+    KeyboardKey,
+    GamepadButton,
+    GamepadAxis,
+    ShaderLocationIndex,
+    ShaderUniformDataType,
+    PixelFormat
   )
-import Raylib.Util (pop, withArray2D)
+import Raylib.Util (pop, withArray2D, configsToBitflag)
 import Prelude hiding (length)
 
 -- Haskell doesn't support varargs in foreign calls, so these functions are impossible to call from FFI
@@ -226,8 +243,8 @@
   c'isWindowState ::
     CUInt -> IO CBool
 
-isWindowState :: Integer -> IO Bool
-isWindowState flag = toBool <$> c'isWindowState (fromIntegral flag)
+isWindowState :: [ConfigFlag] -> IO Bool
+isWindowState flags = toBool <$> c'isWindowState (fromIntegral $ configsToBitflag flags)
 
 foreign import ccall safe "raylib.h &IsWindowState"
   p'isWindowState ::
@@ -237,8 +254,8 @@
   c'setWindowState ::
     CUInt -> IO ()
 
-setWindowState :: Integer -> IO ()
-setWindowState = c'setWindowState . fromIntegral
+setWindowState :: [ConfigFlag] -> IO ()
+setWindowState = c'setWindowState . fromIntegral . configsToBitflag
 
 foreign import ccall safe "raylib.h &SetWindowState"
   p'setWindowState ::
@@ -248,8 +265,8 @@
   c'clearWindowState ::
     CUInt -> IO ()
 
-clearWindowState :: Integer -> IO ()
-clearWindowState = c'clearWindowState . fromIntegral
+clearWindowState :: [ConfigFlag] -> IO ()
+clearWindowState = c'clearWindowState . fromIntegral . configsToBitflag
 
 foreign import ccall safe "raylib.h &ClearWindowState"
   p'clearWindowState ::
@@ -745,8 +762,8 @@
   c'beginBlendMode ::
     CInt -> IO ()
 
-beginBlendMode :: Int -> IO ()
-beginBlendMode = c'beginBlendMode . fromIntegral
+beginBlendMode :: BlendMode -> IO ()
+beginBlendMode = c'beginBlendMode . fromIntegral . fromEnum
 
 foreign import ccall safe "raylib.h &BeginBlendMode"
   p'beginBlendMode ::
@@ -852,8 +869,10 @@
 
 foreign import ccall safe "bindings.h SetShaderValue_" c'setShaderValue :: Ptr Raylib.Types.Shader -> CInt -> Ptr () -> CInt -> IO ()
 
-setShaderValue :: Raylib.Types.Shader -> Int -> Ptr () -> Int -> IO ()
-setShaderValue shader locIndex value uniformType = with shader (\s -> c'setShaderValue s (fromIntegral locIndex) value (fromIntegral uniformType))
+-- TODO: This `ShaderLocationIndex` might be a wrong type, this should be examined at a later date
+-- This goes for the other functions below as well using it
+setShaderValue :: Raylib.Types.Shader -> ShaderLocationIndex -> Ptr () -> ShaderUniformDataType -> IO ()
+setShaderValue shader locIndex value uniformType = with shader (\s -> c'setShaderValue s (fromIntegral $ fromEnum locIndex) value (fromIntegral $ fromEnum uniformType))
 
 foreign import ccall safe "raylib.h &SetShaderValue"
   p'setShaderValue ::
@@ -861,8 +880,8 @@
 
 foreign import ccall safe "bindings.h SetShaderValueV_" c'setShaderValueV :: Ptr Raylib.Types.Shader -> CInt -> Ptr () -> CInt -> CInt -> IO ()
 
-setShaderValueV :: Raylib.Types.Shader -> Int -> Ptr () -> Int -> Int -> IO ()
-setShaderValueV shader locIndex value uniformType count = with shader (\s -> c'setShaderValueV s (fromIntegral locIndex) value (fromIntegral uniformType) (fromIntegral count))
+setShaderValueV :: Raylib.Types.Shader -> ShaderLocationIndex -> Ptr () -> ShaderUniformDataType -> Int -> IO ()
+setShaderValueV shader locIndex value uniformType count = with shader (\s -> c'setShaderValueV s (fromIntegral $ fromEnum locIndex) value (fromIntegral $ fromEnum uniformType) (fromIntegral count))
 
 foreign import ccall safe "raylib.h &SetShaderValueV"
   p'setShaderValueV ::
@@ -870,8 +889,8 @@
 
 foreign import ccall safe "bindings.h SetShaderValueMatrix_" c'setShaderValueMatrix :: Ptr Raylib.Types.Shader -> CInt -> Ptr Raylib.Types.Matrix -> IO ()
 
-setShaderValueMatrix :: Raylib.Types.Shader -> Int -> Raylib.Types.Matrix -> IO ()
-setShaderValueMatrix shader locIndex mat = with shader (\s -> with mat (c'setShaderValueMatrix s (fromIntegral locIndex)))
+setShaderValueMatrix :: Raylib.Types.Shader -> ShaderLocationIndex -> Raylib.Types.Matrix -> IO ()
+setShaderValueMatrix shader locIndex mat = with shader (\s -> with mat (c'setShaderValueMatrix s (fromIntegral $ fromEnum locIndex)))
 
 foreign import ccall safe "raylib.h &SetShaderValueMatrix"
   p'setShaderValueMatrix ::
@@ -879,8 +898,8 @@
 
 foreign import ccall safe "bindings.h SetShaderValueTexture_" c'setShaderValueTexture :: Ptr Raylib.Types.Shader -> CInt -> Ptr Raylib.Types.Texture -> IO ()
 
-setShaderValueTexture :: Raylib.Types.Shader -> Int -> Raylib.Types.Texture -> IO ()
-setShaderValueTexture shader locIndex tex = with shader (\s -> with tex (c'setShaderValueTexture s (fromIntegral locIndex)))
+setShaderValueTexture :: Raylib.Types.Shader -> ShaderLocationIndex -> Raylib.Types.Texture -> IO ()
+setShaderValueTexture shader locIndex tex = with shader (\s -> with tex (c'setShaderValueTexture s (fromIntegral $ fromEnum locIndex)))
 
 foreign import ccall safe "raylib.h &SetShaderValueTexture"
   p'setShaderValueTexture ::
@@ -1050,8 +1069,8 @@
   c'traceLog ::
     CInt -> CString -> IO () -- Uses varags, can't implement complete functionality
 
-traceLog :: Int -> String -> IO ()
-traceLog logLevel text = withCString text $ c'traceLog $ fromIntegral logLevel
+traceLog :: TraceLogLevel -> String -> IO ()
+traceLog logLevel text = withCString text $ c'traceLog $ fromIntegral $ fromEnum logLevel
 
 foreign import ccall safe "raylib.h &TraceLog"
   p'traceLog ::
@@ -1061,8 +1080,8 @@
   c'setTraceLogLevel ::
     CInt -> IO ()
 
-setTraceLogLevel :: Int -> IO ()
-setTraceLogLevel logLevel = c'setTraceLogLevel $ fromIntegral logLevel
+setTraceLogLevel :: TraceLogLevel -> IO ()
+setTraceLogLevel = c'setTraceLogLevel . fromIntegral . fromEnum
 
 foreign import ccall safe "raylib.h &SetTraceLogLevel"
   p'setTraceLogLevel ::
@@ -1548,8 +1567,8 @@
   c'isKeyPressed ::
     CInt -> IO CBool
 
-isKeyPressed :: Int -> IO Bool
-isKeyPressed key = toBool <$> c'isKeyPressed (fromIntegral key)
+isKeyPressed :: KeyboardKey -> IO Bool
+isKeyPressed key = toBool <$> c'isKeyPressed (fromIntegral $ fromEnum key)
 
 foreign import ccall safe "raylib.h &IsKeyPressed"
   p'isKeyPressed ::
@@ -1559,8 +1578,8 @@
   c'isKeyDown ::
     CInt -> IO CBool
 
-isKeyDown :: Int -> IO Bool
-isKeyDown key = toBool <$> c'isKeyDown (fromIntegral key)
+isKeyDown :: KeyboardKey -> IO Bool
+isKeyDown key = toBool <$> c'isKeyDown (fromIntegral $ fromEnum key)
 
 foreign import ccall safe "raylib.h &IsKeyDown"
   p'isKeyDown ::
@@ -1570,8 +1589,8 @@
   c'isKeyReleased ::
     CInt -> IO CBool
 
-isKeyReleased :: Int -> IO Bool
-isKeyReleased key = toBool <$> c'isKeyReleased (fromIntegral key)
+isKeyReleased :: KeyboardKey -> IO Bool
+isKeyReleased key = toBool <$> c'isKeyReleased (fromIntegral $ fromEnum key)
 
 foreign import ccall safe "raylib.h &IsKeyReleased"
   p'isKeyReleased ::
@@ -1581,8 +1600,8 @@
   c'isKeyUp ::
     CInt -> IO CBool
 
-isKeyUp :: Int -> IO Bool
-isKeyUp key = toBool <$> c'isKeyUp (fromIntegral key)
+isKeyUp :: KeyboardKey -> IO Bool
+isKeyUp key = toBool <$> c'isKeyUp (fromIntegral $ fromEnum key)
 
 foreign import ccall safe "raylib.h &IsKeyUp"
   p'isKeyUp ::
@@ -1592,8 +1611,8 @@
   c'setExitKey ::
     CInt -> IO ()
 
-setExitKey :: Int -> IO ()
-setExitKey = c'setExitKey . fromIntegral
+setExitKey :: KeyboardKey -> IO ()
+setExitKey = c'setExitKey . fromIntegral . fromEnum
 
 foreign import ccall safe "raylib.h &SetExitKey"
   p'setExitKey ::
@@ -1603,8 +1622,8 @@
   c'getKeyPressed ::
     IO CInt
 
-getKeyPressed :: IO Int
-getKeyPressed = fromIntegral <$> c'getKeyPressed
+getKeyPressed :: IO KeyboardKey
+getKeyPressed = toEnum . fromIntegral <$> c'getKeyPressed
 
 foreign import ccall safe "raylib.h &GetKeyPressed"
   p'getKeyPressed ::
@@ -1647,8 +1666,8 @@
   c'isGamepadButtonPressed ::
     CInt -> CInt -> IO CBool
 
-isGamepadButtonPressed :: Int -> Int -> IO Bool
-isGamepadButtonPressed gamepad button = toBool <$> c'isGamepadButtonPressed (fromIntegral gamepad) (fromIntegral button)
+isGamepadButtonPressed :: Int -> GamepadButton -> IO Bool
+isGamepadButtonPressed gamepad button = toBool <$> c'isGamepadButtonPressed (fromIntegral gamepad) (fromIntegral $ fromEnum button)
 
 foreign import ccall safe "raylib.h &IsGamepadButtonPressed"
   p'isGamepadButtonPressed ::
@@ -1658,8 +1677,8 @@
   c'isGamepadButtonDown ::
     CInt -> CInt -> IO CBool
 
-isGamepadButtonDown :: Int -> Int -> IO Bool
-isGamepadButtonDown gamepad button = toBool <$> c'isGamepadButtonDown (fromIntegral gamepad) (fromIntegral button)
+isGamepadButtonDown :: Int -> GamepadButton -> IO Bool
+isGamepadButtonDown gamepad button = toBool <$> c'isGamepadButtonDown (fromIntegral gamepad) (fromIntegral $ fromEnum button)
 
 foreign import ccall safe "raylib.h &IsGamepadButtonDown"
   p'isGamepadButtonDown ::
@@ -1669,8 +1688,8 @@
   c'isGamepadButtonReleased ::
     CInt -> CInt -> IO CBool
 
-isGamepadButtonReleased :: Int -> Int -> IO Bool
-isGamepadButtonReleased gamepad button = toBool <$> c'isGamepadButtonReleased (fromIntegral gamepad) (fromIntegral button)
+isGamepadButtonReleased :: Int -> GamepadButton -> IO Bool
+isGamepadButtonReleased gamepad button = toBool <$> c'isGamepadButtonReleased (fromIntegral gamepad) (fromIntegral $ fromEnum button)
 
 foreign import ccall safe "raylib.h &IsGamepadButtonReleased"
   p'isGamepadButtonReleased ::
@@ -1680,8 +1699,8 @@
   c'isGamepadButtonUp ::
     CInt -> CInt -> IO CBool
 
-isGamepadButtonUp :: Int -> Int -> IO Bool
-isGamepadButtonUp gamepad button = toBool <$> c'isGamepadButtonUp (fromIntegral gamepad) (fromIntegral button)
+isGamepadButtonUp :: Int -> GamepadButton -> IO Bool
+isGamepadButtonUp gamepad button = toBool <$> c'isGamepadButtonUp (fromIntegral gamepad) (fromIntegral $ fromEnum button)
 
 foreign import ccall safe "raylib.h &IsGamepadButtonUp"
   p'isGamepadButtonUp ::
@@ -1691,8 +1710,8 @@
   c'getGamepadButtonPressed ::
     IO CInt
 
-getGamepadButtonPressed :: IO Int
-getGamepadButtonPressed = fromIntegral <$> c'getGamepadButtonPressed
+getGamepadButtonPressed :: IO GamepadButton
+getGamepadButtonPressed = toEnum . fromIntegral <$> c'getGamepadButtonPressed
 
 foreign import ccall safe "raylib.h &GetGamepadButtonPressed"
   p'getGamepadButtonPressed ::
@@ -1713,8 +1732,8 @@
   c'getGamepadAxisMovement ::
     CInt -> CInt -> IO CFloat
 
-getGamepadAxisMovement :: Int -> Int -> IO Float
-getGamepadAxisMovement gamepad axis = realToFrac <$> c'getGamepadAxisMovement (fromIntegral gamepad) (fromIntegral axis)
+getGamepadAxisMovement :: Int -> GamepadAxis -> IO Float
+getGamepadAxisMovement gamepad axis = realToFrac <$> c'getGamepadAxisMovement (fromIntegral gamepad) (fromIntegral $ fromEnum axis)
 
 foreign import ccall safe "raylib.h &GetGamepadAxisMovement"
   p'getGamepadAxisMovement ::
@@ -1735,8 +1754,8 @@
   c'isMouseButtonPressed ::
     CInt -> IO CBool
 
-isMouseButtonPressed :: Int -> IO Bool
-isMouseButtonPressed button = toBool <$> c'isMouseButtonPressed (fromIntegral button)
+isMouseButtonPressed :: MouseButton -> IO Bool
+isMouseButtonPressed button = toBool <$> c'isMouseButtonPressed (fromIntegral $ fromEnum button)
 
 foreign import ccall safe "raylib.h &IsMouseButtonPressed"
   p'isMouseButtonPressed ::
@@ -1746,8 +1765,8 @@
   c'isMouseButtonDown ::
     CInt -> IO CBool
 
-isMouseButtonDown :: Int -> IO Bool
-isMouseButtonDown button = toBool <$> c'isMouseButtonDown (fromIntegral button)
+isMouseButtonDown :: MouseButton -> IO Bool
+isMouseButtonDown button = toBool <$> c'isMouseButtonDown (fromIntegral $ fromEnum button)
 
 foreign import ccall safe "raylib.h &IsMouseButtonDown"
   p'isMouseButtonDown ::
@@ -1757,8 +1776,8 @@
   c'isMouseButtonReleased ::
     CInt -> IO CBool
 
-isMouseButtonReleased :: Int -> IO Bool
-isMouseButtonReleased button = toBool <$> c'isMouseButtonReleased (fromIntegral button)
+isMouseButtonReleased :: MouseButton -> IO Bool
+isMouseButtonReleased button = toBool <$> c'isMouseButtonReleased (fromIntegral $ fromEnum button)
 
 foreign import ccall safe "raylib.h &IsMouseButtonReleased"
   p'isMouseButtonReleased ::
@@ -1768,8 +1787,8 @@
   c'isMouseButtonUp ::
     CInt -> IO CBool
 
-isMouseButtonUp :: Int -> IO Bool
-isMouseButtonUp button = toBool <$> c'isMouseButtonUp (fromIntegral button)
+isMouseButtonUp :: MouseButton -> IO Bool
+isMouseButtonUp button = toBool <$> c'isMouseButtonUp (fromIntegral $ fromEnum button)
 
 foreign import ccall safe "raylib.h &IsMouseButtonUp"
   p'isMouseButtonUp ::
@@ -1872,8 +1891,8 @@
   c'setMouseCursor ::
     CInt -> IO ()
 
-setMouseCursor :: Int -> IO ()
-setMouseCursor cursor = c'setMouseCursor $ fromIntegral cursor
+setMouseCursor :: MouseCursor -> IO ()
+setMouseCursor cursor = c'setMouseCursor . fromIntegral $ fromEnum cursor
 
 foreign import ccall safe "raylib.h &SetMouseCursor"
   p'setMouseCursor ::
@@ -1947,8 +1966,8 @@
   c'isGestureDetected ::
     CInt -> IO CBool
 
-isGestureDetected :: Int -> IO Bool
-isGestureDetected gesture = toBool <$> c'isGestureDetected (fromIntegral gesture)
+isGestureDetected :: Gesture -> IO Bool
+isGestureDetected gesture = toBool <$> c'isGestureDetected (fromIntegral $ fromEnum gesture)
 
 foreign import ccall safe "raylib.h &IsGestureDetected"
   p'isGestureDetected ::
@@ -1958,8 +1977,8 @@
   c'getGestureDetected ::
     IO CInt
 
-getGestureDetected :: IO Int
-getGestureDetected = fromIntegral <$> c'getGestureDetected
+getGestureDetected :: IO Gesture
+getGestureDetected = toEnum . fromIntegral <$> c'getGestureDetected
 
 foreign import ccall safe "raylib.h &GetGestureDetected"
   p'getGestureDetected ::
@@ -2018,8 +2037,8 @@
 
 foreign import ccall safe "bindings.h SetCameraMode_" c'setCameraMode :: Ptr Raylib.Types.Camera3D -> CInt -> IO ()
 
-setCameraMode :: Raylib.Types.Camera3D -> Int -> IO ()
-setCameraMode camera mode = with camera (\c -> c'setCameraMode c (fromIntegral mode))
+setCameraMode :: Raylib.Types.Camera3D -> CameraMode -> IO ()
+setCameraMode camera mode = with camera (\c -> c'setCameraMode c (fromIntegral $ fromEnum mode))
 
 foreign import ccall safe "raylib.h &SetCameraMode"
   p'setCameraMode ::
@@ -2684,7 +2703,7 @@
 
 loadImageRaw :: String -> Int -> Int -> Int -> Int -> IO Raylib.Types.Image
 loadImageRaw fileName width height format headerSize =
-  withCString fileName (\str -> c'loadImageRaw str (fromIntegral width) (fromIntegral height) (fromIntegral format) (fromIntegral headerSize)) >>= pop
+  withCString fileName (\str -> c'loadImageRaw str (fromIntegral width) (fromIntegral height) (fromIntegral $ fromEnum format) (fromIntegral headerSize)) >>= pop
 
 foreign import ccall safe "raylib.h &LoadImageRaw"
   p'loadImageRaw ::
@@ -2896,9 +2915,9 @@
   c'imageFormat ::
     Ptr Raylib.Types.Image -> CInt -> IO ()
 
-imageFormat :: Raylib.Types.Image -> Int -> IO Raylib.Types.Image
+imageFormat :: Raylib.Types.Image -> PixelFormat -> IO Raylib.Types.Image
 imageFormat image newFormat =
-  with image (\i -> c'imageFormat i (fromIntegral newFormat) >> peek i)
+  with image (\i -> c'imageFormat i (fromIntegral $ fromEnum newFormat) >> peek i)
 
 foreign import ccall safe "raylib.h &ImageFormat"
   p'imageFormat ::
@@ -3374,8 +3393,8 @@
 
 foreign import ccall safe "bindings.h LoadTextureCubemap_" c'loadTextureCubemap :: Ptr Raylib.Types.Image -> CInt -> IO (Ptr Raylib.Types.Texture)
 
-loadTextureCubemap :: Raylib.Types.Image -> Int -> IO Raylib.Types.Texture
-loadTextureCubemap image layout = with image (\i -> c'loadTextureCubemap i (fromIntegral layout)) >>= pop
+loadTextureCubemap :: Raylib.Types.Image -> CubemapLayout -> IO Raylib.Types.Texture
+loadTextureCubemap image layout = with image (\i -> c'loadTextureCubemap i (fromIntegral $ fromEnum layout)) >>= pop
 
 foreign import ccall safe "raylib.h &LoadTextureCubemap"
   p'loadTextureCubemap ::
@@ -3439,8 +3458,8 @@
 
 foreign import ccall safe "bindings.h SetTextureFilter_" c'setTextureFilter :: Ptr Raylib.Types.Texture -> CInt -> IO ()
 
-setTextureFilter :: Raylib.Types.Texture -> Int -> IO Raylib.Types.Texture
-setTextureFilter texture filterType = with texture (\t -> c'setTextureFilter t (fromIntegral filterType) >> peek t)
+setTextureFilter :: Raylib.Types.Texture -> TextureFilter -> IO Raylib.Types.Texture
+setTextureFilter texture filterType = with texture (\t -> c'setTextureFilter t (fromIntegral $ fromEnum filterType) >> peek t)
 
 foreign import ccall safe "raylib.h &SetTextureFilter"
   p'setTextureFilter ::
@@ -3448,8 +3467,8 @@
 
 foreign import ccall safe "bindings.h SetTextureWrap_" c'setTextureWrap :: Ptr Raylib.Types.Texture -> CInt -> IO ()
 
-setTextureWrap :: Raylib.Types.Texture -> Int -> IO Raylib.Types.Texture
-setTextureWrap texture wrap = with texture (\t -> c'setTextureWrap t (fromIntegral wrap) >> peek t)
+setTextureWrap :: Raylib.Types.Texture -> TextureWrap -> IO Raylib.Types.Texture
+setTextureWrap texture wrap = with texture (\t -> c'setTextureWrap t (fromIntegral $ fromEnum wrap) >> peek t)
 
 foreign import ccall safe "raylib.h &SetTextureWrap"
   p'setTextureWrap ::
@@ -3457,7 +3476,7 @@
 
 foreign import ccall safe "bindings.h DrawTexture_" c'drawTexture :: Ptr Raylib.Types.Texture -> CInt -> CInt -> Ptr Raylib.Types.Color -> IO ()
 
-drawTexture :: Raylib.Types.Texture -> CInt -> CInt -> Raylib.Types.Color -> IO ()
+drawTexture :: Raylib.Types.Texture -> Int -> Int -> Raylib.Types.Color -> IO ()
 drawTexture texture x y tint = with texture (\t -> with tint (c'drawTexture t (fromIntegral x) (fromIntegral y)))
 
 foreign import ccall safe "raylib.h &DrawTexture"
@@ -3592,8 +3611,8 @@
 
 foreign import ccall safe "bindings.h GetPixelColor_" c'getPixelColor :: Ptr () -> CInt -> IO (Ptr Raylib.Types.Color)
 
-getPixelColor :: Ptr () -> Int -> IO Raylib.Types.Color
-getPixelColor srcPtr format = c'getPixelColor srcPtr (fromIntegral format) >>= pop
+getPixelColor :: Ptr () -> PixelFormat -> IO Raylib.Types.Color
+getPixelColor srcPtr format = c'getPixelColor srcPtr (fromIntegral $ fromEnum format) >>= pop
 
 foreign import ccall safe "raylib.h &GetPixelColor"
   p'getPixelColor ::
@@ -3601,8 +3620,8 @@
 
 foreign import ccall safe "bindings.h SetPixelColor_" c'setPixelColor :: Ptr () -> Ptr Raylib.Types.Color -> CInt -> IO ()
 
-setPixelColor :: Ptr () -> Raylib.Types.Color -> Int -> IO ()
-setPixelColor dstPtr color format = with color (\c -> c'setPixelColor dstPtr c (fromIntegral format))
+setPixelColor :: Ptr () -> Raylib.Types.Color -> PixelFormat -> IO ()
+setPixelColor dstPtr color format = with color (\c -> c'setPixelColor dstPtr c (fromIntegral $ fromEnum format))
 
 foreign import ccall safe "raylib.h &SetPixelColor"
   p'setPixelColor ::
@@ -3612,8 +3631,8 @@
   c'getPixelDataSize ::
     CInt -> CInt -> CInt -> IO CInt
 
-getPixelDataSize :: Int -> Int -> Int -> Int
-getPixelDataSize width height format = unsafePerformIO (fromIntegral <$> c'getPixelDataSize (fromIntegral width) (fromIntegral height) (fromIntegral format))
+getPixelDataSize :: Int -> Int -> PixelFormat -> Int
+getPixelDataSize width height format = unsafePerformIO (fromIntegral <$> c'getPixelDataSize (fromIntegral width) (fromIntegral height) (fromIntegral $ fromEnum format))
 
 foreign import ccall safe "raylib.h &GetPixelDataSize"
   p'getPixelDataSize ::
@@ -3668,15 +3687,14 @@
   c'loadFontData ::
     Ptr CUChar -> CInt -> CInt -> Ptr CInt -> CInt -> CInt -> IO (Ptr Raylib.Types.GlyphInfo)
 
-loadFontData :: [Integer] -> Int -> [Int] -> Int -> Int -> IO Raylib.Types.GlyphInfo
-loadFontData fileData fontSize fontChars glyphCount fontType = withArrayLen (map fromIntegral fileData) (\size d -> withArray (map fromIntegral fontChars) (\c -> c'loadFontData d (fromIntegral $ size * sizeOf (0 :: CUChar)) (fromIntegral fontSize) c (fromIntegral glyphCount) (fromIntegral fontType))) >>= pop
+loadFontData :: [Integer] -> Int -> [Int] -> Int -> FontType -> IO Raylib.Types.GlyphInfo
+loadFontData fileData fontSize fontChars glyphCount fontType = withArrayLen (map fromIntegral fileData) (\size d -> withArray (map fromIntegral fontChars) (\c -> c'loadFontData d (fromIntegral $ size * sizeOf (0 :: CUChar)) (fromIntegral fontSize) c (fromIntegral glyphCount) (fromIntegral $ fromEnum fontType))) >>= pop
 
 foreign import ccall safe "raylib.h &LoadFontData"
   p'loadFontData ::
     FunPtr (Ptr CUChar -> CInt -> CInt -> Ptr CInt -> CInt -> CInt -> IO (Ptr Raylib.Types.GlyphInfo))
 
 foreign import ccall safe "bindings.h GenImageFontAtlas_" c'genImageFontAtlas :: Ptr Raylib.Types.GlyphInfo -> Ptr (Ptr Raylib.Types.Rectangle) -> CInt -> CInt -> CInt -> CInt -> IO (Ptr Raylib.Types.Image)
-
 genImageFontAtlas :: [Raylib.Types.GlyphInfo] -> [[Raylib.Types.Rectangle]] -> Int -> Int -> Int -> Int -> IO Raylib.Types.Image
 genImageFontAtlas chars recs glyphCount fontSize padding packMethod = withArray chars (\c -> withArray2D recs (\r -> c'genImageFontAtlas c r (fromIntegral glyphCount) (fromIntegral fontSize) (fromIntegral padding) (fromIntegral packMethod))) >>= pop
 
@@ -4253,7 +4271,7 @@
 
 foreign import ccall safe "bindings.h DrawCapsule_" c'drawCapsule :: Ptr Vector3 -> Ptr Vector3 -> CFloat -> CInt -> CInt -> Ptr Color -> IO ()
 
-drawCapsule :: Vector3 -> Vector3 -> CFloat -> CInt -> CInt -> Color -> IO ()
+drawCapsule :: Vector3 -> Vector3 -> CFloat -> Int -> Int -> Color -> IO ()
 drawCapsule start end radius slices rings color = with start (\s -> with end (\e -> with color (c'drawCapsule s e (realToFrac radius) (fromIntegral slices) (fromIntegral rings))))
 
 foreign import ccall safe "raylib.h &DrawCapsule"
@@ -4262,7 +4280,7 @@
 
 foreign import ccall safe "bindings.h DrawCapsuleWires_" c'drawCapsuleWires :: Ptr Vector3 -> Ptr Vector3 -> CFloat -> CInt -> CInt -> Ptr Color -> IO ()
 
-drawCapsuleWires :: Vector3 -> Vector3 -> CFloat -> CInt -> CInt -> Color -> IO ()
+drawCapsuleWires :: Vector3 -> Vector3 -> CFloat -> Int -> Int -> Color -> IO ()
 drawCapsuleWires start end radius slices rings color = with start (\s -> with end (\e -> with color (c'drawCapsuleWires s e (realToFrac radius) (fromIntegral slices) (fromIntegral rings))))
 
 foreign import ccall safe "raylib.h &DrawCapsuleWires"
diff --git a/src/Raylib/Constants.hs b/src/Raylib/Constants.hs
deleted file mode 100644
--- a/src/Raylib/Constants.hs
+++ /dev/null
@@ -1,1224 +0,0 @@
-{-# OPTIONS -Wall #-}
-module Raylib.Constants where
-
--- This file includes constants and enums defined in raylib
-
-import Foreign.C (CUInt)
-
-type ConfigFlags = CUInt
-
-flag'vsyncHint = 64
-
-flag'vsyncHint :: (Num a) => a
-
-flag'fullscreenMode = 2
-
-flag'fullscreenMode :: (Num a) => a
-
-flag'windowResizable = 4
-
-flag'windowResizable :: (Num a) => a
-
-flag'windowUndecorated = 8
-
-flag'windowUndecorated :: (Num a) => a
-
-flag'windowHidden = 128
-
-flag'windowHidden :: (Num a) => a
-
-flag'windowMinimized = 512
-
-flag'windowMinimized :: (Num a) => a
-
-flag'windowMaximized = 1024
-
-flag'windowMaximized :: (Num a) => a
-
-flag'windowUnfocused = 2048
-
-flag'windowUnfocused :: (Num a) => a
-
-flag'windowTopmost = 4096
-
-flag'windowTopmost :: (Num a) => a
-
-flag'windowAlwaysRun = 256
-
-flag'windowAlwaysRun :: (Num a) => a
-
-flag'windowTransparent = 16
-
-flag'windowTransparent :: (Num a) => a
-
-flag'windowHighdpi = 8192
-
-flag'windowHighdpi :: (Num a) => a
-
-flag'windowMousePassthrough = 16384
-
-flag'windowMousePassthrough :: (Num a) => a
-
-flag'msaa4xHint = 32
-
-flag'msaa4xHint :: (Num a) => a
-
-flag'interlacedHint = 65536
-
-flag'interlacedHint :: (Num a) => a
-
-type TraceLogLevel = CUInt
-
-log'all = 0
-
-log'all :: (Num a) => a
-
-log'trace = 1
-
-log'trace :: (Num a) => a
-
-log'debug = 2
-
-log'debug :: (Num a) => a
-
-log'info = 3
-
-log'info :: (Num a) => a
-
-log'warning = 4
-
-log'warning :: (Num a) => a
-
-log'error = 5
-
-log'error :: (Num a) => a
-
-log'fatal = 6
-
-log'fatal :: (Num a) => a
-
-log'none = 7
-
-log'none :: (Num a) => a
-
-type KeyboardKey = CUInt
-
-key'null = 0
-
-key'null :: (Num a) => a
-
-key'apostrophe = 39
-
-key'apostrophe :: (Num a) => a
-
-key'comma = 44
-
-key'comma :: (Num a) => a
-
-key'minus = 45
-
-key'minus :: (Num a) => a
-
-key'period = 46
-
-key'period :: (Num a) => a
-
-key'slash = 47
-
-key'slash :: (Num a) => a
-
-key'zero = 48
-
-key'zero :: (Num a) => a
-
-key'one = 49
-
-key'one :: (Num a) => a
-
-key'two = 50
-
-key'two :: (Num a) => a
-
-key'three = 51
-
-key'three :: (Num a) => a
-
-key'four = 52
-
-key'four :: (Num a) => a
-
-key'five = 53
-
-key'five :: (Num a) => a
-
-key'six = 54
-
-key'six :: (Num a) => a
-
-key'seven = 55
-
-key'seven :: (Num a) => a
-
-key'eight = 56
-
-key'eight :: (Num a) => a
-
-key'nine = 57
-
-key'nine :: (Num a) => a
-
-key'semicolon = 59
-
-key'semicolon :: (Num a) => a
-
-key'equal = 61
-
-key'equal :: (Num a) => a
-
-key'a = 65
-
-key'a :: (Num a) => a
-
-key'b = 66
-
-key'b :: (Num a) => a
-
-key'c = 67
-
-key'c :: (Num a) => a
-
-key'd = 68
-
-key'd :: (Num a) => a
-
-key'e = 69
-
-key'e :: (Num a) => a
-
-key'f = 70
-
-key'f :: (Num a) => a
-
-key'g = 71
-
-key'g :: (Num a) => a
-
-key'h = 72
-
-key'h :: (Num a) => a
-
-key'i = 73
-
-key'i :: (Num a) => a
-
-key'j = 74
-
-key'j :: (Num a) => a
-
-key'k = 75
-
-key'k :: (Num a) => a
-
-key'l = 76
-
-key'l :: (Num a) => a
-
-key'm = 77
-
-key'm :: (Num a) => a
-
-key'n = 78
-
-key'n :: (Num a) => a
-
-key'o = 79
-
-key'o :: (Num a) => a
-
-key'p = 80
-
-key'p :: (Num a) => a
-
-key'q = 81
-
-key'q :: (Num a) => a
-
-key'r = 82
-
-key'r :: (Num a) => a
-
-key's = 83
-
-key's :: (Num a) => a
-
-key't = 84
-
-key't :: (Num a) => a
-
-key'u = 85
-
-key'u :: (Num a) => a
-
-key'v = 86
-
-key'v :: (Num a) => a
-
-key'w = 87
-
-key'w :: (Num a) => a
-
-key'x = 88
-
-key'x :: (Num a) => a
-
-key'y = 89
-
-key'y :: (Num a) => a
-
-key'z = 90
-
-key'z :: (Num a) => a
-
-key'leftBracket = 91
-
-key'leftBracket :: (Num a) => a
-
-key'backslash = 92
-
-key'backslash :: (Num a) => a
-
-key'rightBracket = 93
-
-key'rightBracket :: (Num a) => a
-
-key'grave = 96
-
-key'grave :: (Num a) => a
-
-key'space = 32
-
-key'space :: (Num a) => a
-
-key'escape = 256
-
-key'escape :: (Num a) => a
-
-key'enter = 257
-
-key'enter :: (Num a) => a
-
-key'tab = 258
-
-key'tab :: (Num a) => a
-
-key'backspace = 259
-
-key'backspace :: (Num a) => a
-
-key'insert = 260
-
-key'insert :: (Num a) => a
-
-key'delete = 261
-
-key'delete :: (Num a) => a
-
-key'right = 262
-
-key'right :: (Num a) => a
-
-key'left = 263
-
-key'left :: (Num a) => a
-
-key'down = 264
-
-key'down :: (Num a) => a
-
-key'up = 265
-
-key'up :: (Num a) => a
-
-key'pageUp = 266
-
-key'pageUp :: (Num a) => a
-
-key'pageDown = 267
-
-key'pageDown :: (Num a) => a
-
-key'home = 268
-
-key'home :: (Num a) => a
-
-key'end = 269
-
-key'end :: (Num a) => a
-
-key'capsLock = 280
-
-key'capsLock :: (Num a) => a
-
-key'scrollLock = 281
-
-key'scrollLock :: (Num a) => a
-
-key'numLock = 282
-
-key'numLock :: (Num a) => a
-
-key'printScreen = 283
-
-key'printScreen :: (Num a) => a
-
-key'pause = 284
-
-key'pause :: (Num a) => a
-
-key'f1 = 290
-
-key'f1 :: (Num a) => a
-
-key'f2 = 291
-
-key'f2 :: (Num a) => a
-
-key'f3 = 292
-
-key'f3 :: (Num a) => a
-
-key'f4 = 293
-
-key'f4 :: (Num a) => a
-
-key'f5 = 294
-
-key'f5 :: (Num a) => a
-
-key'f6 = 295
-
-key'f6 :: (Num a) => a
-
-key'f7 = 296
-
-key'f7 :: (Num a) => a
-
-key'f8 = 297
-
-key'f8 :: (Num a) => a
-
-key'f9 = 298
-
-key'f9 :: (Num a) => a
-
-key'f10 = 299
-
-key'f10 :: (Num a) => a
-
-key'f11 = 300
-
-key'f11 :: (Num a) => a
-
-key'f12 = 301
-
-key'f12 :: (Num a) => a
-
-key'leftShift = 340
-
-key'leftShift :: (Num a) => a
-
-key'leftControl = 341
-
-key'leftControl :: (Num a) => a
-
-key'leftAlt = 342
-
-key'leftAlt :: (Num a) => a
-
-key'leftSuper = 343
-
-key'leftSuper :: (Num a) => a
-
-key'rightShift = 344
-
-key'rightShift :: (Num a) => a
-
-key'rightControl = 345
-
-key'rightControl :: (Num a) => a
-
-key'rightAlt = 346
-
-key'rightAlt :: (Num a) => a
-
-key'rightSuper = 347
-
-key'rightSuper :: (Num a) => a
-
-key'kbMenu = 348
-
-key'kbMenu :: (Num a) => a
-
-key'kp0 = 320
-
-key'kp0 :: (Num a) => a
-
-key'kp1 = 321
-
-key'kp1 :: (Num a) => a
-
-key'kp2 = 322
-
-key'kp2 :: (Num a) => a
-
-key'kp3 = 323
-
-key'kp3 :: (Num a) => a
-
-key'kp4 = 324
-
-key'kp4 :: (Num a) => a
-
-key'kp5 = 325
-
-key'kp5 :: (Num a) => a
-
-key'kp6 = 326
-
-key'kp6 :: (Num a) => a
-
-key'kp7 = 327
-
-key'kp7 :: (Num a) => a
-
-key'kp8 = 328
-
-key'kp8 :: (Num a) => a
-
-key'kp9 = 329
-
-key'kp9 :: (Num a) => a
-
-key'kpDecimal = 330
-
-key'kpDecimal :: (Num a) => a
-
-key'kpDivide = 331
-
-key'kpDivide :: (Num a) => a
-
-key'kpMultiply = 332
-
-key'kpMultiply :: (Num a) => a
-
-key'kpSubtract = 333
-
-key'kpSubtract :: (Num a) => a
-
-key'kpAdd = 334
-
-key'kpAdd :: (Num a) => a
-
-key'kpEnter = 335
-
-key'kpEnter :: (Num a) => a
-
-key'kpEqual = 336
-
-key'kpEqual :: (Num a) => a
-
-key'back = 4
-
-key'back :: (Num a) => a
-
-key'menu = 82
-
-key'menu :: (Num a) => a
-
-key'volumeUp = 24
-
-key'volumeUp :: (Num a) => a
-
-key'volumeDown = 25
-
-key'volumeDown :: (Num a) => a
-
-type MouseButton = CUInt
-
-mouseButton'left = 0
-
-mouseButton'left :: (Num a) => a
-
-mouseButton'right = 1
-
-mouseButton'right :: (Num a) => a
-
-mouseButton'middle = 2
-
-mouseButton'middle :: (Num a) => a
-
-mouseButton'side = 3
-
-mouseButton'side :: (Num a) => a
-
-mouseButton'extra = 4
-
-mouseButton'extra :: (Num a) => a
-
-mouseButton'forward = 5
-
-mouseButton'forward :: (Num a) => a
-
-mouseButton'back = 6
-
-mouseButton'back :: (Num a) => a
-
-type MouseCursor = CUInt
-
-mouseCursor'default = 0
-
-mouseCursor'default :: (Num a) => a
-
-mouseCursor'arrow = 1
-
-mouseCursor'arrow :: (Num a) => a
-
-mouseCursor'ibeam = 2
-
-mouseCursor'ibeam :: (Num a) => a
-
-mouseCursor'crosshair = 3
-
-mouseCursor'crosshair :: (Num a) => a
-
-mouseCursor'pointingHand = 4
-
-mouseCursor'pointingHand :: (Num a) => a
-
-mouseCursor'resizeEW = 5
-
-mouseCursor'resizeEW :: (Num a) => a
-
-mouseCursor'resizeNS = 6
-
-mouseCursor'resizeNS :: (Num a) => a
-
-mouseCursor'resizeNWSE = 7
-
-mouseCursor'resizeNWSE :: (Num a) => a
-
-mouseCursor'resizeNESW = 8
-
-mouseCursor'resizeNESW :: (Num a) => a
-
-mouseCursor'resizeAll = 9
-
-mouseCursor'resizeAll :: (Num a) => a
-
-mouseCursor'notAllowed = 10
-
-mouseCursor'notAllowed :: (Num a) => a
-
-type GamepadButton = CUInt
-
-gamepadButton'unknown = 0
-
-gamepadButton'unknown :: (Num a) => a
-
-gamepadButton'leftFaceUp = 1
-
-gamepadButton'leftFaceUp :: (Num a) => a
-
-gamepadButton'leftFaceRight = 2
-
-gamepadButton'leftFaceRight :: (Num a) => a
-
-gamepadButton'leftFaceDown = 3
-
-gamepadButton'leftFaceDown :: (Num a) => a
-
-gamepadButton'leftFaceLeft = 4
-
-gamepadButton'leftFaceLeft :: (Num a) => a
-
-gamepadButton'rightFaceUp = 5
-
-gamepadButton'rightFaceUp :: (Num a) => a
-
-gamepadButton'rightFaceRight = 6
-
-gamepadButton'rightFaceRight :: (Num a) => a
-
-gamepadButton'rightFaceDown = 7
-
-gamepadButton'rightFaceDown :: (Num a) => a
-
-gamepadButton'rightFaceLeft = 8
-
-gamepadButton'rightFaceLeft :: (Num a) => a
-
-gamepadButton'leftTrigger1 = 9
-
-gamepadButton'leftTrigger1 :: (Num a) => a
-
-gamepadButton'leftTrigger2 = 10
-
-gamepadButton'leftTrigger2 :: (Num a) => a
-
-gamepadButton'rightTrigger1 = 11
-
-gamepadButton'rightTrigger1 :: (Num a) => a
-
-gamepadButton'rightTrigger2 = 12
-
-gamepadButton'rightTrigger2 :: (Num a) => a
-
-gamepadButton'middleLeft = 13
-
-gamepadButton'middleLeft :: (Num a) => a
-
-gamepadButton'middle = 14
-
-gamepadButton'middle :: (Num a) => a
-
-gamepadButton'middleRight = 15
-
-gamepadButton'middleRight :: (Num a) => a
-
-gamepadButton'leftThumb = 16
-
-gamepadButton'leftThumb :: (Num a) => a
-
-gamepadButton'rightThumb = 17
-
-gamepadButton'rightThumb :: (Num a) => a
-
-type GamepadAxis = CUInt
-
-gamepadAxisLeftX = 0
-
-gamepadAxisLeftX :: (Num a) => a
-
-gamepadAxisLeftY = 1
-
-gamepadAxisLeftY :: (Num a) => a
-
-gamepadAxisRightX = 2
-
-gamepadAxisRightX :: (Num a) => a
-
-gamepadAxisRightY = 3
-
-gamepadAxisRightY :: (Num a) => a
-
-gamepadAxisLeftTrigger = 4
-
-gamepadAxisLeftTrigger :: (Num a) => a
-
-gamepadAxisRightTrigger = 5
-
-gamepadAxisRightTrigger :: (Num a) => a
-
-type MaterialMapIndex = CUInt
-
-materialMap'albedo = 0
-
-materialMap'albedo :: (Num a) => a
-
-materialMap'metalness = 1
-
-materialMap'metalness :: (Num a) => a
-
-materialMap'normal = 2
-
-materialMap'normal :: (Num a) => a
-
-materialMap'roughness = 3
-
-materialMap'roughness :: (Num a) => a
-
-materialMap'occlusion = 4
-
-materialMap'occlusion :: (Num a) => a
-
-materialMap'emission = 5
-
-materialMap'emission :: (Num a) => a
-
-materialMap'height = 6
-
-materialMap'height :: (Num a) => a
-
-materialMap'cubemap = 7
-
-materialMap'cubemap :: (Num a) => a
-
-materialMap'irradiance = 8
-
-materialMap'irradiance :: (Num a) => a
-
-materialMap'prefilter = 9
-
-materialMap'prefilter :: (Num a) => a
-
-materialMap'brdf = 10
-
-materialMap'brdf :: (Num a) => a
-
-type ShaderLocationIndex = CUInt
-
-shaderLoc'vertexPosition = 0
-
-shaderLoc'vertexPosition :: (Num a) => a
-
-shaderLoc'vertexTexcoord01 = 1
-
-shaderLoc'vertexTexcoord01 :: (Num a) => a
-
-shaderLoc'vertexTexcoord02 = 2
-
-shaderLoc'vertexTexcoord02 :: (Num a) => a
-
-shaderLoc'vertexNormal = 3
-
-shaderLoc'vertexNormal :: (Num a) => a
-
-shaderLoc'vertexTangent = 4
-
-shaderLoc'vertexTangent :: (Num a) => a
-
-shaderLoc'vertexColor = 5
-
-shaderLoc'vertexColor :: (Num a) => a
-
-shaderLoc'matrixMvp = 6
-
-shaderLoc'matrixMvp :: (Num a) => a
-
-shaderLoc'matrixView = 7
-
-shaderLoc'matrixView :: (Num a) => a
-
-shaderLoc'matrixProjection = 8
-
-shaderLoc'matrixProjection :: (Num a) => a
-
-shaderLoc'matrixModel = 9
-
-shaderLoc'matrixModel :: (Num a) => a
-
-shaderLoc'matrixNormal = 10
-
-shaderLoc'matrixNormal :: (Num a) => a
-
-shaderLoc'vectorView = 11
-
-shaderLoc'vectorView :: (Num a) => a
-
-shaderLoc'colorDiffuse = 12
-
-shaderLoc'colorDiffuse :: (Num a) => a
-
-shaderLoc'colorSpecular = 13
-
-shaderLoc'colorSpecular :: (Num a) => a
-
-shaderLoc'colorAmbient = 14
-
-shaderLoc'colorAmbient :: (Num a) => a
-
-shaderLoc'mapAlbedo = 15
-
-shaderLoc'mapAlbedo :: (Num a) => a
-
-shaderLoc'mapMetalness = 16
-
-shaderLoc'mapMetalness :: (Num a) => a
-
-shaderLoc'mapNormal = 17
-
-shaderLoc'mapNormal :: (Num a) => a
-
-shaderLoc'mapRoughness = 18
-
-shaderLoc'mapRoughness :: (Num a) => a
-
-shaderLoc'mapOcclusion = 19
-
-shaderLoc'mapOcclusion :: (Num a) => a
-
-shaderLoc'mapEmission = 20
-
-shaderLoc'mapEmission :: (Num a) => a
-
-shaderLoc'mapHeight = 21
-
-shaderLoc'mapHeight :: (Num a) => a
-
-shaderLoc'mapCubemap = 22
-
-shaderLoc'mapCubemap :: (Num a) => a
-
-shaderLoc'mapIrradiance = 23
-
-shaderLoc'mapIrradiance :: (Num a) => a
-
-shaderLoc'mapPrefilter = 24
-
-shaderLoc'mapPrefilter :: (Num a) => a
-
-shaderLoc'mapBrdf = 25
-
-shaderLoc'mapBrdf :: (Num a) => a
-
-type ShaderUniformDataType = CUInt
-
-shaderUniform'float = 0
-
-shaderUniform'float :: (Num a) => a
-
-shaderUniform'vec2 = 1
-
-shaderUniform'vec2 :: (Num a) => a
-
-shaderUniform'vec3 = 2
-
-shaderUniform'vec3 :: (Num a) => a
-
-shaderUniform'vec4 = 3
-
-shaderUniform'vec4 :: (Num a) => a
-
-shaderUniform'int = 4
-
-shaderUniform'int :: (Num a) => a
-
-shaderUniform'ivec2 = 5
-
-shaderUniform'ivec2 :: (Num a) => a
-
-shaderUniform'ivec3 = 6
-
-shaderUniform'ivec3 :: (Num a) => a
-
-shaderUniform'ivec4 = 7
-
-shaderUniform'ivec4 :: (Num a) => a
-
-shaderUniform'sampler2d = 8
-
-shaderUniform'sampler2d :: (Num a) => a
-
-type ShaderAttributeDataType = CUInt
-
-shaderAttrib'float = 0
-
-shaderAttrib'float :: (Num a) => a
-
-shaderAttrib'vec2 = 1
-
-shaderAttrib'vec2 :: (Num a) => a
-
-shaderAttrib'vec3 = 2
-
-shaderAttrib'vec3 :: (Num a) => a
-
-shaderAttrib'vec4 = 3
-
-shaderAttrib'vec4 :: (Num a) => a
-
-type PixelFormat = CUInt
-
-pixelFormat'uncompressedGrayscale = 1
-
-pixelFormat'uncompressedGrayscale :: (Num a) => a
-
-pixelFormat'uncompressedGrayAlpha = 2
-
-pixelFormat'uncompressedGrayAlpha :: (Num a) => a
-
-pixelFormat'uncompressedR5G6B5 = 3
-
-pixelFormat'uncompressedR5G6B5 :: (Num a) => a
-
-pixelFormat'uncompressedR8G8B8 = 4
-
-pixelFormat'uncompressedR8G8B8 :: (Num a) => a
-
-pixelFormat'uncompressedR5G5B5A1 = 5
-
-pixelFormat'uncompressedR5G5B5A1 :: (Num a) => a
-
-pixelFormat'uncompressedR4G4B4A4 = 6
-
-pixelFormat'uncompressedR4G4B4A4 :: (Num a) => a
-
-pixelFormat'uncompressedR8G8B8A8 = 7
-
-pixelFormat'uncompressedR8G8B8A8 :: (Num a) => a
-
-pixelFormat'uncompressedR32 = 8
-
-pixelFormat'uncompressedR32 :: (Num a) => a
-
-pixelFormat'uncompressedR32G32B32 = 9
-
-pixelFormat'uncompressedR32G32B32 :: (Num a) => a
-
-pixelFormat'uncompressedR32G32B32A32 = 10
-
-pixelFormat'uncompressedR32G32B32A32 :: (Num a) => a
-
-pixelFormat'compressedDxt1Rgb = 11
-
-pixelFormat'compressedDxt1Rgb :: (Num a) => a
-
-pixelFormat'compressedDxt1Rgba = 12
-
-pixelFormat'compressedDxt1Rgba :: (Num a) => a
-
-pixelFormat'compressedDxt3Rgba = 13
-
-pixelFormat'compressedDxt3Rgba :: (Num a) => a
-
-pixelFormat'compressedDxt5Rgba = 14
-
-pixelFormat'compressedDxt5Rgba :: (Num a) => a
-
-pixelFormat'compressedEtc1Rgb = 15
-
-pixelFormat'compressedEtc1Rgb :: (Num a) => a
-
-pixelFormat'compressedEtc2Rgb = 16
-
-pixelFormat'compressedEtc2Rgb :: (Num a) => a
-
-pixelFormat'compressedEtc2EacRgba = 17
-
-pixelFormat'compressedEtc2EacRgba :: (Num a) => a
-
-pixelFormat'compressedPvrtRgb = 18
-
-pixelFormat'compressedPvrtRgb :: (Num a) => a
-
-pixelFormat'compressedPvrtRgba = 19
-
-pixelFormat'compressedPvrtRgba :: (Num a) => a
-
-pixelFormat'compressedAstc4x4Rgba = 20
-
-pixelFormat'compressedAstc4x4Rgba :: (Num a) => a
-
-pixelFormat'compressedAstc8x8Rgba = 21
-
-pixelFormat'compressedAstc8x8Rgba :: (Num a) => a
-
-type TextureFilter = CUInt
-
-textureFilter'point = 0
-
-textureFilter'point :: (Num a) => a
-
-textureFilter'bilinear = 1
-
-textureFilter'bilinear :: (Num a) => a
-
-textureFilter'trilinear = 2
-
-textureFilter'trilinear :: (Num a) => a
-
-textureFilter'anisotropic4x = 3
-
-textureFilter'anisotropic4x :: (Num a) => a
-
-textureFilter'anisotropic8x = 4
-
-textureFilter'anisotropic8x :: (Num a) => a
-
-textureFilter'anisotropic16x = 5
-
-textureFilter'anisotropic16x :: (Num a) => a
-
-type TextureWrap = CUInt
-
-textureWrap'repeat = 0
-
-textureWrap'repeat :: (Num a) => a
-
-textureWrap'clamp = 1
-
-textureWrap'clamp :: (Num a) => a
-
-textureWrap'mirrorRepeat = 2
-
-textureWrap'mirrorRepeat :: (Num a) => a
-
-textureWrap'mirrorClamp = 3
-
-textureWrap'mirrorClamp :: (Num a) => a
-
-type CubemapLayout = CUInt
-
-cubemapLayout'autoDetect = 0
-
-cubemapLayout'autoDetect :: (Num a) => a
-
-cubemapLayout'lineVertical = 1
-
-cubemapLayout'lineVertical :: (Num a) => a
-
-cubemapLayout'lineHorizontal = 2
-
-cubemapLayout'lineHorizontal :: (Num a) => a
-
-cubemapLayout'crossThreeByFour = 3
-
-cubemapLayout'crossThreeByFour :: (Num a) => a
-
-cubemapLayout'crossThreeByThree = 4
-
-cubemapLayout'crossThreeByThree :: (Num a) => a
-
-cubemapLayout'panorama = 5
-
-cubemapLayout'panorama :: (Num a) => a
-
-type FontType = CUInt
-
-font'default = 0
-
-font'default :: (Num a) => a
-
-font'bitmap = 1
-
-font'bitmap :: (Num a) => a
-
-font'sdf = 2
-
-font'sdf :: (Num a) => a
-
-type BlendMode = CUInt
-
-blend'alpha = 0
-
-blend'alpha :: (Num a) => a
-
-blend'additive = 1
-
-blend'additive :: (Num a) => a
-
-blend'multiplied = 2
-
-blend'multiplied :: (Num a) => a
-
-blend'addColors = 3
-
-blend'addColors :: (Num a) => a
-
-blend'subtractColors = 4
-
-blend'subtractColors :: (Num a) => a
-
-blend'alphaPremultiply = 5
-
-blend'alphaPremultiply :: (Num a) => a
-
-blend'custom = 6
-
-blend'custom :: (Num a) => a
-
-blend'customSeparate = 7
-
-blend'customSeparate :: (Num a) => a
-
-type Gesture = CUInt
-
-gesture'none = 0
-
-gesture'none :: (Num a) => a
-
-gesture'tap = 1
-
-gesture'tap :: (Num a) => a
-
-gesture'doubletap = 2
-
-gesture'doubletap :: (Num a) => a
-
-gesture'hold = 4
-
-gesture'hold :: (Num a) => a
-
-gesture'drag = 8
-
-gesture'drag :: (Num a) => a
-
-gesture'swipeRight = 16
-
-gesture'swipeRight :: (Num a) => a
-
-gesture'swipeLeft = 32
-
-gesture'swipeLeft :: (Num a) => a
-
-gesture'swipeUp = 64
-
-gesture'swipeUp :: (Num a) => a
-
-gesture'swipeDown = 128
-
-gesture'swipeDown :: (Num a) => a
-
-gesture'pinchIn = 256
-
-gesture'pinchIn :: (Num a) => a
-
-gesture'pinchOut = 512
-
-gesture'pinchOut :: (Num a) => a
-
-type CameraMode = CUInt
-
-cameraMode'custom = 0
-
-cameraMode'custom :: (Num a) => a
-
-cameraMode'free = 1
-
-cameraMode'free :: (Num a) => a
-
-cameraMode'orbital = 2
-
-cameraMode'orbital :: (Num a) => a
-
-cameraMode'firstPerson = 3
-
-cameraMode'firstPerson :: (Num a) => a
-
-cameraMode'thirdPerson = 4
-
-cameraMode'thirdPerson :: (Num a) => a
-
-type CameraProjection = CUInt
-
-cameraProjection'perspective = 0
-
-cameraProjection'perspective :: (Num a) => a
-
-cameraProjection'orthographic = 1
-
-cameraProjection'orthographic :: (Num a) => a
-
-type NPatchLayout = CUInt
-
-npatch'ninePatch = 0
-
-npatch'ninePatch :: (Num a) => a
-
-npatch'threePatchVertical = 1
-
-npatch'threePatchVertical :: (Num a) => a
-
-npatch'threePatchHorizontal = 2
-
-npatch'threePatchHorizontal :: (Num a) => a
diff --git a/src/Raylib/Types.hs b/src/Raylib/Types.hs
--- a/src/Raylib/Types.hs
+++ b/src/Raylib/Types.hs
@@ -3,7 +3,6 @@
 
 -- This file includes Haskell counterparts to the structs defined in raylib
 
--- This file includes Haskell counterparts to the structs defined in raylib
 import Foreign.C
     ( CString, CChar, CUShort, CUInt, CInt, CUChar, CFloat, CBool )
 import Foreign
@@ -11,8 +10,654 @@
       plusPtr,
       pokeArray,
       peekArray,
+      castPtr,
       Storable(pokeByteOff, poke, peek, alignment, sizeOf, peekByteOff) )
 
+
+------------------------------------------------
+-- Raylib enumerations -------------------------
+------------------------------------------------
+
+data ConfigFlag = VsyncHint              
+                 | FullscreenMode         
+                 | WindowResizable        
+                 | WindowUndecorated      
+                 | WindowHidden           
+                 | WindowMinimized        
+                 | WindowMaximized        
+                 | WindowUnfocused        
+                 | WindowTopmost          
+                 | WindowAlwaysRun        
+                 | WindowTransparent      
+                 | WindowHighdpi          
+                 | WindowMousePassthrough 
+                 | Msaa4xHint             
+                 | InterlacedHint         
+  deriving (Eq, Show)
+  
+instance Enum ConfigFlag where
+    fromEnum g = case g of 
+            VsyncHint              -> 64
+            FullscreenMode         -> 2
+            WindowResizable        -> 4
+            WindowUndecorated      -> 8
+            WindowHidden           -> 128
+            WindowMinimized        -> 512
+            WindowMaximized        -> 1024
+            WindowUnfocused        -> 2048
+            WindowTopmost          -> 4096
+            WindowAlwaysRun        -> 256
+            WindowTransparent      -> 16
+            WindowHighdpi          -> 8192
+            WindowMousePassthrough -> 16384
+            Msaa4xHint             -> 32
+            InterlacedHint         -> 65536
+    toEnum x = case x of 
+      64    -> VsyncHint              
+      2     -> FullscreenMode         
+      4     -> WindowResizable        
+      8     -> WindowUndecorated      
+      128   -> WindowHidden           
+      512   -> WindowMinimized        
+      1024  -> WindowMaximized        
+      2048  -> WindowUnfocused        
+      4096  -> WindowTopmost          
+      256   -> WindowAlwaysRun        
+      16    -> WindowTransparent      
+      8192  -> WindowHighdpi          
+      16384 -> WindowMousePassthrough 
+      32    -> Msaa4xHint             
+      65536 -> InterlacedHint         
+      n     -> error $ "Invalid value " ++ show n ++ " for `toEnum`."
+
+data TraceLogLevel = LogAll | LogTrace | LogDebug | LogInfo | LogWarning | LogError | LogFatal | LogNone 
+    deriving (Eq, Show,Enum)
+
+data KeyboardKey = KeyNull        
+                 | KeyApostrophe  
+                 | KeyComma       
+                 | KeyMinus       
+                 | KeyPeriod      
+                 | KeySlash       
+                 | KeyZero        
+                 | KeyOne         
+                 | KeyTwo         
+                 | KeyThree       
+                 | KeyFour        
+                 | KeyFive        
+                 | KeySix         
+                 | KeySeven       
+                 | KeyEight       
+                 | KeyNine        
+                 | KeySemicolon   
+                 | KeyEqual       
+                 | KeyA           
+                 | KeyB           
+                 | KeyC           
+                 | KeyD           
+                 | KeyE           
+                 | KeyF           
+                 | KeyG           
+                 | KeyH           
+                 | KeyI           
+                 | KeyJ           
+                 | KeyK           
+                 | KeyL           
+                 | KeyM           
+                 | KeyN           
+                 | KeyO           
+                 | KeyP           
+                 | KeyQ           
+                 | KeyR           
+                 | KeyS           
+                 | KeyT           
+                 | KeyU           
+                 | KeyV           
+                 | KeyW           
+                 | KeyX           
+                 | KeyY           
+                 | KeyZ           
+                 | KeyLeftBracket 
+                 | KeyBackslash   
+                 | KeyRightBracket
+                 | KeyGrave       
+                 | KeySpace       
+                 | KeyEscape      
+                 | KeyEnter       
+                 | KeyTab         
+                 | KeyBackspace   
+                 | KeyInsert      
+                 | KeyDelete      
+                 | KeyRight       
+                 | KeyLeft        
+                 | KeyDown        
+                 | KeyUp          
+                 | KeyPageUp      
+                 | KeyPageDown    
+                 | KeyHome        
+                 | KeyEnd         
+                 | KeyCapsLock    
+                 | KeyScrollLock  
+                 | KeyNumLock     
+                 | KeyPrintScreen 
+                 | KeyPause       
+                 | KeyF1          
+                 | KeyF2          
+                 | KeyF3          
+                 | KeyF4          
+                 | KeyF5          
+                 | KeyF6          
+                 | KeyF7          
+                 | KeyF8          
+                 | KeyF9          
+                 | KeyF10         
+                 | KeyF11         
+                 | KeyF12         
+                 | KeyLeftShift   
+                 | KeyLeftControl 
+                 | KeyLeftAlt     
+                 | KeyLeftSuper   
+                 | KeyRightShift  
+                 | KeyRightControl
+                 | KeyRightAlt    
+                 | KeyRightSuper  
+                 | KeyKbMenu      
+                 | KeyKp0         
+                 | KeyKp1         
+                 | KeyKp2         
+                 | KeyKp3         
+                 | KeyKp4         
+                 | KeyKp5         
+                 | KeyKp6         
+                 | KeyKp7         
+                 | KeyKp8         
+                 | KeyKp9         
+                 | KeyKpDecimal   
+                 | KeyKpDivide    
+                 | KeyKpMultiply  
+                 | KeyKpSubtract  
+                 | KeyKpAdd       
+                 | KeyKpEnter     
+                 | KeyKpEqual     
+                 | KeyBack        
+                 | KeyMenu        
+                 | KeyVolumeUp    
+                 | KeyVolumeDown  
+
+  deriving (Eq, Show)
+
+instance Enum KeyboardKey where
+    fromEnum k = case k of 
+        KeyNull         -> 0
+        KeyApostrophe   -> 39
+        KeyComma        -> 44
+        KeyMinus        -> 45
+        KeyPeriod       -> 46
+        KeySlash        -> 47
+        KeyZero         -> 48
+        KeyOne          -> 49
+        KeyTwo          -> 50
+        KeyThree        -> 51
+        KeyFour         -> 52
+        KeyFive         -> 53
+        KeySix          -> 54
+        KeySeven        -> 55
+        KeyEight        -> 56
+        KeyNine         -> 57
+        KeySemicolon    -> 59
+        KeyEqual        -> 61
+        KeyA            -> 65
+        KeyB            -> 66
+        KeyC            -> 67
+        KeyD            -> 68
+        KeyE            -> 69
+        KeyF            -> 70
+        KeyG            -> 71
+        KeyH            -> 72
+        KeyI            -> 73
+        KeyJ            -> 74
+        KeyK            -> 75
+        KeyL            -> 76
+        KeyM            -> 77
+        KeyN            -> 78
+        KeyO            -> 79
+        KeyP            -> 80
+        KeyQ            -> 81
+        KeyR            -> 82
+        KeyS            -> 83
+        KeyT            -> 84
+        KeyU            -> 85
+        KeyV            -> 86
+        KeyW            -> 87
+        KeyX            -> 88
+        KeyY            -> 89
+        KeyZ            -> 90
+        KeyLeftBracket  -> 91
+        KeyBackslash    -> 92
+        KeyRightBracket -> 93
+        KeyGrave        -> 96
+        KeySpace        -> 32
+        KeyEscape       -> 256
+        KeyEnter        -> 257
+        KeyTab          -> 258
+        KeyBackspace    -> 259
+        KeyInsert       -> 260
+        KeyDelete       -> 261
+        KeyRight        -> 262
+        KeyLeft         -> 263
+        KeyDown         -> 264
+        KeyUp           -> 265
+        KeyPageUp       -> 266
+        KeyPageDown     -> 267
+        KeyHome         -> 268
+        KeyEnd          -> 269
+        KeyCapsLock     -> 280
+        KeyScrollLock   -> 281
+        KeyNumLock      -> 282
+        KeyPrintScreen  -> 283
+        KeyPause        -> 284
+        KeyF1           -> 290
+        KeyF2           -> 291
+        KeyF3           -> 292
+        KeyF4           -> 293
+        KeyF5           -> 294
+        KeyF6           -> 295
+        KeyF7           -> 296
+        KeyF8           -> 297
+        KeyF9           -> 298
+        KeyF10          -> 299
+        KeyF11          -> 300
+        KeyF12          -> 301
+        KeyLeftShift    -> 340
+        KeyLeftControl  -> 341
+        KeyLeftAlt      -> 342
+        KeyLeftSuper    -> 343
+        KeyRightShift   -> 344
+        KeyRightControl -> 345
+        KeyRightAlt     -> 346
+        KeyRightSuper   -> 347
+        KeyKbMenu       -> 348
+        KeyKp0          -> 320
+        KeyKp1          -> 321
+        KeyKp2          -> 322
+        KeyKp3          -> 323
+        KeyKp4          -> 324
+        KeyKp5          -> 325
+        KeyKp6          -> 326
+        KeyKp7          -> 327
+        KeyKp8          -> 328
+        KeyKp9          -> 329
+        KeyKpDecimal    -> 330
+        KeyKpDivide     -> 331
+        KeyKpMultiply   -> 332
+        KeyKpSubtract   -> 333
+        KeyKpAdd        -> 334
+        KeyKpEnter      -> 335
+        KeyKpEqual      -> 336
+        -- Android buttons
+        KeyBack         -> 4
+        KeyMenu         -> 82
+        KeyVolumeUp     -> 24
+        KeyVolumeDown   -> 25
+
+    toEnum n = case n of 
+       0   -> KeyNull        
+       39  -> KeyApostrophe  
+       44  -> KeyComma       
+       45  -> KeyMinus       
+       46  -> KeyPeriod      
+       47  -> KeySlash       
+       48  -> KeyZero        
+       49  -> KeyOne         
+       50  -> KeyTwo         
+       51  -> KeyThree       
+       52  -> KeyFour        
+       53  -> KeyFive        
+       54  -> KeySix         
+       55  -> KeySeven       
+       56  -> KeyEight       
+       57  -> KeyNine        
+       59  -> KeySemicolon   
+       61  -> KeyEqual       
+       65  -> KeyA           
+       66  -> KeyB           
+       67  -> KeyC           
+       68  -> KeyD           
+       69  -> KeyE           
+       70  -> KeyF           
+       71  -> KeyG           
+       72  -> KeyH           
+       73  -> KeyI           
+       74  -> KeyJ           
+       75  -> KeyK           
+       76  -> KeyL           
+       77  -> KeyM           
+       78  -> KeyN           
+       79  -> KeyO           
+       80  -> KeyP           
+       81  -> KeyQ           
+       82  -> KeyR           
+       83  -> KeyS           
+       84  -> KeyT           
+       85  -> KeyU           
+       86  -> KeyV           
+       87  -> KeyW           
+       88  -> KeyX           
+       89  -> KeyY           
+       90  -> KeyZ           
+       91  -> KeyLeftBracket 
+       92  -> KeyBackslash   
+       93  -> KeyRightBracket
+       96  -> KeyGrave       
+       32  -> KeySpace       
+       256 -> KeyEscape      
+       257 -> KeyEnter       
+       258 -> KeyTab         
+       259 -> KeyBackspace   
+       260 -> KeyInsert      
+       261 -> KeyDelete      
+       262 -> KeyRight       
+       263 -> KeyLeft        
+       264 -> KeyDown        
+       265 -> KeyUp          
+       266 -> KeyPageUp      
+       267 -> KeyPageDown    
+       268 -> KeyHome        
+       269 -> KeyEnd         
+       280 -> KeyCapsLock    
+       281 -> KeyScrollLock  
+       282 -> KeyNumLock     
+       283 -> KeyPrintScreen 
+       284 -> KeyPause       
+       290 -> KeyF1          
+       291 -> KeyF2          
+       292 -> KeyF3          
+       293 -> KeyF4          
+       294 -> KeyF5          
+       295 -> KeyF6          
+       296 -> KeyF7          
+       297 -> KeyF8          
+       298 -> KeyF9          
+       299 -> KeyF10         
+       300 -> KeyF11         
+       301 -> KeyF12         
+       340 -> KeyLeftShift   
+       341 -> KeyLeftControl 
+       342 -> KeyLeftAlt     
+       343 -> KeyLeftSuper   
+       344 -> KeyRightShift  
+       345 -> KeyRightControl
+       346 -> KeyRightAlt    
+       347 -> KeyRightSuper  
+       348 -> KeyKbMenu      
+       320 -> KeyKp0         
+       321 -> KeyKp1         
+       322 -> KeyKp2         
+       323 -> KeyKp3         
+       324 -> KeyKp4         
+       325 -> KeyKp5         
+       326 -> KeyKp6         
+       327 -> KeyKp7         
+       328 -> KeyKp8         
+       329 -> KeyKp9         
+       330 -> KeyKpDecimal   
+       331 -> KeyKpDivide    
+       332 -> KeyKpMultiply  
+       333 -> KeyKpSubtract  
+       334 -> KeyKpAdd       
+       335 -> KeyKpEnter     
+       336 -> KeyKpEqual     
+       -- Android buttons
+       4   -> KeyBack        
+      --  82  -> KeyMenu        
+       24  -> KeyVolumeUp    
+       25  -> KeyVolumeDown  
+       x   -> error $ "Invalid value " ++ show x ++ " for `fromEnum`."
+
+data MouseButton
+  = MouseButtonLeft
+  | MouseButtonRight
+  | MouseButtonMiddle
+  | MouseButtonSide
+  | MouseButtonExtra
+  | MouseButtonForward
+  | MouseButtonBack
+  deriving (Eq, Show, Enum)
+
+data MouseCursor
+  = MouseCursorDefault
+  | MouseCursorArrow
+  | MouseCursorIbeam
+  | MouseCursorCrosshair
+  | MouseCursorPointingHand
+  | MouseCursorResizeEW
+  | MouseCursorResizeNS
+  | MouseCursorResizeNWSE
+  | MouseCursorResizeNESW
+  | MouseCursorResizeAll
+  | MouseCursorNotAllowed
+ deriving (Eq, Show, Enum)
+
+data GamepadButton = GamepadButtonUnknown 
+                   | GamepadButtonUnknownLeftFaceUp 
+                   | GamepadButtonLeftFaceRight
+                   | GamepadButtonLeftFaceDown 
+                   | GamepadButtonLeftFaceLeft
+                   | GamepadButtonRightFaceUp
+                   | GamepadButtonRightFaceRight 
+                   | GamepadButtonRightFaceDown 
+                   | GamepadButtonRightFaceLeft
+                   | GamepadButtonLeftTrigger1
+                   | GamepadButtonLeftTrigger2 
+                   | GamepadButtonRightTrigger1 
+                   | GamepadButtonRightTrigger2
+                   | GamepadButtonMiddleLeft 
+                   | GamepadButtonMiddle 
+                   | GamepadButtonMiddleRight 
+                   | GamepadButtonLeftThumb 
+                   | GamepadButtonRightThumb 
+    deriving (Eq, Show, Enum)
+
+data GamepadAxis = GamepadAxisLeftX 
+                 | GamepadAxisLeftY
+                 | GamepadAxisRightX 
+                 | GamepadAxisRightY 
+                 | GamepadAxisLeftTrigger 
+                 | GamepadAxisRightTrigger 
+    deriving (Eq, Show, Enum)
+
+data MaterialMapIndex = MaterialMapAlbedo    
+                      | MaterialMapMetalness 
+                      | MaterialMapNormal    
+                      | MaterialMapRoughness 
+                      | MaterialMapOcclusion 
+                      | MaterialMapEmission  
+                      | MaterialMapHeight    
+                      | MaterialMapCubemap   
+                      | MaterialMapIrradiance
+                      | MaterialMapPrefilter 
+                      | MaterialMapBrdf      
+    deriving (Eq, Show, Enum)
+
+data ShaderLocationIndex = ShaderLocVertexPosition  
+                         | ShaderLocVertexTexcoord01
+                         | ShaderLocVertexTexcoord02
+                         | ShaderLocVertexNormal    
+                         | ShaderLocVertexTangent   
+                         | ShaderLocVertexColor     
+                         | ShaderLocMatrixMvp       
+                         | ShaderLocMatrixView      
+                         | ShaderLocMatrixProjection
+                         | ShaderLocMatrixModel     
+                         | ShaderLocMatrixNormal    
+                         | ShaderLocVectorView      
+                         | ShaderLocColorDiffuse    
+                         | ShaderLocColorSpecular   
+                         | ShaderLocColorAmbient    
+                         | ShaderLocMapAlbedo       
+                         | ShaderLocMapMetalness    
+                         | ShaderLocMapNormal       
+                         | ShaderLocMapRoughness    
+                         | ShaderLocMapOcclusion    
+                         | ShaderLocMapEmission     
+                         | ShaderLocMapHeight       
+                         | ShaderLocMapCubemap      
+                         | ShaderLocMapIrradiance   
+                         | ShaderLocMapPrefilter    
+                         | ShaderLocMapBrdf         
+    deriving (Eq, Show, Enum)
+
+data ShaderUniformDataType = ShaderUniformFloat    
+                           | ShaderUniformVec2     
+                           | ShaderUniformVec3      
+                           | ShaderUniformVec4      
+                           | ShaderUniformInt       
+                           | ShaderUniformIvec2     
+                           | ShaderUniformIvec3     
+                           | ShaderUniformIvec4     
+                           | ShaderUniformSampler2d 
+
+    deriving (Eq, Show, Enum)
+
+-- I genuinely have no idea where this is used.
+data ShaderAttributeDataType = ShaderAttribFloat
+                             | ShaderAttribVec2 
+                             | ShaderAttribVec3
+                             | ShaderAttribVec4
+    deriving (Eq, Show, Enum)
+
+data PixelFormat = PixelFormatUncompressedGrayscale   
+                 | PixelFormatUncompressedGrayAlpha   
+                 | PixelFormatUncompressedR5G6B5      
+                 | PixelFormatUncompressedR8G8B8      
+                 | PixelFormatUncompressedR5G5B5A1    
+                 | PixelFormatUncompressedR4G4B4A4    
+                 | PixelFormatUncompressedR8G8B8A8    
+                 | PixelFormatUncompressedR32         
+                 | PixelFormatUncompressedR32G32B32   
+                 | PixelFormatUncompressedR32G32B32A32
+                 | PixelFormatCompressedDxt1Rgb       
+                 | PixelFormatCompressedDxt1Rgba      
+                 | PixelFormatCompressedDxt3Rgba      
+                 | PixelFormatCompressedDxt5Rgba      
+                 | PixelFormatCompressedEtc1Rgb       
+                 | PixelFormatCompressedEtc2Rgb       
+                 | PixelFormatCompressedEtc2EacRgba   
+                 | PixelFormatCompressedPvrtRgb       
+                 | PixelFormatCompressedPvrtRgba      
+                 | PixelFormatCompressedAstc4x4Rgba   
+                 | PixelFormatCompressedAstc8x8Rgba   
+    deriving (Eq, Show, Enum)
+
+instance Storable PixelFormat where
+  sizeOf _ = 4
+  alignment _ = 4
+  peek ptr = do
+    val <- peek (castPtr ptr)
+    return $ toEnum $ fromEnum (val :: CInt)
+  poke ptr v = poke (castPtr ptr) (toEnum $ fromEnum v :: CInt)
+
+data TextureFilter = TextureFilterPoint 
+                   | TextureFilterBilinear 
+                   | TextureFilterTrilinear 
+                   | TextureFilterAnisotropic4x
+                   | TextureFilterAnisotropic8x
+                   | TextureFilterAnisotropic16x
+    deriving Enum
+
+data TextureWrap = TextureWrapRepeat
+                 | TextureWrapClamp 
+                 | TextureWrapMirrorRepeat 
+                 | TextureWrapMirrorClamp
+        deriving Enum
+
+data CubemapLayout = CubemapLayoutAutoDetect 
+                   | CubemapLayoutLineVertical 
+                   | CubemapLayoutLineHorizontal 
+                   | CubemapLayoutCrossThreeByFour 
+                   | CubemapLayoutCrossThreeByThree
+                   | CubemapLayoutPanorama
+    deriving Enum
+
+data FontType = FontDefault | FontBitmap | FontSDF deriving Enum
+
+data BlendMode = BlendAlpha | BlendAdditive | BlendMultiplied | BlendAddColors | BlendSubtractColors | BlendAlphaPremultiply | BlendCustom | BlendCustomSeparate deriving Enum
+
+data Gesture
+  = GestureNone
+  | GestureTap
+  | GestureDoubleTap
+  | GestureHold
+  | GestureDrag
+  | GestureSwipeRight
+  | GestureSwipeLeft
+  | GestureSwipeUp
+  | GestureSwipeDown
+  | GesturePinchIn
+  | GesturePinchOut
+  deriving (Show)
+
+-- NOTE: This is not the ideal solution, I need to make this unjanky
+instance Enum Gesture where
+  fromEnum n = case n of
+    GestureNone       -> 0
+    GestureTap        -> 1
+    GestureDoubleTap  -> 2
+    GestureHold       -> 4
+    GestureDrag       -> 8
+    GestureSwipeRight -> 16
+    GestureSwipeLeft  -> 32
+    GestureSwipeUp    -> 64
+    GestureSwipeDown  -> 128
+    GesturePinchIn    -> 256
+    GesturePinchOut   -> 512
+  toEnum n = case n of
+    0   -> GestureNone
+    1   -> GestureTap
+    2   -> GestureDoubleTap
+    4   -> GestureHold
+    8   -> GestureDrag
+    16  -> GestureSwipeRight
+    32  -> GestureSwipeLeft
+    64  -> GestureSwipeUp
+    128 -> GestureSwipeDown
+    256 -> GesturePinchIn
+    512 -> GesturePinchOut
+    _   -> error "Invalid input"
+
+data CameraMode
+  = CameraModeCustom
+  | CameraModeFree
+  | CameraModeOrbital
+  | CameraModeFirstPerson
+  | CameraModeThirdPerson
+  deriving (Enum)
+
+data CameraProjection = CameraPerspective | CameraOrthographic deriving (Eq, Show, Enum)
+
+instance Storable CameraProjection where
+  sizeOf _ = 4
+  alignment _ = 4
+  peek ptr = do
+    val <- peek (castPtr ptr)
+    return $ toEnum $ fromEnum (val :: CInt)
+  poke ptr v = poke (castPtr ptr) (toEnum $ fromEnum v :: CInt)
+
+data NPatchLayout = NPatchNinePatch | NPatchThreePatchVertical | NPatchThreePatchHorizontal deriving (Eq, Show, Enum)
+
+instance Storable NPatchLayout where
+  sizeOf _ = 4
+  alignment _ = 4
+  peek ptr = do
+    val <- peek (castPtr ptr)
+    return $ toEnum $ fromEnum (val :: CInt)
+  poke ptr v = poke (castPtr ptr) (toEnum $ fromEnum v :: CInt)
+
+
+------------------------------------------------
+-- Raylib structures ---------------------------
+------------------------------------------------
+
 {- typedef struct Vector2 {
             float x; float y;
         } Vector2; -}
@@ -348,7 +993,7 @@
     image'width :: CInt,
     image'height :: CInt,
     image'mipmaps :: CInt,
-    image'format :: CInt
+    image'format :: PixelFormat
   }
   deriving (Eq, Show)
 
@@ -398,7 +1043,7 @@
     texture'width :: CInt,
     texture'height :: CInt,
     texture'mipmaps :: CInt,
-    texture'format :: CInt
+    texture'format :: PixelFormat
   }
   deriving (Eq, Show)
 
@@ -499,7 +1144,7 @@
     nPatchinfo'top :: CInt,
     nPatchinfo'right :: CInt,
     nPatchinfo'bottom :: CInt,
-    nPatchinfo'layout :: CInt
+    nPatchinfo'layout :: NPatchLayout
   }
   deriving (Eq, Show)
 
@@ -671,7 +1316,7 @@
     camera3D'target :: Vector3,
     camera3D'up :: Vector3,
     camera3D'fovy :: CFloat,
-    camera3D'projection :: CInt
+    camera3D'projection :: CameraProjection
   }
   deriving (Eq, Show)
 
diff --git a/src/Raylib/Util.hs b/src/Raylib/Util.hs
--- a/src/Raylib/Util.hs
+++ b/src/Raylib/Util.hs
@@ -1,8 +1,10 @@
 {-# OPTIONS -Wall #-}
-module Raylib.Util (c'free, pop, popCArray, withArray2D) where
+module Raylib.Util (c'free, pop, popCArray, withArray2D, configsToBitflag) where
+
+import Raylib.Types (ConfigFlag)
 import Foreign (Ptr, Storable (peek), castPtr, newArray, free, peekArray)
 import Control.Monad (forM_)
-
+import Data.Bits ((.|.))
 -- Internal utility functions
 
 foreign import ccall "stdlib.h free" c'free :: Ptr () -> IO ()
@@ -26,4 +28,8 @@
     res <- func ptr
     forM_ arrays free
     free ptr
-    return res
+    return res
+
+configsToBitflag :: [ConfigFlag] -> Integer
+configsToBitflag = fromIntegral . foldr folder (toEnum 0) 
+    where folder a b = (fromEnum a) .|. b
