This commit is contained in:
2024-07-28 14:22:17 +01:00
commit 319ba58b3e
17 changed files with 5124 additions and 0 deletions

14
ffi/glfw-key-input.c Normal file
View File

@@ -0,0 +1,14 @@
#include "export.h"
#include <GLFW/glfw3.h>
#include <stdbool.h>
// Calls function exported from SML
void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods) {
printFromMLton(key, scancode, action, mods);
}
// Call this from MLton to register key callback with GLFW.
void setKeyCallback(GLFWwindow *window) {
glfwSetKeyCallback(window, keyCallback);
}