GimpRc-unknown

GimpRc-unknown

Synopsis

void                (*GimpConfigForeachFunc)            (const gchar *key,
                                                         const gchar *value,
                                                         gpointer user_data);
void                gimp_rc_add_unknown_token           (GimpConfig *config,
                                                         const gchar *key,
                                                         const gchar *value);
const gchar *       gimp_rc_lookup_unknown_token        (GimpConfig *config,
                                                         const gchar *key);
void                gimp_rc_foreach_unknown_token       (GimpConfig *config,
                                                         GimpConfigForeachFunc func,
                                                         gpointer user_data);

Description

Details

GimpConfigForeachFunc ()

void                (*GimpConfigForeachFunc)            (const gchar *key,
                                                         const gchar *value,
                                                         gpointer user_data);


gimp_rc_add_unknown_token ()

void                gimp_rc_add_unknown_token           (GimpConfig *config,
                                                         const gchar *key,
                                                         const gchar *value);

This function allows to add arbitrary key/value pairs to a GObject. It's purpose is to attach additional data to a GimpConfig object that can be stored along with the object properties when serializing the object to a configuration file. Please note however that the default gimp_config_serialize() implementation does not serialize unknown tokens.

If you want to remove a key/value pair from the object, call this function with a NULL value.

config :

a GObject.

key :

a nul-terminated string to identify the value.

value :

a nul-terminated string representing the value.

gimp_rc_lookup_unknown_token ()

const gchar *       gimp_rc_lookup_unknown_token        (GimpConfig *config,
                                                         const gchar *key);

This function retrieves data that was previously attached using gimp_rc_add_unknown_token(). You should not free or modify the returned string.

config :

a GObject.

key :

a nul-terminated string to identify the value.

Returns :

a pointer to a constant string.

gimp_rc_foreach_unknown_token ()

void                gimp_rc_foreach_unknown_token       (GimpConfig *config,
                                                         GimpConfigForeachFunc func,
                                                         gpointer user_data);

Calls func for each key/value stored with the config using gimp_rc_add_unknown_token().

config :

a GObject.

func :

a function to call for each key/value pair.

user_data :

data to pass to func.