pub unsafe fn window_next_event(window: *mut Object) -> Result<()>
This function is unsafe because it may dereference raw pointers.