From 4d6958381dc5ed29f1f426f1b9478e70cfe0e631 Mon Sep 17 00:00:00 2001 From: origel Date: Tue, 4 Feb 2020 12:40:16 +0800 Subject: [PATCH] glfw: window add set resize callback method --- vlib/glfw/glfw.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlib/glfw/glfw.v b/vlib/glfw/glfw.v index b841fc7200..23291ce7ca 100644 --- a/vlib/glfw/glfw.v +++ b/vlib/glfw/glfw.v @@ -184,6 +184,10 @@ pub fn (w mut glfw.Window) set_mouse_button_callback(cb voidptr) { C.glfwSetMouseButtonCallback(w.data, cb) } +pub fn (w mut glfw.Window) on_resize(cb voidptr) { + C.glfwSetWindowSizeCallback(w.data, cb) +} + pub fn (w mut glfw.Window) on_click(cb voidptr) { C.glfwSetMouseButtonCallback(w.data, cb) }