Top | ![]() |
![]() |
![]() |
![]() |
gpointer
(*GOMapFunc) (gpointer value
);
GOMapFunc
is deprecated and should not be used in newly-written code.
gboolean (*GOParseKeyValueFunc) (const char *name
,const char *value
,GError **err
,gpointer user
);
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.
char const * go_guess_encoding (char const *raw
,gsize len
,char const *user_guess
,GString **utf8_str
,guint *truncated
);
GSList *
go_hash_keys (GHashTable *hash
);
Collects an unordered list of the keys in hash
.
gint go_list_index_custom (GList *list
,gpointer data
,GCompareFunc cmp_func
);
Searched for data
in list
and return the corresponding index or -1 if not
found.
void go_mem_chunk_foreach_leak (GOMemChunk *chunk
,GFunc cb
,gpointer user
);
Loop over all non-freed memory in the chunk. It's safe to allocate or free from the chunk in the callback.
void go_mem_chunk_free (GOMemChunk *chunk
,gpointer mem
);
Returns the given item to the pool.
GOMemChunk * go_mem_chunk_new (char const *name
,gsize user_atom_size
,gsize chunk_size
);
gpointer go_memdup (gconstpointer mem
,gsize byte_size
);
Like g_memdup or g_memdup2. This function is meant to ease transition to g_memdup2 without having to require very new glib.
gpointer go_memdup_n (gconstpointer mem
,gsize n_blocks
,gsize block_size
);
Like go_memdup (mem
, n_blocks
* block_size
), but with overflow check.
Like a potential future g_memdup_n.
void go_object_properties_apply (GObject *obj
,GSList *props
,gboolean changed_only
);
Sets a list of properties for obj
. The list needs to be a list of
alternating GParamSpec and GValue.
GSList *
go_object_properties_collect (GObject *obj
);
Collect all rw properties and their values.
void
go_object_properties_free (GSList *props
);
Unsezts the values in the list which needs to be a list of alternating GParamSpec and GValue.
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
);
void go_object_toggle (gpointer object
,const gchar *property_name
);
Toggle a boolean object property.
gboolean go_parse_key_value (const char *options
,GError **err
,GOParseKeyValueFunc handler
,gpointer user
);
void go_ptr_array_insert (GPtrArray *array
,gpointer value
,int index
);
go_ptr_array_insert
is deprecated and should not be used in newly-written code.
Inserts a pointer inside an existing array.
Note: consider using g_ptr_array_insert instead, but watch out of the argument order.
GSList * go_slist_create (gconstpointer item1
,...
);
Creates a GList from NULL-terminated list of arguments. As the arguments are just copied to the list, the caller owns them.
GSList * go_slist_map (GSList const *list
,GOMapFunc map_func
);
go_slist_map
is deprecated and should not be used in newly-written code.
The ownership of the list elements depends on map_func.
void go_string_replace (GString *target
,gsize pos
,gssize oldlen
,const char *txt
,gssize newlen
);
#define go_string_slist_copy(list) g_slist_copy_deep (list, (GCopyFunc)g_strdup, NULL)
GSList * go_strsplit_to_slist (char const *str
,gchar delimiter
);
Splits up string into tokens at delim and returns a string list.