Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
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
- newtype FilenameCompleter = FilenameCompleter (ManagedPtr FilenameCompleter)
- class (GObject o, IsDescendantOf FilenameCompleter o) => IsFilenameCompleter o
- toFilenameCompleter :: (MonadIO m, IsFilenameCompleter o) => o -> m FilenameCompleter
- filenameCompleterGetCompletionSuffix :: (HasCallStack, MonadIO m, IsFilenameCompleter a) => a -> Text -> m Text
- filenameCompleterGetCompletions :: (HasCallStack, MonadIO m, IsFilenameCompleter a) => a -> Text -> m [Text]
- filenameCompleterNew :: (HasCallStack, MonadIO m) => m FilenameCompleter
- filenameCompleterSetDirsOnly :: (HasCallStack, MonadIO m, IsFilenameCompleter a) => a -> Bool -> m ()
- type C_FilenameCompleterGotCompletionDataCallback = Ptr () -> Ptr () -> IO ()
- type FilenameCompleterGotCompletionDataCallback = IO ()
- afterFilenameCompleterGotCompletionData :: (IsFilenameCompleter a, MonadIO m) => a -> FilenameCompleterGotCompletionDataCallback -> m SignalHandlerId
- genClosure_FilenameCompleterGotCompletionData :: MonadIO m => FilenameCompleterGotCompletionDataCallback -> m (GClosure C_FilenameCompleterGotCompletionDataCallback)
- mk_FilenameCompleterGotCompletionDataCallback :: C_FilenameCompleterGotCompletionDataCallback -> IO (FunPtr C_FilenameCompleterGotCompletionDataCallback)
- noFilenameCompleterGotCompletionDataCallback :: Maybe FilenameCompleterGotCompletionDataCallback
- onFilenameCompleterGotCompletionData :: (IsFilenameCompleter a, MonadIO m) => a -> FilenameCompleterGotCompletionDataCallback -> m SignalHandlerId
- wrap_FilenameCompleterGotCompletionDataCallback :: FilenameCompleterGotCompletionDataCallback -> C_FilenameCompleterGotCompletionDataCallback
Exported types
newtype FilenameCompleter Source #
Memory-managed wrapper type.
Instances
Eq FilenameCompleter Source # | |
Defined in GI.Gio.Objects.FilenameCompleter (==) :: FilenameCompleter -> FilenameCompleter -> Bool # (/=) :: FilenameCompleter -> FilenameCompleter -> Bool # | |
IsGValue FilenameCompleter Source # | Convert |
Defined in GI.Gio.Objects.FilenameCompleter toGValue :: FilenameCompleter -> IO GValue # fromGValue :: GValue -> IO FilenameCompleter # | |
ManagedPtrNewtype FilenameCompleter Source # | |
TypedObject FilenameCompleter Source # | |
Defined in GI.Gio.Objects.FilenameCompleter | |
GObject FilenameCompleter Source # | |
Defined in GI.Gio.Objects.FilenameCompleter | |
HasParentTypes FilenameCompleter Source # | |
Defined in GI.Gio.Objects.FilenameCompleter | |
type ParentTypes FilenameCompleter Source # | |
Defined in GI.Gio.Objects.FilenameCompleter |
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
(GObject o, IsDescendantOf FilenameCompleter o) => IsFilenameCompleter o Source # | |
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 #
:: (HasCallStack, MonadIO m, IsFilenameCompleter a) | |
=> a |
|
-> Text |
|
-> m Text | Returns: a completed string, or |
Obtains a completion for initialText
from completer
.
getCompletions
filenameCompleterGetCompletions Source #
:: (HasCallStack, MonadIO m, IsFilenameCompleter a) | |
=> a |
|
-> Text |
|
-> m [Text] | Returns: array of strings with possible completions for |
Gets an array of completion strings for a given initial text.
new
:: (HasCallStack, MonadIO m) | |
=> m FilenameCompleter | Returns: a |
Creates a new filename completer.
setDirsOnly
filenameCompleterSetDirsOnly Source #
:: (HasCallStack, MonadIO m, IsFilenameCompleter a) | |
=> 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
genClosure_FilenameCompleterGotCompletionData :: MonadIO m => FilenameCompleterGotCompletionDataCallback -> m (GClosure C_FilenameCompleterGotCompletionDataCallback) Source #
Wrap the callback into a GClosure
.
mk_FilenameCompleterGotCompletionDataCallback :: C_FilenameCompleterGotCompletionDataCallback -> IO (FunPtr C_FilenameCompleterGotCompletionDataCallback) Source #
Generate a function pointer callable from C code, from a C_FilenameCompleterGotCompletionDataCallback
.
noFilenameCompleterGotCompletionDataCallback :: Maybe FilenameCompleterGotCompletionDataCallback Source #
A convenience synonym for
.Nothing
:: Maybe
FilenameCompleterGotCompletionDataCallback
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