gtksourceview2-0.12.2: Binding to the GtkSourceView library.

Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net

Graphics.UI.Gtk.SourceView.SourceCompletionProvider

Contents

Description

 

Synopsis

Description

You must implement this interface to provide proposals to SourceCompletion

Types

Methods

sourceCompletionProviderGetNameSource

Arguments

:: SourceCompletionProviderClass scp 
=> scp 
-> IO String

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).

sourceCompletionProviderGetIcon :: SourceCompletionProviderClass scp => scp -> IO (Maybe Pixbuf)Source

Get the icon of the provider.

sourceCompletionProviderGetInteractiveDelaySource

Arguments

:: SourceCompletionProviderClass scp 
=> scp 
-> IO Int

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 autoCompleteDelay.

sourceCompletionProviderGetPrioritySource

Arguments

:: SourceCompletionProviderClass scp 
=> scp 
-> IO Int

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.

sourceCompletionProviderGetInfoWidgetSource

Arguments

:: SourceCompletionProviderClass scp 
=> scp 
-> SourceCompletionProposal

proposal The currently selected SourceCompletionProposal

-> IO Widget

returns a custom Widget to show extra information about proposal.

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 implemented, sourceCompletionProviderUpdateInfo MUST also be implemented. If not implemented, the default sourceCompletionProposalGetInfo will be used to display extra information about a SourceCompletionProposal.

sourceCompletionProviderGetActivation :: SourceCompletionProviderClass scp => scp -> IO SourceCompletionActivationSource

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

sourceCompletionProviderGetStartIter :: SourceCompletionProviderClass scp => scp -> SourceCompletionContext -> SourceCompletionProposal -> IO (Maybe TextIter)Source

Get the TextIter at which the completion for proposal starts. When implemented, the completion can use this information to position the completion window accordingly when a proposal is selected in the completion window.

sourceCompletionProviderMatchSource

Arguments

:: SourceCompletionProviderClass scp 
=> scp 
-> SourceCompletionContext 
-> IO Bool

returns True if provider matches the completion context, False otherwise

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

sourceCompletionProviderUpdateInfo :: SourceCompletionProviderClass scp => scp -> SourceCompletionProposal -> SourceCompletionInfo -> IO ()Source

Update extra information shown in info for proposal. This should be implemented if your provider sets a custom info widget for proposal. This function MUST be implemented when sourceCompletionProviderGetInfoWidget is implemented.

sourceCompletionProviderPopulate :: SourceCompletionProviderClass scp => scp -> SourceCompletionContext -> IO ()Source

Populate context with proposals from provider

sourceCompletionProviderActivateProposalSource

Arguments

:: SourceCompletionProviderClass scp 
=> scp 
-> SourceCompletionProposal 
-> TextIter 
-> IO 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 label of proposal.