1.38 <GFilenameCompleter>

Class: <GFilenameCompleter>

It derives from <GObject>.

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.

Procedures

Method: filename-completer:get-completion-suffix self initial-text ⇒ %return
Method: get-completion-suffix self initial-text ⇒ %return

Obtains a suffix completion for initial-text from self.

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.

self

Passed: a <GFilenameCompleter>.

the filename completer.

initial-text

Passed: a string.

text to be completed.

%return

Returned: a string, or #f.

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

Method: filename-completer:get-completions self initial-text ⇒ %return
Method: get-completions self initial-text ⇒ %return

Gets an array of completion strings for a given initial text.

self

Passed: a <GFilenameCompleter>.

the filename completer.

initial-text

Passed: a string.

text to be completed.

%return

Returned: a vector, each a string.

array of strings with possible completions for initial-text. This array must be freed by strfreev when finished.

Procedure: filename-completer:new ⇒ %return

Creates a new filename completer.

%return

Returned: a <GFilenameCompleter>.

a <GFilenameCompleter>.

Method: filename-completer:set-dirs-only self dirs-only
Method: set-dirs-only self dirs-only

If dirs-only is #t, self 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.

self

Passed: a <GFilenameCompleter>.

the filename completer.

dirs-only

Passed: a boolean.

a gboolean.

Signals

Signal: filename-completer:got-completion-data

Connect a handler with (connect object filename-completer:got-completion-data handler). It is called as (handler self).

Emitted when the file name completion information comes available.

self

Passed: a <GFilenameCompleter>.

Virtual methods

Virtual method: filename-completer:do-got-completion-data implementor self

To override it in a new class, give register-type #:vfuncs `((got-completion-data . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <GFilenameCompleter>, or a class that derives from it, or its GType number.

self

Passed: a <GFilenameCompleter>.