![]() | ![]() | ![]() | Gwyddion Application Library Reference Manual | ![]() |
---|
settings — Settings.
GwyContainer* gwy_app_settings_get (void); void gwy_app_settings_free (void); gboolean gwy_app_settings_save (const gchar *filename); gboolean gwy_app_settings_load (const gchar *filename); gchar** gwy_app_settings_get_module_dirs (void); gchar* gwy_app_settings_get_config_filename (void); gchar* gwy_app_settings_get_log_filename (void);
GwyContainer* gwy_app_settings_get (void);
Gets the gwyddion settings.
The settings are a GwyContainer automatically loaded at program startup and saved ad its exit. For storing persistent module data you should use "/mod/YOUR_MODULE_NAME/" prefix.
Returns : | The settings as a GwyContainer. |
gboolean gwy_app_settings_save (const gchar *filename);
Saves the settings.
Probably useful only in the application.
filename: | A filename to save the settings to. |
Returns : | Whether it succeeded. |
gboolean gwy_app_settings_load (const gchar *filename);
Loads the settings.
Probably useful only in the application.
filename: | A filename to read the settings from. |
Returns : | Whether it succeeded. In any case you can call gwy_app_settings_get() then to obtain either the loaded settings or the old ones (if failed), or an empty GwyContainer. |
gchar** gwy_app_settings_get_module_dirs (void);
Returns a list of directories to search modules in.
Returns : | The list of module directories as a newly allocated array of newly allocated strings, to be freed with g_str_freev() when not longer needed. |
gchar* gwy_app_settings_get_config_filename (void);
Returns a suitable configuration file name.
Returns : | The file name as a newly allocated string. |
<< file | menu >> |