heraia.c File Reference


Detailed Description

This is the main program file.

Initialization is done here and then hand is passed to gtk's main thread

Definition in file heraia.c.

#include "heraia_types.h"

Include dependency graph for heraia.c:

Go to the source code of this file.

Functions

static gboolean version (void)
 prints program name, version, author, date and licence to the standard output
static gboolean usage (int status)
 Function that informs the user about the command line options available with heraia.
static window_prop_tinit_window_properties (gint x, gint y, gboolean displayed)
 Inits the properties of a window with defined values.
static heraia_window_tinit_window_property_struct (heraia_window_t *main_window)
 Inits the window property structure.
static heraia_window_theraia_init_main_struct (void)
 Initialize the main structure (main_window).
static HERAIA_ERROR init_heraia_plugin_system (heraia_window_t *main_window)
 Function that initializes the plugin system if any :
  • loads any plugin where expected to be found
  • inits the plugin window.

static GList * init_heraia_location_list (void)
 Here we want to init the location list where we might look for in the future.
static gboolean manage_command_line_options (Options *opt, int argc, char **argv)
 Manages all the command line options and populates the Options *opt structure accordingly.
heraia_window_tget_main_struct (void)
 This is intended to be called by the library or any program that will use the library in order to get the pointer to the main structure heraia_window_t.
int main (int argc, char **argv)
 main program options :
  • --version
  • --help


Variables

static heraia_window_tlibheraia_main_struct = NULL
 libheraia_main_struct is a global variable that points to the main structure and is intended for the library use ONLY ! It should not be used anywhere else or for any other purpose


Function Documentation

heraia_window_t* get_main_struct ( void   ) 

This is intended to be called by the library or any program that will use the library in order to get the pointer to the main structure heraia_window_t.

Returns:
heraia_window_t *, a pointer to the main structure

Definition at line 60 of file heraia.c.

static heraia_window_t * heraia_init_main_struct ( void   )  [static]

Initialize the main structure (main_window).

Returns:
a pointer to a newly initialized main structure

First, in this early stage of the development we want to toggle debugging mode ON which is enabled by default in the configure.ac file !

Definition at line 177 of file heraia.c.

References heraia_window_t::available_treatment_list, heraia_window_t::current_data_type, heraia_window_t::current_doc, heraia_window_t::current_DW, data_window_t::current_hexwidget, heraia_window_t::data_type_list, heraia_window_t::debug, data_window_t::diw, ENABLE_DEBUG, prefs_t::file, heraia_window_t::filename, prefs_t::filename, init_heraia_location_list(), init_treatments(), init_window_property_struct(), heraia_window_t::location_list, xml_t::main, prefs_t::pathname, heraia_window_t::plugins_list, heraia_window_t::prefs, data_window_t::tab_displayed, verify_preference_file(), and heraia_window_t::xmls.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static GList * init_heraia_location_list ( void   )  [static]

Here we want to init the location list where we might look for in the future.

These can be viewed as default paths

Warning:
when adding new locations, keep in ming that the list is a prepended list in reverse order.
Returns:
a new allocatde GList containing all locations

Definition at line 273 of file heraia.c.

Referenced by heraia_init_main_struct().

Here is the caller graph for this function:

static HERAIA_ERROR init_heraia_plugin_system ( heraia_window_t main_window  )  [static]

Function that initializes the plugin system if any :

  • loads any plugin where expected to be found
  • inits the plugin window.

Parameters:
main_window : main structure (heraia_window_t *)
Returns:
HERAIA_NO_PLUGINS if no plugins where found or HERAIA_NOERR in case of no errors

Definition at line 244 of file heraia.c.

References HERAIA_NO_PLUGINS, HERAIA_NOERR, load_plugins(), log_message(), plugin_capable(), and plugin_list_window_init_interface().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static window_prop_t * init_window_properties ( gint  x,
gint  y,
gboolean  displayed 
) [static]

Inits the properties of a window with defined values.

Parameters:
x,y are x,y coordinates on the screen
displayed says wether the window is displayed or not
Returns:
a new allocated window_prop_t * structure.

Definition at line 112 of file heraia.c.

References window_prop_t::displayed, window_prop_t::x, and window_prop_t::y.

Referenced by init_window_property_struct().

Here is the caller graph for this function:

static heraia_window_t * init_window_property_struct ( heraia_window_t main_window  )  [static]

Inits the window property structure.

Parameters:
main_window : main structure
Returns:
main structure with an initiated window property structure

Definition at line 133 of file heraia.c.

References all_window_prop_t::about_box, all_window_prop_t::data_interpretor, H_DI_DISPLAYED, init_window_properties(), all_window_prop_t::ldt, all_window_prop_t::log_box, all_window_prop_t::main_dialog, all_window_prop_t::main_pref_window, all_window_prop_t::plugin_list, and heraia_window_t::win_prop.

Referenced by heraia_init_main_struct().

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

static gboolean manage_command_line_options ( Options opt,
int  argc,
char **  argv 
) [static]

Manages all the command line options and populates the Options *opt structure accordingly.

Parameters:
opt (Options *opt) filled here with the parameters found in **argv
argc : number of command line arguments
argv : array of string (char *) that contains arguments
Returns:
gboolean that seems to always be TRUE

Todo:
manage a list of filenames instead of one filename

Definition at line 327 of file heraia.c.

References Options::filename, long_options, usage(), Options::usage, and version().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean usage ( int  status  )  [static]

Function that informs the user about the command line options available with heraia.

Parameters:
status : integer that indicate wether to display help (!=0) or an error message (0)
Returns:
  • TRUE -> help message has been printed
  • FALSE -> error message has been printed

Definition at line 85 of file heraia.c.

References version().

Referenced by manage_command_line_options().

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean version ( void   )  [static]

prints program name, version, author, date and licence to the standard output

Author:
Olivier DELHOMME, Sébastien TRICAUD, Grégory AUDET
Version:
0.0.7
Date:
2005-2009

Definition at line 69 of file heraia.c.

References HERAIA_AUTHORS, HERAIA_DATE, HERAIA_LICENSE, and HERAIA_VERSION.

Referenced by manage_command_line_options(), and usage().

Here is the caller graph for this function:


Variable Documentation

libheraia_main_struct is a global variable that points to the main structure and is intended for the library use ONLY ! It should not be used anywhere else or for any other purpose

Definition at line 52 of file heraia.c.


Generated on Sat Feb 14 11:44:20 2009 for Heraia by  doxygen 1.5.6