Package ch.bailu.gtk.glib
Klasse Completion
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.glib.Completion
- Alle implementierten Schnittstellen:
PointerInterface
`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.
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.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final String
the list of items which begin with @prefix.static final String
function which is called to get the string associated with a
target item.static final String
list of target items (strings or data structures).static final String
the last prefix passed to g_completion_complete() or
g_completion_complete_utf8().static final String
The function to use when comparing strings. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Completion
Veraltet.void
Veraltet.void
Veraltet.void
free()
Veraltet.static ClassHandler
the list of items which begin with @prefix.ch.bailu.gtk.glib.JnaCompletion.OnCompletionFunc
function which is called to get the string associated with a
target item.list of target items (strings or data structures).the last prefix passed to g_completion_complete() or
g_completion_complete_utf8().ch.bailu.gtk.glib.JnaCompletion.OnCompletionStrncmpFunc
The function to use when comparing strings.void
removeItems
(List items) Veraltet.void
setCompare
(Completion.OnCompletionStrncmpFunc strncmp_func) Veraltet.void
setFieldCache
(List cache) the list of items which begin with @prefix.void
function which is called to get the string associated with a
target item.void
setFieldItems
(List items) list of target items (strings or data structures).void
setFieldPrefix
(Str prefix) the last prefix passed to g_completion_complete() or
g_completion_complete_utf8().void
setFieldStrncmpFunc
(Completion.OnCompletionStrncmpFunc strncmp_func) The function to use when comparing strings.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
ITEMS
list of target items (strings or data structures).- Siehe auch:
-
FUNC
function which is called to get the string associated with a
target item. It is %NULL if the target items are strings.
SeeCompletion.OnCompletionFunc.onCompletionFunc(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Pointer)
- Siehe auch:
-
PREFIX
the last prefix passed to g_completion_complete() or
g_completion_complete_utf8().- Siehe auch:
-
CACHE
the list of items which begin with @prefix.- Siehe auch:
-
STRNCMP_FUNC
The function to use when comparing strings. Use
g_completion_set_compare() to modify this function.
SeeCompletion.OnCompletionStrncmpFunc.onCompletionStrncmpFunc(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Str, ch.bailu.gtk.type.Str, long)
- Siehe auch:
-
-
Konstruktordetails
-
Completion
-
Completion
public Completion()
-
-
Methodendetails
-
getClassHandler
-
setFieldItems
list of target items (strings or data structures). -
getFieldItems
list of target items (strings or data structures). -
setFieldFunc
function which is called to get the string associated with a
target item. It is %NULL if the target items are strings.
SeeCompletion.OnCompletionFunc.onCompletionFunc(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Pointer)
-
getFieldFunc
public ch.bailu.gtk.glib.JnaCompletion.OnCompletionFunc getFieldFunc()function which is called to get the string associated with a
target item. It is %NULL if the target items are strings.
SeeCompletion.OnCompletionFunc.onCompletionFunc(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Pointer)
-
setFieldPrefix
the last prefix passed to g_completion_complete() or
g_completion_complete_utf8(). -
getFieldPrefix
the last prefix passed to g_completion_complete() or
g_completion_complete_utf8(). -
setFieldCache
the list of items which begin with @prefix. -
getFieldCache
the list of items which begin with @prefix. -
setFieldStrncmpFunc
The function to use when comparing strings. Use
g_completion_set_compare() to modify this function.
SeeCompletion.OnCompletionStrncmpFunc.onCompletionStrncmpFunc(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Str, ch.bailu.gtk.type.Str, long)
-
getFieldStrncmpFunc
public ch.bailu.gtk.glib.JnaCompletion.OnCompletionStrncmpFunc getFieldStrncmpFunc()The function to use when comparing strings. Use
g_completion_set_compare() to modify this function.
SeeCompletion.OnCompletionStrncmpFunc.onCompletionStrncmpFunc(ch.bailu.gtk.lib.handler.CallbackHandler, ch.bailu.gtk.type.Str, ch.bailu.gtk.type.Str, long)
-
addItems
Veraltet.Adds items to the #GCompletion.- Parameter:
items
- the list of items to add.
-
clearItems
Veraltet.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. -
free
Veraltet.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. -
removeItems
Veraltet.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.- Parameter:
items
- the items to remove.
-
setCompare
Veraltet.Sets the function to use for string comparisons. The default string
comparison function is strncmp().- Parameter:
strncmp_func
- the string comparison function.
-
_new
Veraltet.Creates a new #GCompletion.- Parameter:
func
- the function to be called to return the string representing an item in the #GCompletion, or %NULL if strings are going to be used as the #GCompletion items.- Gibt zurück:
- the new #GCompletion.
-