Functions
GCompletionFunc ()
gchar *
(*GCompletionFunc) (gpointer Param1);
Specifies the type of the function passed to g_completion_new(). It
should return the string corresponding to the given target item.
This is used when you use data structures as GCompletion items.
Returns
the string corresponding to the item.
g_completion_add_items ()
void
g_completion_add_items (GCompletion *cmp,
GList *items);
g_completion_add_items has been deprecated since version 2.26 and should not be used in newly-written code.
Rarely used API
Adds items to the GCompletion.
g_completion_remove_items ()
void
g_completion_remove_items (GCompletion *cmp,
GList *items);
g_completion_remove_items has been deprecated since version 2.26 and should not be used in newly-written code.
Rarely used API
Removes items from a GCompletion. The items are not freed, so if the memory
was dynamically allocated, free items
with g_list_free_full() after calling
this function.
g_completion_clear_items ()
void
g_completion_clear_items (GCompletion *cmp);
g_completion_clear_items has been deprecated since version 2.26 and should not be used in newly-written code.
Rarely used API
Removes all items from the GCompletion. The items are not freed, so if the
memory was dynamically allocated, it should be freed after calling this
function.
g_completion_complete ()
GList *
g_completion_complete (GCompletion *cmp,
const gchar *prefix,
gchar **new_prefix);
g_completion_complete has been deprecated since version 2.26 and should not be used in newly-written code.
Rarely used API
Attempts to complete the string prefix
using the GCompletion
target items.
Returns
the list of items whose strings begin with
prefix
. This should not be changed.
[transfer none]
g_completion_complete_utf8 ()
GList *
g_completion_complete_utf8 (GCompletion *cmp,
const gchar *prefix,
gchar **new_prefix);
g_completion_complete_utf8 has been deprecated since version 2.26 and should not be used in newly-written code.
Rarely used API
Attempts to complete the string prefix
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.
Returns
the list of items whose strings begin with prefix
. This should
not be changed.
[element-type utf8][transfer none]
Since: 2.4
g_completion_set_compare ()
void
g_completion_set_compare (GCompletion *cmp,
GCompletionStrncmpFunc strncmp_func);
g_completion_set_compare has been deprecated since version 2.26 and should not be used in newly-written code.
Rarely used API
Sets the function to use for string comparisons. The default string
comparison function is strncmp().
GCompletionStrncmpFunc ()
gint
(*GCompletionStrncmpFunc) (const gchar *s1,
const gchar *s2,
gsize n);
Specifies the type of the function passed to
g_completion_set_compare(). This is used when you use strings as
GCompletion items.
Returns
an integer less than, equal to, or greater than zero if
the first n
bytes of s1
is found, respectively, to be
less than, to match, or to be greater than the first n
bytes of s2
.
g_completion_free ()
void
g_completion_free (GCompletion *cmp);
g_completion_free has been deprecated since version 2.26 and should not be used in newly-written code.
Rarely used API
Frees all memory used by the GCompletion. The items are not freed, so if
the memory was dynamically allocated, it should be freed after calling this
function.