ROVLib - Easy applications from C
Copyright - © Jason Tribbeck / 7th ARM 1994-2001
Contributing authors - Jason Tribbeck
File - appquit.h
Type - subsystem
The appquit subsystem is designed to handle applications exiting, either through a menu, or reception of the WIMP task shutdown message.
The subsystem maintains a number of 'edited files', which if zero allows an application to terminate when requested, or if non-zero will call the unique handler function, whose purpose is to report the number of opened files and give the user to actually terminate the program, or to abort the termination.
The application does not have to have actual editied files; this is merely a concept. For example, for a terminal emulator, you could have 'opened windows' instead.
Definition of an appquit handler function.typedef void (*appquit_handler)(void);
See also: appquit_init()
Initialise the appquit subsystem.
- appquit_handler handler - the appquit handler function.void appquit_init(appquit_handler handler);
See also: appquit_handler()
Set the number of edited files.
- int number - the number of edited files.void appquit_seteditedfiles(int number);
See also: appquit_addeditedfiles(), appquit_quit()
Add to the number of edited files.
- int difference - the difference in the number of edited filesvoid appquit_addeditedfiles(int difference);
See also: appquit_quit(), appquit_seteditedfiles()
Called by the application when "Quit" is chosen from the application's menu.
Note - This is not automatically called, and must be done by the application code.void appquit_quit(void);
See also: appquit_addeditedfiles(), appquit_seteditedfiles()
Generated Thu Feb 7 23:22:51 2002