GladeApp

GladeApp — The central control point of the Glade core.

Functions

Types and Values

Description

This main control object is where we try to draw the line between what is the Glade core and what is the main application. The main application must derive from the GladeApp object and create an instance to initialize the Glade core.

Functions

glade_app_new ()

GladeApp *
glade_app_new (void);

Returns

the GladeApp.

[transfer full]


glade_pointer_mode_get_type ()

GType
glade_pointer_mode_get_type (void);

glade_app_get ()

GladeApp *
glade_app_get (void);

Returns

the GladeApp.

[transfer none]


glade_app_set_window ()

void
glade_app_set_window (GtkWidget *window);

Set the window of the application

Parameters

window

a GtkWidget.

[transfer full]

glade_app_get_window ()

GtkWidget *
glade_app_get_window (void);

Returns

a GtkWidget.

[transfer none]


glade_app_get_clipboard ()

GladeClipboard *
glade_app_get_clipboard (void);

Returns

a GladeClipboard.

[transfer none]


glade_app_add_project ()

void
glade_app_add_project (GladeProject *project);

Parameters

project

the project to add to the GladeApp

 

glade_app_remove_project ()

void
glade_app_remove_project (GladeProject *project);

Parameters

project

the project to remove from the GladeApp

 

glade_app_get_projects ()

GList *
glade_app_get_projects (void);

Returns

a list of GladeCatalog.

[element-type GladeCatalog][transfer none]


glade_app_get_config ()

GKeyFile *
glade_app_get_config (void);

Returns

a GKeyFile.

[transfer full]


glade_app_is_project_loaded ()

gboolean
glade_app_is_project_loaded (const gchar *project_path);

glade_app_get_project_by_path ()

GladeProject *
glade_app_get_project_by_path (const gchar *project_path);

Finds an open project with path

Parameters

project_path

The path of an open project

 

Returns

A GladeProject, or NULL if no such open project was found.

[nullable][transfer none]


glade_app_config_save ()

gint
glade_app_config_save (void);

Saves the GKeyFile to "g_get_user_config_dir()/GLADE_CONFIG_FILENAME"

Returns

0 on success.


glade_app_set_accel_group ()

void
glade_app_set_accel_group (GtkAccelGroup *accel_group);

Sets accel_group to app. The acceleration group will made available for editor dialog windows from the plugin backend.

Parameters

accel_group

a GtkAccelGroup to set.

[transfer full]

glade_app_get_catalogs_dir ()

const gchar *
glade_app_get_catalogs_dir (void);

glade_app_get_modules_dir ()

const gchar *
glade_app_get_modules_dir (void);

glade_app_get_pixmaps_dir ()

const gchar *
glade_app_get_pixmaps_dir (void);

glade_app_get_locale_dir ()

const gchar *
glade_app_get_locale_dir (void);

glade_app_do_event ()

gboolean
glade_app_do_event (GdkEvent *event);

This function has to be called in an event handler for widget selection to work. See gdk_event_handler_set()

Parameters

event

the event to process.

 

Returns

true if the event was handled.


glade_app_get_accel_group ()

GtkAccelGroup *
glade_app_get_accel_group (void);

Returns

the GtkAccelGroup.

[transfer none]


glade_app_get_bin_dir ()

const gchar *
glade_app_get_bin_dir (void);

glade_app_get_catalog ()

GladeCatalog *
glade_app_get_catalog (const gchar *name);

Parameters

name

the name of the catalog

 

Returns

a GladeCatalog or NULL if none is found.

[transfer none][nullable]


glade_app_get_catalog_version ()

gboolean
glade_app_get_catalog_version (const gchar *name,
                               gint *major,
                               gint *minor);

Parameters

name

the name of the GladeCatalog

 

major

the major version.

[out][optional]

minor

the minor version.

[out][optional]

Returns

TRUE if the catalog has been found. It is a programming error to call this function with an unexisting catalog, returns FALSE in this case and throws a warning.


glade_app_get_catalogs ()

GList *
glade_app_get_catalogs (void);

Returns

a list of GladeCatalog.

[transfer none][element-type GladeCatalog]


glade_app_get_lib_dir ()

const gchar *
glade_app_get_lib_dir (void);

glade_app_search_docs ()

void
glade_app_search_docs (const gchar *book,
                       const gchar *page,
                       const gchar *search);

Searches for book , page and search in the documentation.

Parameters

book

the name of a book

 

page

the name of a page

 

search

the search query

 

Types and Values

GladeApp

typedef struct _GladeApp GladeApp;