Syntax
void GtSetCloseMode( int mode );
Arguments
mode selects CLOSE_QUIT, CLOSE_KEY, or CLOSE_DISABLED.
Return value
No return value.
Description
Sets the action taken when the user requests closing the window. CLOSE_QUIT closes the application, CLOSE_KEY puts K_CLOSE in the input queue, which Inkey() returns with INKEY_GTEVENT in its mask, and CLOSE_DISABLED disables the close action.
Example
#include "xdev-wtui.h"
#include <stdio.h>
int main( void )
{
int previous = GtGetCloseMode();
GtSetCloseMode( CLOSE_KEY );
printf( "Close mode: %d\n", GtGetCloseMode() );
GtSetCloseMode( previous );
return 0;
}