Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype CompletionProvider = CompletionProvider (ManagedPtr CompletionProvider)
- noCompletionProvider :: Maybe CompletionProvider
- class (GObject o, IsDescendantOf CompletionProvider o) => IsCompletionProvider o
- toCompletionProvider :: (MonadIO m, IsCompletionProvider o) => o -> m CompletionProvider
- completionProviderActivateProposal :: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionProposal b) => a -> b -> TextIter -> m Bool
- completionProviderGetActivation :: (HasCallStack, MonadIO m, IsCompletionProvider a) => a -> m [CompletionActivation]
- completionProviderGetGicon :: (HasCallStack, MonadIO m, IsCompletionProvider a) => a -> m (Maybe Icon)
- completionProviderGetIcon :: (HasCallStack, MonadIO m, IsCompletionProvider a) => a -> m (Maybe Pixbuf)
- completionProviderGetIconName :: (HasCallStack, MonadIO m, IsCompletionProvider a) => a -> m (Maybe Text)
- completionProviderGetInfoWidget :: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionProposal b) => a -> b -> m (Maybe Widget)
- completionProviderGetInteractiveDelay :: (HasCallStack, MonadIO m, IsCompletionProvider a) => a -> m Int32
- completionProviderGetName :: (HasCallStack, MonadIO m, IsCompletionProvider a) => a -> m Text
- completionProviderGetPriority :: (HasCallStack, MonadIO m, IsCompletionProvider a) => a -> m Int32
- completionProviderGetStartIter :: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionContext b, IsCompletionProposal c) => a -> b -> c -> m (Bool, TextIter)
- completionProviderMatch :: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionContext b) => a -> b -> m Bool
- completionProviderPopulate :: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionContext b) => a -> b -> m ()
- completionProviderUpdateInfo :: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionProposal b, IsCompletionInfo c) => a -> b -> c -> m ()
Exported types
newtype CompletionProvider Source #
Memory-managed wrapper type.
CompletionProvider (ManagedPtr CompletionProvider) |
Instances
GObject CompletionProvider Source # | |
Defined in GI.GtkSource.Interfaces.CompletionProvider gobjectType :: IO GType | |
HasParentTypes CompletionProvider Source # | |
Defined in GI.GtkSource.Interfaces.CompletionProvider | |
type ParentTypes CompletionProvider Source # | |
Defined in GI.GtkSource.Interfaces.CompletionProvider |
noCompletionProvider :: Maybe CompletionProvider Source #
A convenience alias for Nothing
:: Maybe
CompletionProvider
.
class (GObject o, IsDescendantOf CompletionProvider o) => IsCompletionProvider o Source #
Type class for types which can be safely cast to CompletionProvider
, for instance with toCompletionProvider
.
Instances
(GObject o, IsDescendantOf CompletionProvider o) => IsCompletionProvider o Source # | |
Defined in GI.GtkSource.Interfaces.CompletionProvider |
toCompletionProvider :: (MonadIO m, IsCompletionProvider o) => o -> m CompletionProvider Source #
Cast to CompletionProvider
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
activateProposal
completionProviderActivateProposal Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionProposal b) | |
=> a |
|
-> b |
|
-> TextIter |
|
-> m Bool | Returns: |
Activate proposal
at iter
. When this functions returns False
, the default
activation of proposal
will take place which replaces the word at iter
with the text of proposal
(see completionProposalGetText
).
Here is how the default activation selects the boundaries of the word to
replace. The end of the word is iter
. For the start of the word, it depends
on whether a start iter is defined for proposal
(see
completionProviderGetStartIter
). If a start iter is defined,
the start of the word is the start iter. Else, the word (as long as possible)
will contain only alphanumerical and the "_" characters.
getActivation
completionProviderGetActivation Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a) | |
=> a |
|
-> m [CompletionActivation] | Returns: a combination of |
Get with what kind of activation the provider should be activated.
getGicon
completionProviderGetGicon Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a) | |
=> a |
|
-> m (Maybe Icon) | Returns: The icon to be used for the provider,
or |
Gets the Icon
for the icon of provider
.
Since: 3.18
getIcon
completionProviderGetIcon Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a) | |
=> a |
|
-> m (Maybe Pixbuf) | Returns: The icon to be used for the provider,
or |
Get the Pixbuf
for the icon of the provider
.
getIconName
completionProviderGetIconName Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a) | |
=> a |
|
-> m (Maybe Text) | Returns: The icon name to be used for the provider,
or |
Gets the icon name of provider
.
Since: 3.18
getInfoWidget
completionProviderGetInfoWidget Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionProposal b) | |
=> a |
|
-> b |
|
-> m (Maybe Widget) | Returns: a custom |
Get a customized info widget to show extra information of a proposal.
This allows for customized widgets on a proposal basis, although in general
providers will have the same custom widget for all their proposals and
proposal
can be ignored. The implementation of this function is optional.
If this function is not implemented, the default widget is a Label
. The
return value of completionProposalGetInfo
is used as the
content of the Label
.
<note>
<para>
If implemented, completionProviderUpdateInfo
<emphasis>must</emphasis> also be implemented.
</para>
</note>
getInteractiveDelay
completionProviderGetInteractiveDelay Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a) | |
=> a |
|
-> m Int32 | Returns: the interactive delay in milliseconds. |
Get the delay in milliseconds before starting interactive completion for
this provider. A value of -1 indicates to use the default value as set
by the Completion
:auto-complete-delay
property.
getName
completionProviderGetName Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a) | |
=> a |
|
-> m Text | Returns: a new string containing the name of the provider. |
Get the name of the provider. This should be a translatable name for
display to the user. For example: _("Document word completion provider"). The
returned string must be freed with free
.
getPriority
completionProviderGetPriority Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a) | |
=> a |
|
-> m Int32 | Returns: the provider priority. |
Get the provider priority. The priority determines the order in which proposals appear in the completion popup. Higher priorities are sorted before lower priorities. The default priority is 0.
getStartIter
completionProviderGetStartIter Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionContext b, IsCompletionProposal c) | |
=> a |
|
-> b |
|
-> c |
|
-> m (Bool, TextIter) | Returns: |
Get the TextIter
at which the completion for proposal
starts. When
implemented, this information is used to position the completion window
accordingly when a proposal is selected in the completion window. The
proposal
text inside the completion window is aligned on iter
.
If this function is not implemented, the word boundary is taken to position
the completion window. See completionProviderActivateProposal
for an explanation on the word boundaries.
When the proposal
is activated, the default handler uses iter
as the start
of the word to replace. See
completionProviderActivateProposal
for more information.
match
completionProviderMatch Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionContext b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: |
Get whether the provider match the context of completion detailed in
context
.
populate
completionProviderPopulate Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionContext b) | |
=> a |
|
-> b |
|
-> m () |
Populate context
with proposals from provider
added with the
completionContextAddProposals
function.
updateInfo
completionProviderUpdateInfo Source #
:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionProposal b, IsCompletionInfo c) | |
=> a |
|
-> b |
|
-> c |
|
-> m () |
Update extra information shown in info
for proposal
.
<note>
<para>
This function <emphasis>must</emphasis> be implemented when
completionProviderGetInfoWidget
is implemented.
</para>
</note>