glfw: window add set resize callback method

pull/3646/head
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
1 changed files with 4 additions and 0 deletions

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)
} }