#ifndef H_stopquit_H
#define H_stopquit_H
/* Action/status connected with Stop and Quit requests

$Id: stopquit,v 1.4 1999/10/05 22:34:02 joseph Exp $

*/

/* Type of action pending */
typedef enum {
  stopquit_Null,
  stopquit_Stop,
  stopquit_Quit,
  stopquit_Shutdown
} stopquit_t;

extern stopquit_t stopquit_pending; /* true if there's a stop/quit event that hasn't been actioned yet */

/* One time initialisation */
void stopquit_init( int /*winhan*/ );

/* Open/close Quit box, using stopquit_t as client handle
   task only matters for shutdown */
void stopquit_show(stopquit_t, int task);
void stopquit_hide(void);

/* Take pending action */
void stopquit_act(stopquit_t);
int stopquit_click( int winhan, int icon, int but );


typedef void(*stopquit_func_t)(stopquit_t /* action */, void * /* handle */);


/* called when a stopquit event occurs */
void stopquit_handler( stopquit_t /*action*/ );
/* call to register handler for above event */
void stopquit_registerhandler( stopquit_func_t /*func*/, void * /*handle*/ );
/* call to deregister handler for above event */
void stopquit_deregister( void );



#endif
