Files
fz-lang/exl/linking.fzs
T
samsonium 567bf49d27 wip: working on dynamic linking
- Feat: add example for wrapping dynamically linked library
- Feat: add new tokens (import, extern, type, handle, struct, ref, out)
2026-10-28 21:43:56 +03:00

39 lines
773 B
Plaintext

extern "libglfw" {
type GLFWwindow = handle;
type GLFWmonitor = handle;
struct GLFWvidmode {
int width;
int height;
int redBits;
int greenBits;
int blueBits;
int refreshRate;
}
/// GLFWvidmode*
type GLFWvidmodeRef = ref GLFWvidmode;
/// Create window with specified [width], [height] and [title]
fn glfw_mkWindow(
int width,
int height,
str title,
GLFWmonitor mon,
GLFWwindow shr
) GLFWwindow = "glfwCreateWindow";
/// Get videomode from monitor [mon]
fn glfw_getVideoMode(
GLFWmonitor mon
) GLFWvidmodeRef = "glfwGetVideoMode";
/// Get framebuffer [width] and [height]
fn glfw_getFrameBufferSize(
GLFWwindow win,
out int width,
out int height
) = "glfwGetFramebufferSize";
}