geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

main.h File Reference

Main program-related commands. More...

#include <glib.h>
Include dependency graph for main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


void main_reload_configuration (void)
 Reloads most of Geany's configuration files without restarting. More...
void main_locale_init (const gchar *locale_dir, const gchar *gettext_package)
 Initialises the gettext translation system. More...
gboolean main_is_realized (void)
 Checks whether the main window has been realized. More...

Detailed Description

Main program-related commands.

Handles program initialization and cleanup.

Definition in file main.h.

Function Documentation

◆ main_is_realized()

gboolean main_is_realized ( void  )

Checks whether the main window has been realized.

This is an easy indicator whether Geany is right now starting up (main window is not yet realized) or whether it has finished the startup process (main window is realized). This is because the main window is realized (i.e. actually drawn on the screen) at the end of the startup process.

Maybe you want to use the "geany-startup-complete" signal to get notified about the completed startup process.
TRUE if the Geany main window has been realized or FALSE otherwise.

Definition at line 458 of file libmain.c.

References main_status.

◆ main_locale_init()

void main_locale_init ( const gchar *  locale_dir,
const gchar *  package 

Initialises the gettext translation system.

This is a convenience function to set up gettext for internationalisation support in external plugins. You should call this function early in plugin_init(). If the macro HAVE_LOCALE_H is defined, setlocale(LC_ALL, "") is called. The codeset for the message translations is set to UTF-8.

Note that this function only setups the gettext textdomain for you. You still have to adjust the build system of your plugin to get internationalisation support working properly.

If you have already used PLUGIN_SET_TRANSLATABLE_INFO() you don't need to call main_locale_init() again as it has already been done.

locale_dirThe location where the translation files should be searched. This is usually the LOCALEDIR macro, defined by the build system. E.g. $prefix/share/locale. Only used on non-Windows systems. On Windows, the directory is determined by g_win32_get_package_installation_directory().
packageThe package name, usually this is the GETTEXT_PACKAGE macro, defined by the build system.

Definition at line 489 of file libmain.c.

References bind_textdomain_codeset, bindtextdomain, and utils_resource_dir().

Referenced by geany_load_module(), and main_lib().

◆ main_reload_configuration()

void main_reload_configuration ( void  )

Reloads most of Geany's configuration files without restarting.

Currently the following files are reloaded: all template files, also new file templates and the 'New (with template)' menus will be updated, Snippets (snippets.conf), filetype extensions (filetype_extensions.conf), and 'settings' and 'build_settings' sections of the filetype definition files.

Plugins may call this function if they changed any of these files (e.g. a configuration file editor plugin).


Definition at line 1417 of file libmain.c.

References _, editor_snippets_free(), editor_snippets_init(), filetypes_reload(), filetypes_reload_extensions(), symbols_reload_config_files(), templates_free_templates(), templates_init(), and ui_set_statusbar().

Referenced by on_menu_reload_configuration1_activate().