gi-gtksource-3.0.22: GtkSource bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.GtkSource.Interfaces.CompletionProvider

Description

No description available in the introspection data.

Synopsis

Exported types

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

Instances details
(GObject o, IsDescendantOf CompletionProvider o) => IsCompletionProvider o Source # 
Instance details

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

Overloaded methods

activateProposal

completionProviderActivateProposal Source #

Arguments

:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionProposal b) 
=> a

provider: a CompletionProvider.

-> b

proposal: a CompletionProposal.

-> TextIter

iter: a TextIter.

-> m Bool

Returns: True to indicate that the proposal activation has been handled, False otherwise.

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 #

Arguments

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

provider: a CompletionProvider.

-> m [CompletionActivation]

Returns: a combination of CompletionActivation.

Get with what kind of activation the provider should be activated.

getGicon

completionProviderGetGicon Source #

Arguments

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

provider: The CompletionProvider

-> m (Maybe Icon)

Returns: The icon to be used for the provider, or Nothing if the provider does not have a special icon.

Gets the Icon for the icon of provider.

Since: 3.18

getIcon

completionProviderGetIcon Source #

Arguments

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

provider: The CompletionProvider

-> m (Maybe Pixbuf)

Returns: The icon to be used for the provider, or Nothing if the provider does not have a special icon.

Get the Pixbuf for the icon of the provider.

getIconName

completionProviderGetIconName Source #

Arguments

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

provider: The CompletionProvider

-> m (Maybe Text)

Returns: The icon name to be used for the provider, or Nothing if the provider does not have a special icon.

Gets the icon name of provider.

Since: 3.18

getInfoWidget

completionProviderGetInfoWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionProposal b) 
=> a

provider: a CompletionProvider.

-> b

proposal: a currently selected CompletionProposal.

-> m (Maybe Widget)

Returns: a custom Widget to show extra information about proposal, or Nothing if the provider does not have a special info widget.

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 #

Arguments

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

provider: a CompletionProvider.

-> 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 #

Arguments

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

provider: a CompletionProvider.

-> 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 #

Arguments

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

provider: a CompletionProvider.

-> 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 #

Arguments

:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionContext b, IsCompletionProposal c) 
=> a

provider: a CompletionProvider.

-> b

context: a CompletionContext.

-> c

proposal: a CompletionProposal.

-> m (Bool, TextIter)

Returns: True if iter was set for proposal, False otherwise.

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 #

Arguments

:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionContext b) 
=> a

provider: a CompletionProvider.

-> b

context: a CompletionContext.

-> m Bool

Returns: True if provider matches the completion context, False otherwise.

Get whether the provider match the context of completion detailed in context.

populate

completionProviderPopulate Source #

Arguments

:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionContext b) 
=> a

provider: a CompletionProvider.

-> b

context: a CompletionContext.

-> m () 

Populate context with proposals from provider added with the completionContextAddProposals function.

updateInfo

completionProviderUpdateInfo Source #

Arguments

:: (HasCallStack, MonadIO m, IsCompletionProvider a, IsCompletionProposal b, IsCompletionInfo c) 
=> a

provider: a CompletionProvider.

-> b

proposal: a CompletionProposal.

-> c

info: a CompletionInfo.

-> m () 

Update extra information shown in info for proposal.

<note> <para> This function <emphasis>must</emphasis> be implemented when completionProviderGetInfoWidget is implemented. </para> </note>