next up previous contents
Next: Controller Up: Implementation Previous: gKheops modifications   Contents

Main function

The main function is responsible for initialization of global variables and starting the user interface. The source code of the main function is placed in ./main.c in the Osiris source code tree and given in Fig 5.3.

There are several global variables. They are declared and well commented in ./main.h file in the Osiris source code tree.

The initialization of user interface creates all top-level windows such as controller_window and editor_window which are the main windows of the Controller and the Editor modules respectively.

Furthermore the main function starts a GTK main loop which controls the behavior of the user interface (see Section 5.4 and Appendix B).

Figure 5.3: The source code of the main function of the Osiris system
\begin{figure}\begin{center}
\begin{verbatim}int
main (int argc, char *argv[])...
...als();
g_free(global_font);
return 0;
}\end{verbatim} \end{center}\end{figure}



Igor Wojnicki 2001-02-21