gtksourceview2-0.13.1.2: Binding to the GtkSourceView library.

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

Graphics.UI.Gtk.SourceView.SourceCompletionProvider

Contents

Description

 

Synopsis

Description

You must implement this interface to provide proposals to SourceCompletion

Types

Methods

sourceCompletionProviderGetName Source

Arguments

:: (SourceCompletionProviderClass scp, GlibString string) 
=> 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.

sourceCompletionProviderGetInteractiveDelay Source

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.

sourceCompletionProviderGetPriority Source

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.

sourceCompletionProviderGetInfoWidget Source

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 SourceCompletionActivation Source

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.

sourceCompletionProviderMatch Source

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

sourceCompletionProviderActivateProposal Source

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.