|  |  |  | Goffice Reference Manual |  | 
|---|---|---|---|---|
gpointer (*GOMapFunc) (gpointer value); void go_ptr_array_insert (GPtrArray *array, gpointer value, int index); GSList* go_hash_keys (GHashTable *hash); GSList* go_hash_values (GHashTable *hash); GSList* go_slist_map (GSList const *list, GOMapFunc map_func); GSList* go_slist_create (gpointer item1, ...); void go_slist_free_custom (GSList *list, GFreeFunc free_func); #define go_string_slist_copy (list) GSList* go_strsplit_to_slist (char const *str, gchar delimiter); #define GO_SLIST_FOREACH (list,valtype,val,stmnt) #define GO_SLIST_PREPEND (list,item) #define GO_SLIST_APPEND (list,item) #define GO_SLIST_REMOVE (list,item) #define GO_SLIST_CONCAT (list_a,list_b) #define GO_SLIST_REVERSE (list) #define GO_SLIST_SORT (list,cmp_func) gint go_list_index_custom (GList *list, gpointer data, GCompareFunc cmp_func); void go_list_free_custom (GList *list, GFreeFunc free_func); #define GO_LIST_FOREACH (list,valtype,val,stmnt) #define GO_LIST_PREPEND (list,item) #define GO_LIST_APPEND (list,item) #define GO_LIST_REMOVE (list,item) #define GO_LIST_CONCAT (list_a,list_b) #define GO_LIST_REVERSE (list) #define GO_LIST_SORT (list,cmp_func) int go_str_compare (void const *x, void const *y); guint go_ascii_strcase_hash (gconstpointer v); gint go_ascii_strcase_equal (gconstpointer v, gconstpointer v2); gint go_utf8_collate_casefold (char const *a, char const *b); char* go_utf8_strcapital (char const *p, gssize len); void go_strescape (GString *target, char const *str); charconst * go_strunescape (GString *target, char const *str); void go_string_append_gstring (GString *target, const GString *src); void go_string_append_c_n (GString *target, char c, gsize n); charconst * go_guess_encoding (char const *raw, size_t len, char const *user_guess, char **utf8_str); charconst * go_get_real_name (void); void go_destroy_password (char *passwd); GOMemChunk* go_mem_chunk_new (char const *name, size_t user_atom_size, size_t chunk_size); void go_mem_chunk_destroy (GOMemChunk *chunk, gboolean expect_leaks); gpointer go_mem_chunk_alloc (GOMemChunk *chunk); gpointer go_mem_chunk_alloc0 (GOMemChunk *chunk); void go_mem_chunk_free (GOMemChunk *chunk, gpointer mem); void go_mem_chunk_foreach_leak (GOMemChunk *chunk, GFunc cb, gpointer user); void go_object_toggle (gpointer object, const gchar *property_name); gboolean go_object_set_property (GObject *obj, const char *property_name, const char *user_prop_name, const char *value, GError **err, const char *error_template); GSList* go_object_properties_collect (GObject *obj); void go_object_properties_apply (GObject *obj, GSList *props, gboolean changed_only); void go_object_properties_free (GSList *props); gboolean (*GOParseKeyValueFunc) (const char *name, const char *value, GError **err, gpointer user); gboolean go_parse_key_value (const char *options, GError **err, GOParseKeyValueFunc func, gpointer user);
void                go_ptr_array_insert                 (GPtrArray *array,
                                                         gpointer value,
                                                         int index);
| 
 | |
| 
 | |
| 
 | 
GSList* go_hash_keys (GHashTable *hash);
Collects an unordered list of the keys in hash.
| 
 | GHashTable | 
| Returns : | a list which the caller needs to free. The content has not additional references added | 
GSList* go_hash_values (GHashTable *hash);
Collects an unordered list of the values in hash.
| 
 | GHashTable | 
| Returns : | a list which the caller needs to free. The content has not additional references added | 
GSList*             go_slist_map                        (GSList const *list,
                                                         GOMapFunc map_func);
| 
 | list of some items | 
| 
 | mapping function | 
| Returns : | 
GSList*             go_slist_create                     (gpointer item1,
                                                         ...);
Creates a GList from NULL-terminated list of arguments.
| 
 | itionally NULL | 
