mirror of
https://github.com/Drezil/dear-imgui.hs.git
synced 2024-11-22 08:56:59 +00:00
Add new GLFW callback from 1.87 (#128)
This commit is contained in:
parent
ccdff36774
commit
ae3fdb8bc3
@ -23,6 +23,7 @@ module DearImGui.GLFW (
|
|||||||
-- $callbacks
|
-- $callbacks
|
||||||
, glfwWindowFocusCallback
|
, glfwWindowFocusCallback
|
||||||
, glfwCursorEnterCallback
|
, glfwCursorEnterCallback
|
||||||
|
, glfwCursorPosCallback
|
||||||
, glfwMouseButtonCallback
|
, glfwMouseButtonCallback
|
||||||
, glfwScrollCallback
|
, glfwScrollCallback
|
||||||
, glfwKeyCallback
|
, glfwKeyCallback
|
||||||
@ -108,6 +109,20 @@ glfwCursorEnterCallback window entered = liftIO do
|
|||||||
where
|
where
|
||||||
windowPtr = castPtr $ unWindow window
|
windowPtr = castPtr $ unWindow window
|
||||||
|
|
||||||
|
glfwCursorPosCallback :: MonadIO m => Window -> CDouble -> CDouble -> m ()
|
||||||
|
glfwCursorPosCallback window x y = liftIO do
|
||||||
|
[C.exp| void {
|
||||||
|
ImGui_ImplGlfw_CursorPosCallback(
|
||||||
|
static_cast<GLFWwindow *>(
|
||||||
|
$(void * windowPtr)
|
||||||
|
),
|
||||||
|
$(double x),
|
||||||
|
$(double y)
|
||||||
|
);
|
||||||
|
} |]
|
||||||
|
where
|
||||||
|
windowPtr = castPtr $ unWindow window
|
||||||
|
|
||||||
glfwMouseButtonCallback :: MonadIO m => Window -> CInt -> CInt -> CInt -> m ()
|
glfwMouseButtonCallback :: MonadIO m => Window -> CInt -> CInt -> CInt -> m ()
|
||||||
glfwMouseButtonCallback window button action mods = liftIO do
|
glfwMouseButtonCallback window button action mods = liftIO do
|
||||||
[C.exp| void {
|
[C.exp| void {
|
||||||
|
Loading…
Reference in New Issue
Block a user