![]() | ![]() | ![]() | Criawips Reference Manual | ![]() |
---|
CriaApplication — Application Object for Criawips
struct CriaApplication; struct CriaApplicationClass; struct CriaApplicationPriv; void criawips_init (int *argc, char ***argv); void criawips_quit (void); void cria_application_add_to_recent (const gchar *text_uri); CriaApplication* cria_application_get_instance (void); EggRecentModel* cria_application_get_recent_model (void); void cria_application_register_window (CriaMainWindow *window); void cria_application_show_error_dialog (GtkWindow *parent, gchar const *title, gchar const *message);
The CriaApplication is used as the object that represents a running application. It's supposed to parse command line arguments, to connect to running processes, manage main windows, etc.
CriaApplication implements a Singleton. You can get the instance by calling cria_application_get_instance.
struct CriaApplication { GObject base_instance; CriaApplicationPriv * priv; };
void criawips_init (int *argc, char ***argv);
Initializes the application. criawips_init parses the command line arguments and strips those arguments it understood from argc and argv.
argc : | pointer to argc as delivered to the main() method |
argv : | pointer to the argument vector as delivered to the main() method |
void criawips_quit (void);
Quit Criawips, close all application windows and then exit the application.
void cria_application_add_to_recent (const gchar *text_uri);
text_uri : |
CriaApplication* cria_application_get_instance (void);
As CriaApplication is a singleton, this method delivers the single instance.
Returns : | the instance of the application |
EggRecentModel* cria_application_get_recent_model (void);
Returns : |
void cria_application_register_window (CriaMainWindow *window);
Registers a CriaMainWindow to the application. Thus it's being propted to close the file before quitting.
window : | a main window to be registeres by the application |
void cria_application_show_error_dialog (GtkWindow *parent, gchar const *title, gchar const *message);
Shows an error dialog. To be used when fatal things happen (e.g. loading the ui definitions from the glade file failed). parent is used to specify a window that this dialog is transient to.
parent : | a GtkWindow or NULL |
title : | the dialog title |
message : | the dialog message |
<< Part IV. Application Classes | PreferencesDialog >> |