| 
 | NULLterminated list of additional items | 
| Returns : | created list. | 
void                go_slist_free_custom                (GSList *list,
                                                         GFreeFunc free_func);
Clears a list, calling free_func for each list item.
| 
 | list of some items | 
| 
 | function freeing list item | 
#define go_string_slist_copy(list) go_slist_map (list, (GOMapFunc) g_strdup)
| 
 | 
GSList*             go_strsplit_to_slist                (char const *str,
                                                         gchar delimiter);
Splits up string into tokens at delim and returns a string list.
| 
 | String to split | 
| 
 | Token delimiter | 
| Returns : | string list which you should free after use using function e_free_string_list(). | 
gint                go_list_index_custom                (GList *list,
                                                         gpointer data,
                                                         GCompareFunc cmp_func);
| 
 | |
| 
 | |
| 
 | |
| Returns : | 
void                go_list_free_custom                 (GList *list,
                                                         GFreeFunc free_func);
Clears a list, calling free_func for each list item.
| 
 | list of some items | 
| 
 | function freeing list item | 
gint                go_ascii_strcase_equal              (gconstpointer v,
                                                         gconstpointer v2);
| 
 | |
| 
 | |
| Returns : | 
gint                go_utf8_collate_casefold            (char const *a,
                                                         char const *b);
| 
 | |
| 
 | |
| Returns : | 
char*               go_utf8_strcapital                  (char const *p,
                                                         gssize len);
Similar to g_utf8_strup and g_utf8_strup, except that this function creates a string "Very Much Like: This, One".
| 
 | pointer to UTF-8 string | 
| 
 | length in bytes, or -1. | 
| Returns : | newly allocated string. | 
charconst *         go_strunescape                      (GString *target,
                                                         char const *str);
| 
 | |
| 
 | |
| Returns : | 
void                go_string_append_gstring            (GString *target,
                                                         const GString *src);
| 
 | |
| 
 | 
void                go_string_append_c_n                (GString *target,
                                                         char c,
                                                         gsize n);
| 
 | |
| 
 | |
| 
 | 
charconst *         go_guess_encoding                   (char const *raw,
                                                         size_t len,
                                                         char const *user_guess,
                                                         char **utf8_str);
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| Returns : | 
charconst * go_get_real_name (void);
| Returns : | a utf8 encoded string with the current user name. Caller should _NOT_ free the result. | 
void go_destroy_password (char *passwd);
Overwrite a string holding a password. This is a separate routine to ensure that the compiler does not try to outsmart us.
Note: this does not free the memory.
| 
 | The buffer to clear | 
GOMemChunk*         go_mem_chunk_new                    (char const *name,
                                                         size_t user_atom_size,
                                                         size_t chunk_size);
| 
 | |
| 
 | |
| 
 | |
| Returns : | 
void                go_mem_chunk_destroy                (GOMemChunk *chunk,
                                                         gboolean expect_leaks);
| 
 | |
| 
 | 
void                go_mem_chunk_foreach_leak           (GOMemChunk *chunk,
                                                         GFunc cb,
                                                         gpointer user);
| 
 | |
| 
 | |
| 
 | 
void                go_object_toggle                    (gpointer object,
                                                         const gchar *property_name);
| 
 | GObject | 
| 
 | name | 
gboolean            go_object_set_property              (GObject *obj,
                                                         const char *property_name,
                                                         const char *user_prop_name,
                                                         const char *value,
                                                         GError **err,
                                                         const char *error_template);
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| Returns : | 
GSList* go_object_properties_collect (GObject *obj);
| 
 | |
| Returns : | 
void                go_object_properties_apply          (GObject *obj,
                                                         GSList *props,
                                                         gboolean changed_only);
| 
 | |
| 
 | |
| 
 | 
gboolean            (*GOParseKeyValueFunc)              (const char *name,
                                                         const char *value,
                                                         GError **err,
                                                         gpointer user);
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| Returns : | 
gboolean            go_parse_key_value                  (const char *options,
                                                         GError **err,
                                                         GOParseKeyValueFunc func,
                                                         gpointer user);
| 
 | Options string. | 
| 
 | Reference to store GError if parsing fails. | 
| 
 | |
| 
 | user pointer. | 
| Returns : |