CriaApplication

CriaApplication —

Synopsis




            CriaApplication;
            CriaApplicationClass;
            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 *primary,
                                             gchar const *secondary);

Description

Details

CriaApplication

typedef struct {
	GObject			  base_instance;
	CriaApplicationPriv	* priv;
} CriaApplication;


CriaApplicationClass

typedef struct {
	GObjectClass		  base_class;
	void (*changed_default_font) (void);
} CriaApplicationClass;


CriaApplicationPriv

typedef struct _CriaApplicationPriv CriaApplicationPriv;


criawips_init ()

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

criawips_quit ()

void        criawips_quit                   (void);

Quit Criawips, close all application windows and then exit the application.


cria_application_add_to_recent ()

void        cria_application_add_to_recent  (const gchar *text_uri);

text_uri :

cria_application_get_instance ()

CriaApplication* cria_application_get_instance
                                            (void);

As CriaApplication is a singleton, this method delivers the single instance.

Returns : the instance of the application

cria_application_get_recent_model ()

EggRecentModel* cria_application_get_recent_model
                                            (void);

Returns :

cria_application_register_window ()

void        cria_application_register_window
                                            (CriaMainWindow *window);

Registers a CriaMainWindow to the application. So it's being propted to close the file before quitting.

window : a main window to be registeres by the application

cria_application_show_error_dialog ()

void        cria_application_show_error_dialog
                                            (GtkWindow *parent,
                                             gchar const *primary,
                                             gchar const *secondary);

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
primary : the primary dialog message, the short description
secondary : the secondary dialog message, a detailed description; may be NULL