Top | ![]() |
![]() |
![]() |
![]() |
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.
GOMemChunk * go_mem_chunk_new (char const *name
,gsize user_atom_size
,gsize chunk_size
);
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.
obj |
||
props |
the list of properties and their values to apply. |
[element-type void] |
changed_only |
whether to restrict calls to |
GSList *
go_object_properties_collect (GObject *obj
);
Collect all rw properties and their values.
the list of collected properties as GParamSpec and values as GValue.
[element-type void][transfer container]
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
);
Inserts a pointer inside an existing array.
array |
a GPtrArray. |
[element-type void] |
value |
the pointer to insert |
|
index |
where to insert |
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.
item1 |
first item. |
[allow-none][transfer none] |
... |
|
[transfer none] |
GSList * go_slist_map (GSList const *list
,GOMapFunc map_func
);
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
);
GSList * go_strsplit_to_slist (char const *str
,gchar delimiter
);
Splits up string into tokens at delim and returns a string list.
string list which you should
free after use using function g_slist_free_full()
, using g_free as second
argument.
[element-type char][transfer full]
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".