callbackMouseButton :: IORef GLFWState -> Callbacks
                    -> GLFW.Window -> GLFW.MouseButton -> GLFW.MouseButtonState
                    -> GLFW.ModifierKeys -> IO ()
callbackMouseButton ref callbacks _ button state _ =
  whenWindow_ ref $ \glfwWin -> do
  (posX, posY) <- GLFW.getCursorPos glfwWin
  mouseButtonCallback callbacks ref button' state' $ V2 posX posY
  where
    button'   = fromGLFW button
    state' = fromGLFW state


-- Scroll Callback ------------------------------------------------------------
callbackMouseButton :: IORef GLFWState -> Callbacks
                    -> GLFW.Window -> GLFW.MouseButton -> GLFW.MouseButtonState
                    -> GLFW.ModifierKeys -> IO ()
callbackMouseButton ref callbacks _ button state _ =
  whenWindow_ ref $ \glfwWin -> do
  (posX, posY) <- GLFW.getCursorPos glfwWin
  mouseButtonCallback callbacks ref button' state' $ V2 posX posY
  where
    button'   = fromGLFW button
    state' = fromGLFW state


-- Scroll Callback ------------------------------------------------------------
callbackMouseButton ref callbacks _ button state _ =
  whenWindow_ ref $ \glfwWin -> do
  (posX, posY) <- GLFW.getCursorPos glfwWin
  mouseButtonCallback callbacks ref button' state' $ V2 posX posY
  where
    button'   = fromGLFW button
    state' = fromGLFW state


-- Scroll Callback ------------------------------------------------------------