1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

glfw: window add set resize callback method

This commit is contained in:
origel 2020-02-04 12:40:16 +08:00 committed by GitHub
parent 75eebb516f
commit 4d6958381d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,6 +184,10 @@ pub fn (w mut glfw.Window) set_mouse_button_callback(cb voidptr) {
C.glfwSetMouseButtonCallback(w.data, cb) 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) { pub fn (w mut glfw.Window) on_click(cb voidptr) {
C.glfwSetMouseButtonCallback(w.data, cb) C.glfwSetMouseButtonCallback(w.data, cb)
} }