Documentation from appquit.h

ROV

Introduction

[top]

ROVLib - Easy applications from C

Copyright - © Jason Tribbeck / 7th ARM 1994-2001

Contributing authors - Jason Tribbeck

File - appquit.h

Type - subsystem

Description

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.

appquit_handler (function pointer)

[top]

Definition of an appquit handler function.

typedef void (*appquit_handler)(void);

See also: appquit_init()

appquit_init

[top]

Initialise the appquit subsystem.

Parameters:

 - appquit_handler handler - the appquit handler function.

void appquit_init(appquit_handler handler);

See also: appquit_handler()

appquit_seteditedfiles

[top]

Set the number of edited files.

Parameters:

 - int number - the number of edited files.

void appquit_seteditedfiles(int number);

See also: appquit_addeditedfiles(), appquit_quit()

appquit_addeditedfiles

[top]

Add to the number of edited files.

Parameters:

 - int difference - the difference in the number of edited files

void appquit_addeditedfiles(int difference);

See also: appquit_quit(), appquit_seteditedfiles()

appquit_quit

[top]

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