glutCloseFunc - Man Page

Window destruction callback.

Library

OpenGLUT - windowcallback

Synopsis

#include <openglut.h>

void
glutCloseFunc(void( *callback )( void ));

Parameters


callback

Client window destruction hook.

Description

When a window is destroyed by user-action in traditional GLUT, the application terminates. In freeglut and OpenGLUT, the application can choose to persist and treat the window close event as a normal event. This callback is how that event is transmitted to the application.

This callback is bound to the


current window

.

Caveats

This function is


exactly

the same as glutWMCloseFunc(), which has been deprecated. This function should be used instead.

Todo

There needs to be some work to rationalize the behavior when a window is closed.

See Also

glutDestroyWindow(3)

Referenced By

glutMenuDestroyFunc(3), glutWMCloseFunc(3).