gi-gtksource-3.0.15: GtkSource bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.GtkSource.Objects.Completion

Contents

Description

 

Synopsis

Exported types

Methods

addProvider

completionAddProvider Source #

Arguments

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

completion: a Completion.

-> b

provider: a CompletionProvider.

-> m ()

(Can throw GError)

Add a new CompletionProvider to the completion object. This will add a reference provider, so make sure to unref your own copy when you no longer need it.

blockInteractive

completionBlockInteractive Source #

Arguments

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

completion: a Completion.

-> m () 

Block interactive completion. This can be used to disable interactive completion when inserting or deleting text from the buffer associated with the completion. Use completionUnblockInteractive to enable interactive completion again.

This function may be called multiple times. It will continue to block interactive completion until completionUnblockInteractive has been called the same number of times.

createContext

completionCreateContext Source #

Arguments

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

completion: a Completion.

-> Maybe TextIter

position: a TextIter, or Nothing.

-> m CompletionContext

Returns: a new CompletionContext. The reference being returned is a 'floating' reference, so if you invoke completionShow with this context you don't need to unref it.

Create a new CompletionContext for completion. The position where the completion occurs can be specified by position. If position is Nothing, the current cursor position will be used.

getInfoWindow

completionGetInfoWindow Source #

Arguments

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

completion: a Completion.

-> m CompletionInfo

Returns: The CompletionInfo window associated with completion.

The info widget is the window where the completion displays optional extra information of the proposal.

getProviders

completionGetProviders Source #

Arguments

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

completion: a Completion.

-> m [CompletionProvider]

Returns: list of CompletionProvider.

Get list of providers registered on completion. The returned list is owned by the completion and should not be freed.

getView

completionGetView Source #

Arguments

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

completion: a Completion.

-> m (Maybe View)

Returns: The View associated with completion, or Nothing.

The View associated with completion, or Nothing if the view has been destroyed.

hide

completionHide Source #

Arguments

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

completion: a Completion.

-> m () 

Hides the completion if it is active (visible).

moveWindow

completionMoveWindow Source #

Arguments

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

completion: a Completion.

-> TextIter

iter: a TextIter.

-> m () 

Deprecated: (Since version 3.8)Use completionProviderGetStartIter instead.

Move the completion window to a specific iter.

removeProvider

completionRemoveProvider Source #

Arguments

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

completion: a Completion.

-> b

provider: a CompletionProvider.

-> m ()

(Can throw GError)

Remove provider from the completion.

show

completionShow Source #

Arguments

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

completion: a Completion.

-> [b]

providers: a list of CompletionProvider, or Nothing.

-> c

context: The CompletionContext with which to start the completion.

-> m Bool

Returns: True if it was possible to the show completion window.

Starts a new completion with the specified CompletionContext and a list of potential candidate providers for completion.

It can be convenient for showing a completion on-the-fly, without the need to add or remove providers to the Completion.

Another solution is to add providers with completionAddProvider, and implement completionProviderMatch for each provider.

unblockInteractive

completionUnblockInteractive Source #

Arguments

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

completion: a Completion.

-> m () 

Unblock interactive completion. This can be used after using completionBlockInteractive to enable interactive completion again.

Properties

accelerators

autoCompleteDelay

proposalPageSize

providerPageSize

rememberInfoVisibility

selectOnShow

showHeaders

showIcons

view

Signals

activateProposal

hide

type C_CompletionHideCallback = Ptr () -> Ptr () -> IO () Source #

moveCursor

movePage

populateContext

show

type C_CompletionShowCallback = Ptr () -> Ptr () -> IO () Source #