Rob Fletcher
05-02-2002, 05:25 AM
Hi,
I have done some X11 updates today, having just tried glfw for the first time ....
I have added ...
glfwSetWMCloseCallback( shut );
glfwSetIconCallback( icon );
glfwSetVisibilityCallback( viz );
where "shut,icon and viz" were my user supplied callback functions. You provide whatever you want!
So that you can trap a Window Manager close and terminate gracefully. (Default handler action is to glfwTerminate();exit(0); )
You can detect when iconised and call a handler e.g. to switch off updates etc and conserve cpu cycles! (Default action is to do nothing)
You can detect 3 visibility states ...
0 = fully visible
1 = partially visible (either covered
by another or part off screen)
2 = fully obscured (also set when iconised)
(Default action is to do nothing)
Marcus, if you want the code additions, email
me. r.fletcher@york.ac.uk
Anyone else?
I will attempt to hack the win32 stuff, but maybe someone else would like to incorporate my offerings into the win32 codebase??
Cheers,
Rob.
I have done some X11 updates today, having just tried glfw for the first time ....
I have added ...
glfwSetWMCloseCallback( shut );
glfwSetIconCallback( icon );
glfwSetVisibilityCallback( viz );
where "shut,icon and viz" were my user supplied callback functions. You provide whatever you want!
So that you can trap a Window Manager close and terminate gracefully. (Default handler action is to glfwTerminate();exit(0); )
You can detect when iconised and call a handler e.g. to switch off updates etc and conserve cpu cycles! (Default action is to do nothing)
You can detect 3 visibility states ...
0 = fully visible
1 = partially visible (either covered
by another or part off screen)
2 = fully obscured (also set when iconised)
(Default action is to do nothing)
Marcus, if you want the code additions, email
me. r.fletcher@york.ac.uk
Anyone else?
I will attempt to hack the win32 stuff, but maybe someone else would like to incorporate my offerings into the win32 codebase??
Cheers,
Rob.