Class FilenameCompleter

All Implemented Interfaces:
PointerInterface

public class FilenameCompleter extends Object
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.

https://docs.gtk.org/gio/class.FilenameCompleter.html

  • Field Details

  • Constructor Details

    • FilenameCompleter

      public FilenameCompleter(PointerContainer pointer)
    • FilenameCompleter

      public FilenameCompleter()
      Creates a new filename completer.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getCompletionSuffix

      public Str getCompletionSuffix(@Nonnull Str initial_text)
      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

      public Str getCompletionSuffix(String initial_text)
      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

      public Strs getCompletions(@Nonnull Str initial_text)
      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

      public Strs getCompletions(String initial_text)
      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

      public SignalHandler onGotCompletionData(FilenameCompleter.OnGotCompletionData signal)
      Connect to signal "got-completion-data".
      See FilenameCompleter.OnGotCompletionData.onGotCompletionData() for signal description.
      Field SIGNAL_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

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()