Reference

CL_ClanApplication(3)

The starting place for all applications.

NAME

CL_ClanApplication - The starting place for all applications.

DESCRIPTION

The application class must be inherited by all ClanLib applications. In your application create a class inheriting CL_ClanApplication, make a global instance of it, and fill in the main() and get_title() functions.

CLASS MEMBERS

CL_ClanApplication()
virtual ~CL_ClanApplication()
virtual char *get_title()
virtual void init_modules()
virtual void deinit_modules()
virtual int main(
int argc,
char** argv)

static CL_ClanApplication *app

MEMBERS WITH DESCRIPTIONS

CL_ClanApplication()
Description:

virtual ~CL_ClanApplication()
Description:

virtual char *get_title()
Description:

Every program made using ClanLib must implement this function. It returns the title of the application, which depending on the platform on which it is run, will be passed on to the operating system.

Return value:

The application title

virtual void init_modules()
Description:

Before main() is called, or before the datafile compiler is invoked, this function gets called. Use it to initialize libraries.

virtual void deinit_modules()
Description:

Called after main() or after the datafile compiler completes. Use it to shutdown libraries.

virtual int main(
int argc,
char** argv)

Parameters:
argc - The number of arguments to the program (c-style)
argv - A pointer to strings, containing the program arguments. The name of the program executable is always passed as first argument.

Description:

Every program made using ClanLib must implement this function. This is the main application function, which will be called _once_ following system initialization.

Return value:

Program return value

static CL_ClanApplication *app
Description:

Static pointer to an initialized instance of this class. This is set by the constructor.

SEE ALSO

All ClanLib API classes can be found in clanlib (3).

AUTHORS

Originally written by Magnus Norddahl <[email protected]> and Martin Starch <[email protected]>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at http://somewhere.in.the.world.org).

See clanlib (3) to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.