mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
docs: Move the GCompletion SECTION
Move it to the struct docs. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3037
This commit is contained in:
parent
a11d3604c2
commit
3981c1c704
@ -43,34 +43,6 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* SECTION:completion
|
||||
* @title: Automatic String Completion
|
||||
* @short_description: support for automatic completion using a group
|
||||
* of target strings
|
||||
*
|
||||
* #GCompletion provides support for automatic completion of a string
|
||||
* using any group of target strings. It is typically used for file
|
||||
* name completion as is common in many UNIX shells.
|
||||
*
|
||||
* A #GCompletion is created using g_completion_new(). Target items are
|
||||
* added and removed with g_completion_add_items(),
|
||||
* g_completion_remove_items() and g_completion_clear_items(). A
|
||||
* completion attempt is requested with g_completion_complete() or
|
||||
* g_completion_complete_utf8(). When no longer needed, the
|
||||
* #GCompletion is freed with g_completion_free().
|
||||
*
|
||||
* Items in the completion can be simple strings (e.g. filenames), or
|
||||
* pointers to arbitrary data structures. If data structures are used
|
||||
* you must provide a #GCompletionFunc in g_completion_new(), which
|
||||
* retrieves the item's string from the data structure. You can change
|
||||
* the way in which strings are compared by setting a different
|
||||
* #GCompletionStrncmpFunc in g_completion_set_compare().
|
||||
*
|
||||
* GCompletion has been marked as deprecated, since this API is rarely
|
||||
* used and not very actively maintained.
|
||||
**/
|
||||
|
||||
/**
|
||||
* GCompletion:
|
||||
* @items: list of target items (strings or data structures).
|
||||
@ -82,7 +54,29 @@
|
||||
* @strncmp_func: The function to use when comparing strings. Use
|
||||
* g_completion_set_compare() to modify this function.
|
||||
*
|
||||
* The data structure used for automatic completion.
|
||||
* `GCompletion` provides support for automatic completion of a string
|
||||
* using any group of target strings. It is typically used for file
|
||||
* name completion as is common in many UNIX shells.
|
||||
*
|
||||
* A `GCompletion` is created using [func@GLib.Completion.new]. Target items are
|
||||
* added and removed with [method@GLib.Completion.add_items],
|
||||
* [method@GLib.Completion.remove_items] and
|
||||
* [method@GLib.Completion.clear_items]. A completion attempt is requested with
|
||||
* [method@GLib.Completion.complete] or [method@GLib.Completion.complete_utf8].
|
||||
* When no longer needed, the `GCompletion` is freed with
|
||||
* [method@GLib.Completion.free].
|
||||
*
|
||||
* Items in the completion can be simple strings (e.g. filenames), or
|
||||
* pointers to arbitrary data structures. If data structures are used
|
||||
* you must provide a [type@GLib.CompletionFunc] in [func@GLib.Completion.new],
|
||||
* which retrieves the item’s string from the data structure. You can change
|
||||
* the way in which strings are compared by setting a different
|
||||
* [type@GLib.CompletionStrncmpFunc] in [method@GLib.Completion.set_compare].
|
||||
*
|
||||
* `GCompletion` has been marked as deprecated, since this API is rarely
|
||||
* used and not very actively maintained.
|
||||
*
|
||||
* Deprecated: 2.26: Rarely used API
|
||||
**/
|
||||
|
||||
/**
|
||||
@ -94,6 +88,7 @@
|
||||
* This is used when you use data structures as #GCompletion items.
|
||||
*
|
||||
* Returns: the string corresponding to the item.
|
||||
* Deprecated: 2.26: Rarely used API
|
||||
**/
|
||||
|
||||
/**
|
||||
@ -110,6 +105,7 @@
|
||||
* 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.
|
||||
* Deprecated: 2.26: Rarely used API
|
||||
**/
|
||||
|
||||
static void completion_check_cache (GCompletion* cmp,
|
||||
@ -124,6 +120,7 @@ static void completion_check_cache (GCompletion* cmp,
|
||||
* Creates a new #GCompletion.
|
||||
*
|
||||
* Returns: the new #GCompletion.
|
||||
* Deprecated: 2.26: Rarely used API
|
||||
**/
|
||||
GCompletion*
|
||||
g_completion_new (GCompletionFunc func)
|
||||
|
Loading…
Reference in New Issue
Block a user