Heraia
0.1.8
|
This is the main program file. More...
#include "heraia_types.h"
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 More... | |
static gboolean | usage (int status) |
Function that informs the user about the command line options available with heraia. More... | |
static window_prop_t * | init_window_properties (gint x, gint y, guint height, guint width, gboolean displayed) |
Inits the properties of a window with defined values. More... | |
static heraia_struct_t * | init_window_property_struct (heraia_struct_t *main_struct) |
Inits the window property structure. More... | |
static heraia_struct_t * | heraia_init_main_struct (gchar *heraia_path) |
Initialize the main structure (main_struct) More... | |
static HERAIA_ERROR | init_heraia_plugin_system (heraia_struct_t *main_struct) |
Function that initializes the plugin system if any : More... | |
static GList * | init_heraia_location_list (gchar *heraia_path) |
Here we want to init the location list where we might look for in the future. More... | |
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. More... | |
static void | print_lirairies_versions (void) |
Prints on stdout the librairies versions. More... | |
heraia_struct_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_struct_t. More... | |
static void | init_international_languages (void) |
Inits internationalisation (don't know wether it works or not!) More... | |
static gboolean | do_heraia_coverage_tests (heraia_struct_t *main_struct) |
Does some self tests for code coverage in heraia. More... | |
static gboolean | do_heraia_loading_tests (heraia_struct_t *main_struct) |
Does some loading tests in heraia. More... | |
static Options * | init_options_struct (void) |
Inits the Options struct that contains all stuff needed to managed command line options within heraia. More... | |
int | main (int argc, char **argv) |
main program options : More... | |
Variables | |
static heraia_struct_t * | libheraia_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 More... | |
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.
|
static |
Does some self tests for code coverage in heraia.
This function does some calls to functions that are not called on a normal test procedure
main_struct | : main structure (heraia_struct_t *) |
Definition at line 399 of file heraia.c.
References get_main_struct(), test_decode_functions(), usage(), and version().
Referenced by main().
|
static |
Does some loading tests in heraia.
main_struct | : main structure (heraia_struct_t *) |
Definition at line 429 of file heraia.c.
Referenced by main().
heraia_struct_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_struct_t.
Definition at line 64 of file heraia.c.
References libheraia_main_struct.
Referenced by do_heraia_coverage_tests().
|
static |
Initialize the main structure (main_struct)
heraia_path | is the path used to invoke heraia : '/usr/bin/heraia' invocation would lead to '/usr/bin' |
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 208 of file heraia.c.
References heraia_struct_t::current_doc, heraia_struct_t::current_DW, heraia_struct_t::debug, data_window_t::diw, heraia_struct_t::documents, ENABLE_DEBUG, heraia_struct_t::fdft, heraia_struct_t::find_doc, heraia_struct_t::fr_find_doc, heraia_struct_t::fr_replace_doc, init_heraia_location_list(), init_preference_struct(), init_window_property_struct(), heraia_struct_t::location_list, xml_t::main, heraia_struct_t::plugins_list, heraia_struct_t::prefs, heraia_struct_t::results, data_window_t::tab_displayed, verify_preference_file(), and heraia_struct_t::xmls.
Referenced by main().
|
static |
Here we want to init the location list where we might look for in the future.
These can be viewed as default paths
Definition at line 304 of file heraia.c.
Referenced by heraia_init_main_struct().
|
static |
Function that initializes the plugin system if any :
main_struct | : main structure (heraia_struct_t *) |
Definition at line 274 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().
|
static |
Inits internationalisation (don't know wether it works or not!)
Definition at line 368 of file heraia.c.
References ENABLE_DEBUG, and GETTEXT_PACKAGE.
Referenced by main().
|
static |
Inits the Options struct that contains all stuff needed to managed command line options within heraia.
< Structure to manage prgram's options
Definition at line 512 of file heraia.c.
References Options::filenames, NO_TESTS, Options::tests, and Options::usage.
Referenced by main().
|
static |
Inits the properties of a window with defined values.
x,y | are x,y coordinates on the screen |
height | represents the height of the window |
width | represents the width of the window. x+height,y+width is window's right bottom corner |
displayed | says wether the window is displayed or not |
Definition at line 125 of file heraia.c.
References window_prop_t::displayed, window_prop_t::height, window_prop_t::width, window_prop_t::x, and window_prop_t::y.
Referenced by init_window_property_struct().
|
static |
Inits the window property structure.
main_struct | : main structure |
Definition at line 148 of file heraia.c.
References all_window_prop_t::about_box, all_window_prop_t::data_interpretor, all_window_prop_t::fdft_window, all_window_prop_t::find_window, all_window_prop_t::fr_window, all_window_prop_t::goto_window, 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, all_window_prop_t::result_window, heraia_struct_t::win_prop, WPT_DEFAULT_HEIGHT, and WPT_DEFAULT_WIDTH.
Referenced by heraia_init_main_struct().
int main | ( | int | argc, |
char ** | argv | ||
) |
main program options :
< A structure to manage the command line options
Definition at line 544 of file heraia.c.
References COVERAGE_TESTS, heraia_struct_t::current_DW, heraia_struct_t::debug, do_heraia_coverage_tests(), do_heraia_loading_tests(), prefs_t::filename, Options::filenames, heraia_init_main_struct(), init_heraia_interface(), init_heraia_plugin_system(), init_international_languages(), init_options_struct(), libheraia_finalize(), libheraia_initialize(), libheraia_test(), load_file_to_analyse(), load_heraia_ui(), LOADING_TESTS, heraia_struct_t::location_list, log_message(), manage_command_line_options(), heraia_struct_t::prefs, print_lirairies_versions(), data_window_t::tab_displayed, Options::tests, and Options::usage.
|
static |
Manages all the command line options and populates the Options *opt structure accordingly.
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 |
Definition at line 443 of file heraia.c.
References COVERAGE_TESTS, Options::filenames, long_options, Options::tests, usage(), Options::usage, and version().
Referenced by main().
|
static |
|
static |
Function that informs the user about the command line options available with heraia.
status | : integer that indicate wether to display help (!=0) or an error message (0) |
Definition at line 90 of file heraia.c.
References COVERAGE_TESTS, LOADING_TESTS, and version().
Referenced by do_heraia_coverage_tests(), and manage_command_line_options().
|
static |
prints program name, version, author, date and licence to the standard output
Definition at line 74 of file heraia.c.
References HERAIA_AUTHORS, HERAIA_DATE, HERAIA_LICENSE, and HERAIA_VERSION.
Referenced by do_heraia_coverage_tests(), manage_command_line_options(), and usage().
|
static |
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 56 of file heraia.c.
Referenced by get_main_struct().