gi-gio-2.0.25: Gio bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.FilenameCompleter

Description

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.

Synopsis

Exported types

class (GObject o, IsDescendantOf FilenameCompleter o) => IsFilenameCompleter o Source #

Type class for types which can be safely cast to FilenameCompleter, for instance with toFilenameCompleter.

Instances

Instances details
(GObject o, IsDescendantOf FilenameCompleter o) => IsFilenameCompleter o Source # 
Instance details

Defined in GI.Gio.Objects.FilenameCompleter

toFilenameCompleter :: (MonadIO m, IsFilenameCompleter o) => o -> m FilenameCompleter Source #

Cast to FilenameCompleter, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

getCompletionSuffix

filenameCompleterGetCompletionSuffix Source #

Arguments

:: (HasCallStack, MonadIO m, IsFilenameCompleter a) 
=> a

completer: the filename completer.

-> Text

initialText: text to be completed.

-> m Text

Returns: a completed string, or Nothing if no completion exists. This string is not owned by GIO, so remember to free it when finished.

Obtains a completion for initialText from completer.

getCompletions

filenameCompleterGetCompletions Source #

Arguments

:: (HasCallStack, MonadIO m, IsFilenameCompleter a) 
=> a

completer: the filename completer.

-> Text

initialText: text to be completed.

-> m [Text]

Returns: array of strings with possible completions for initialText. This array must be freed by strfreev when finished.

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

new

filenameCompleterNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m FilenameCompleter

Returns: a FilenameCompleter.

Creates a new filename completer.

setDirsOnly

filenameCompleterSetDirsOnly Source #

Arguments

:: (HasCallStack, MonadIO m, IsFilenameCompleter a) 
=> a

completer: the filename completer.

-> Bool

dirsOnly: a Bool.

-> m () 

If dirsOnly is True, completer will only complete directory names, and not file names.

Signals

gotCompletionData

type C_FilenameCompleterGotCompletionDataCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type FilenameCompleterGotCompletionDataCallback = IO () Source #

Emitted when the file name completion information comes available.

afterFilenameCompleterGotCompletionData :: (IsFilenameCompleter a, MonadIO m) => a -> FilenameCompleterGotCompletionDataCallback -> m SignalHandlerId Source #

Connect a signal handler for the gotCompletionData signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after filenameCompleter #gotCompletionData callback

onFilenameCompleterGotCompletionData :: (IsFilenameCompleter a, MonadIO m) => a -> FilenameCompleterGotCompletionDataCallback -> m SignalHandlerId Source #

Connect a signal handler for the gotCompletionData signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on filenameCompleter #gotCompletionData callback