gwyddion

gwyddion — Base functions, library initialization

Functions

void gwy_init ()
void gwy_load_resources ()
void gwy_tune_algorithms ()

Includes

#include <libgwyddion/gwyddion.h>

Description

Gwyddion classes has to be initialized before they can be safely deserialized. The function gwy_type_init() performs this initialization.

Functions

gwy_init()

void
gwy_init (void);

Basic initialisation of libgwyddion.

The function primarily registers libgwyddion types, making their names can be translated to GType, which is necessary for deserialisation. It also performs other basic initialisation.

It ensures the availbility of built-in resources, such as the default GwyGradient or built-in fitting functions. However, it does not load resources from disk; use gwy_load_resources() for that.

You have to call this function from the main thread before using objects from libgwyddion. However, most programs do not use libgwyddion alone. If you use a higher-level Gwyddion library, call its initialisation function instead.

It is safe to call this function more than once, subsequent calls are no-op.


gwy_load_resources()

void
gwy_load_resources (void);

Load external libgwyddion resources from disk.

This function has to be called from the main thread and gwy_init() must be called first. However, most programs do not use libgwyddion alone. If you use a higher-level Gwyddion library (libgwyui or libgwyapp), its initialisation functions take care of loading the resources.

It is safe to call this function more than once. Subsequent calls are no-op. Resources are not reloaded from disk.


gwy_tune_algorithms()

void
gwy_tune_algorithms (const gchar *key,
                     const gchar *value);

Modifies internal tunable parameters of libgwyddion algorithms.

Do not use this method in applications.

The function enables the tuning of internal algorithm parameters or choosing a specific backend algorithm for operations which have multiple. It exists for testing and benchmarking. It is not defined what parameters might exist, what are the valid values and what effect changing them might have. Tests and benchmarks that use it are always bound to a specific version of Gwyddion.

Parameters

key

Identification of the parameter to set.

 

value

String representation of new value of the parameter.

 

See Also

GwySerializable