Package ch.bailu.gtk.gio
Class FilenameCompleter
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gio.FilenameCompleter
- All Implemented Interfaces:
PointerInterface
Completes partial file and directory names given a partial string by
looking in the file system for clues. Can return a list of possible
completion strings for widget implementations.
looking in the file system for clues. Can return a list of possible
completion strings for widget implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionCreates a new filename completer.FilenameCompleter
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
getCompletions
(Str initial_text) Gets an array of completion strings for a given initial text.getCompletions
(String initial_text) Gets an array of completion strings for a given initial text.getCompletionSuffix
(Str initial_text) Obtains a completion for @initial_text from @completer.getCompletionSuffix
(String initial_text) Obtains a completion for @initial_text from @completer.static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
Connect to signal "got-completion-data".void
setDirsOnly
(boolean dirs_only) If @dirs_only is %TRUE, @completer will only
complete directory names, and not file names.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
SIGNAL_ON_GOT_COMPLETION_DATA
- See Also:
-
-
Constructor Details
-
FilenameCompleter
-
FilenameCompleter
public FilenameCompleter()Creates a new filename completer.
-
-
Method Details
-
getClassHandler
-
getCompletionSuffix
Obtains a completion for @initial_text from @completer.- Parameters:
initial_text
- text to be completed.- Returns:
- a completed string, or %NULL if no completion exists. This string is not owned by GIO, so remember to g_free() it when finished.
-
getCompletionSuffix
Obtains a completion for @initial_text from @completer.- Parameters:
initial_text
- text to be completed.- Returns:
- a completed string, or %NULL if no completion exists. This string is not owned by GIO, so remember to g_free() it when finished.
-
getCompletions
Gets an array of completion strings for a given initial text.- Parameters:
initial_text
- text to be completed.- Returns:
- array of strings with possible completions for @initial_text. This array must be freed by g_strfreev() when finished.
-
getCompletions
Gets an array of completion strings for a given initial text.- Parameters:
initial_text
- text to be completed.- Returns:
- array of strings with possible completions for @initial_text. This array must be freed by g_strfreev() when finished.
-
setDirsOnly
public void setDirsOnly(boolean dirs_only) If @dirs_only is %TRUE, @completer will only
complete directory names, and not file names.- Parameters:
dirs_only
- a #gboolean.
-
onGotCompletionData
Connect to signal "got-completion-data".
SeeFilenameCompleter.OnGotCompletionData.onGotCompletionData()
for signal description.
FieldSIGNAL_ON_GOT_COMPLETION_DATA
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-