![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
void initVisuMain (); gboolean quitVisu (gpointer data); gboolean visuBasicLoad_dataFromFile (VisuData *data, FileFormat *format, GError **error); int mainWithGtk (int argc, char *argv[]); void loadFileWithoutGtk (VisuData *data); int dumpToImage (VisuData *data); int mainExport (void);
There are here the main functions of V_Sim (except for graphical methods) such as open file.
void initVisuMain ();
A call to this method is done at startup after having probe the locale of the file system and having initialized the rendering window. It makes the following actions : create the visu object to store the signals, initialize the module part (parameters, and resources), initialize the dump part, the OpenGL part and its extensions, the storage of elements and the 'colorize with data' part.
gboolean quitVisu (gpointer data);
A call to this method makes the GMainLoop stop.
data : |
a pointer to the GMainLoop. |
Returns : | FALSE, always. |
gboolean visuBasicLoad_dataFromFile (VisuData *data, FileFormat *format, GError **error);
This calls the load method of the current rendering
method. Some informations may be store in error->message
if the returned
value is FALSE.
The file(s) which is(are) opened is(are) stored in the
VisuData.
data : |
a VisuData object ; |
format : |
a pointer on a format (can be NULL if format is to be guessed) ; |
error : |
a pointer to store a possible error, location must be initialized to (GError*)0. |
Returns : | TRUE if everithing is OK, if FALSE, the error is set and should be freed
with g_error_free() .
|
int mainWithGtk (int argc, char *argv[]);
This is only a header, define in gtk_main.c. It initializes the GTK part of V_Sim : all subpanels, pick and observe window, pair window...
argc : |
the number of arguments. |
argv : |
the values of all arguments. |
Returns : | 1 if something goes wrong, 0 otherwise. |
void loadFileWithoutGtk (VisuData *data);
This method creates a VisuData from the file which is stored in the
visu_object through a call to setFileLoaded()
. And it calls the renderStoredData()
method.
data : |
a pointer to some user defined data. |
int dumpToImage (VisuData *data);
This method analyzes the data
parameter to find the file format for export
and call dump functions.
data : |
the VisuData to be exported. |
Returns : | 0 if no error occured. |