Class: Gio::FilenameCompleter

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Gio::FilenameCompleter

Creates a new filename completer.

Instance Method Details

#dirs_only=(dirs_only) ⇒ nil

If dirs_only is true, completer will only
complete directory names, and not file names.

This function needs to be called before waiting for results from the
completer to be populated.

Parameters:

  • dirs_only (Boolean) —

    a #gboolean.

Returns:

  • (nil)

#get_completion_suffix(initial_text) ⇒ String

Obtains a suffix completion for initial_text from completer.

Suffix will be an empty string if there's no shared suffix among matching
completions. If there's no matching completions anyway, NULL is returned.

Parameters:

  • initial_text (String) —

    text to be completed.

Returns:

  • (String) —

    a suffix completion string, or NULL if no
    completion exists.

#get_completions(initial_text) ⇒ Array<String>

Gets an array of completion strings for a given initial text.
This array must be freed by g_strfreev() when finished.

Parameters:

  • initial_text (String) —

    text to be completed.

Returns:

  • (Array<String>) —

    array of strings with possible completions for initial_text.