File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ module DearImGui.GLFW (
23
23
-- $callbacks
24
24
, glfwWindowFocusCallback
25
25
, glfwCursorEnterCallback
26
+ , glfwCursorPosCallback
26
27
, glfwMouseButtonCallback
27
28
, glfwScrollCallback
28
29
, glfwKeyCallback
@@ -108,6 +109,20 @@ glfwCursorEnterCallback window entered = liftIO do
108
109
where
109
110
windowPtr = castPtr $ unWindow window
110
111
112
+ glfwCursorPosCallback :: MonadIO m => Window -> CDouble -> CDouble -> m ()
113
+ glfwCursorPosCallback window x y = liftIO do
114
+ [C. exp | void {
115
+ ImGui_ImplGlfw_CursorPosCallback(
116
+ static_cast<GLFWwindow *>(
117
+ $(void * windowPtr)
118
+ ),
119
+ $(double x),
120
+ $(double y)
121
+ );
122
+ } |]
123
+ where
124
+ windowPtr = castPtr $ unWindow window
125
+
111
126
glfwMouseButtonCallback :: MonadIO m => Window -> CInt -> CInt -> CInt -> m ()
112
127
glfwMouseButtonCallback window button action mods = liftIO do
113
128
[C. exp | void {
You can’t perform that action at this time.
0 commit comments