|
GLG Toolkit, C / C++ API Library
Version 4.5
|
#include "GlgApi.h"Functions | |
| int | GlgMain (int argc, char *argv[], GlgAppContext context) |
| A prototype for the cross-platform program entry point that handles argc and argv parameters the same way on all platforms. More... | |
| int GlgMain | ( | int | argc, |
| char * | argv[], | ||
| GlgAppContext | context | ||
| ) |
A prototype for the cross-platform program entry point that handles argc and argv parameters the same way on all platforms.
| argc | Number of command line parameters. |
| argv | Command line parameter list. |
| context | An application context:
|
On Linux/Unix, GlgMain supplies the main entry point.
On Windows, GlgMain supplies the WinMain entry point and parses its lpCmdLine argument to extract cross-platform argc and argv arguments.
To use GlgMain, include the GlgMain.h file and use GlgMain in the program as shown in the example below.
The following C code demonstrates an example of a GLG application code that uses GLG Generic API to display a GLG drawing in a cross-platform way. This code can compiled and used without any changes in either the X11, Gtk or Windows environment:
The following is the C++ version of the example that displays a GLG drawing in a cross-platform way: