gcompletion.h File Reference

__G_COMPLETION_H__

Typedef GCompletion

typedef typedefG_BEGIN_DECLS struct _GCompletionGCompletion

Typedef GCompletionFunc

typedef gchar *(*GCompletionFunc

Typedef GCompletionStrncmpFunc

typedef gint(*GCompletionStrncmpFunc

g_completion_new ( GCompletionFunc )

IMPORT_C GCompletion *g_completion_new(GCompletionFuncfunc)

g_completion_add_items ( GCompletion *, GList * )

IMPORT_C voidg_completion_add_items(GCompletion *cmp,
GList *items
)

g_completion_remove_items ( GCompletion *, GList * )

IMPORT_C voidg_completion_remove_items(GCompletion *cmp,
GList *items
)

g_completion_clear_items ( GCompletion * )

IMPORT_C voidg_completion_clear_items(GCompletion *cmp)

g_completion_complete ( GCompletion *, const gchar *, gchar ** )

IMPORT_C GList *g_completion_complete(GCompletion *cmp,
const gchar *prefix,
gchar **new_prefix
)

g_completion_complete_utf8 ( GCompletion *, const gchar *, gchar ** )

IMPORT_C GList *g_completion_complete_utf8(GCompletion *cmp,
const gchar *prefix,
gchar **new_prefix
)

g_completion_complete_utf8: : the GCompletion : the prefix string, typically used by the user, which is compared with each of the items : if non-NULL, returns the longest prefix which is common to all items that matched , or NULL if no items matched . This string should be freed when no longer needed.

Attempts to complete the string using the GCompletion target items. In contrast to g_completion_complete(), this function returns the largest common prefix that is a valid UTF-8 string, omitting a possible common partial character.

You should use this function instead of g_completion_complete() if your items are UTF-8 strings.

Return value: the list of items whose strings begin with . This should not be changed.

Since: 2.4

g_completion_set_compare ( GCompletion *, GCompletionStrncmpFunc )

IMPORT_C voidg_completion_set_compare(GCompletion *cmp,
GCompletionStrncmpFuncstrncmp_func
)

g_completion_free ( GCompletion * )

IMPORT_C voidg_completion_free(GCompletion *cmp)