Basics
Guides
API Reference
Basics
Guides
API Reference
[27:7] extends: object
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.
Completion (Handle = null)
Creates a new
Completionby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.