Maintainer | gtk2hs-users@lists.sourceforge.net |
---|---|
Stability | provisional |
Portability | portable (depends on GHC) |
Safe Haskell | None |
Language | Haskell98 |
- data SourceCompletionProvider
- class GObjectClass o => SourceCompletionProviderClass o
- sourceCompletionProviderGetName :: (SourceCompletionProviderClass scp, GlibString string) => scp -> IO string
- sourceCompletionProviderGetIcon :: SourceCompletionProviderClass scp => scp -> IO (Maybe Pixbuf)
- sourceCompletionProviderGetInteractiveDelay :: SourceCompletionProviderClass scp => scp -> IO Int
- sourceCompletionProviderGetPriority :: SourceCompletionProviderClass scp => scp -> IO Int
- sourceCompletionProviderGetInfoWidget :: SourceCompletionProviderClass scp => scp -> SourceCompletionProposal -> IO Widget
- sourceCompletionProviderGetActivation :: SourceCompletionProviderClass scp => scp -> IO SourceCompletionActivation
- sourceCompletionProviderGetStartIter :: SourceCompletionProviderClass scp => scp -> SourceCompletionContext -> SourceCompletionProposal -> IO (Maybe TextIter)
- sourceCompletionProviderMatch :: SourceCompletionProviderClass scp => scp -> SourceCompletionContext -> IO Bool
- sourceCompletionProviderUpdateInfo :: SourceCompletionProviderClass scp => scp -> SourceCompletionProposal -> SourceCompletionInfo -> IO ()
- sourceCompletionProviderPopulate :: SourceCompletionProviderClass scp => scp -> SourceCompletionContext -> IO ()
- sourceCompletionProviderActivateProposal :: SourceCompletionProviderClass scp => scp -> SourceCompletionProposal -> TextIter -> IO Bool
Description
You must implement this interface to provide proposals to SourceCompletion
Types
class GObjectClass o => SourceCompletionProviderClass o Source
Methods
sourceCompletionProviderGetName Source
:: (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
:: 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
:: 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
:: SourceCompletionProviderClass scp | |
=> scp | |
-> SourceCompletionProposal |
|
-> IO 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
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
:: SourceCompletionProviderClass scp | |
=> scp | |
-> SourceCompletionContext | |
-> IO Bool | returns |
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
:: SourceCompletionProviderClass scp | |
=> scp | |
-> SourceCompletionProposal | |
-> TextIter | |
-> IO 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 label of proposal.