gi-gtksource-3.0.23: 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.Objects.Completion

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Completion Source #

Memory-managed wrapper type.

Constructors

Completion (ManagedPtr Completion) 

Instances

Instances details
Eq Completion Source # 
Instance details

Defined in GI.GtkSource.Objects.Completion

Methods

(==) :: Completion -> Completion -> Bool

(/=) :: Completion -> Completion -> Bool

GObject Completion Source # 
Instance details

Defined in GI.GtkSource.Objects.Completion

ManagedPtrNewtype Completion Source # 
Instance details

Defined in GI.GtkSource.Objects.Completion

Methods

toManagedPtr :: Completion -> ManagedPtr Completion

TypedObject Completion Source # 
Instance details

Defined in GI.GtkSource.Objects.Completion

Methods

glibType :: IO GType

IsGValue Completion Source #

Convert Completion to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.GtkSource.Objects.Completion

Methods

toGValue :: Completion -> IO GValue

fromGValue :: GValue -> IO Completion

HasParentTypes Completion Source # 
Instance details

Defined in GI.GtkSource.Objects.Completion

type ParentTypes Completion Source # 
Instance details

Defined in GI.GtkSource.Objects.Completion

type ParentTypes Completion = '[Object, Buildable]

class (GObject o, IsDescendantOf Completion o) => IsCompletion o Source #

Type class for types which can be safely cast to Completion, for instance with toCompletion.

Instances

Instances details
(GObject o, IsDescendantOf Completion o) => IsCompletion o Source # 
Instance details

Defined in GI.GtkSource.Objects.Completion

toCompletion :: (MonadIO m, IsCompletion o) => o -> m Completion Source #

Cast to Completion, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded 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

Number of keyboard accelerators to show for the first proposals. For example, to activate the first proposal, the user can press <keycombo><keycap>Alt</keycap><keycap>1</keycap></keycombo>.

constructCompletionAccelerators :: (IsCompletion o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “accelerators” property. This is rarely needed directly, but it is used by new.

getCompletionAccelerators :: (MonadIO m, IsCompletion o) => o -> m Word32 Source #

Get the value of the “accelerators” property. When overloading is enabled, this is equivalent to

get completion #accelerators

setCompletionAccelerators :: (MonadIO m, IsCompletion o) => o -> Word32 -> m () Source #

Set the value of the “accelerators” property. When overloading is enabled, this is equivalent to

set completion [ #accelerators := value ]

autoCompleteDelay

Determines the popup delay (in milliseconds) at which the completion will be shown for interactive completion.

constructCompletionAutoCompleteDelay :: (IsCompletion o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “auto-complete-delay” property. This is rarely needed directly, but it is used by new.

getCompletionAutoCompleteDelay :: (MonadIO m, IsCompletion o) => o -> m Word32 Source #

Get the value of the “auto-complete-delay” property. When overloading is enabled, this is equivalent to

get completion #autoCompleteDelay

setCompletionAutoCompleteDelay :: (MonadIO m, IsCompletion o) => o -> Word32 -> m () Source #

Set the value of the “auto-complete-delay” property. When overloading is enabled, this is equivalent to

set completion [ #autoCompleteDelay := value ]

proposalPageSize

The scroll page size of the proposals in the completion window. In other words, when <keycap>PageDown</keycap> or <keycap>PageUp</keycap> is pressed, the selected proposal becomes the one which is located one page size backward or forward.

See also the moveCursor signal.

constructCompletionProposalPageSize :: (IsCompletion o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “proposal-page-size” property. This is rarely needed directly, but it is used by new.

getCompletionProposalPageSize :: (MonadIO m, IsCompletion o) => o -> m Word32 Source #

Get the value of the “proposal-page-size” property. When overloading is enabled, this is equivalent to

get completion #proposalPageSize

setCompletionProposalPageSize :: (MonadIO m, IsCompletion o) => o -> Word32 -> m () Source #

Set the value of the “proposal-page-size” property. When overloading is enabled, this is equivalent to

set completion [ #proposalPageSize := value ]

providerPageSize

The scroll page size of the provider pages in the completion window.

See the movePage signal.

constructCompletionProviderPageSize :: (IsCompletion o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “provider-page-size” property. This is rarely needed directly, but it is used by new.

getCompletionProviderPageSize :: (MonadIO m, IsCompletion o) => o -> m Word32 Source #

Get the value of the “provider-page-size” property. When overloading is enabled, this is equivalent to

get completion #providerPageSize

setCompletionProviderPageSize :: (MonadIO m, IsCompletion o) => o -> Word32 -> m () Source #

Set the value of the “provider-page-size” property. When overloading is enabled, this is equivalent to

set completion [ #providerPageSize := value ]

rememberInfoVisibility

Determines whether the visibility of the info window should be saved when the completion is hidden, and restored when the completion is shown again.

constructCompletionRememberInfoVisibility :: (IsCompletion o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “remember-info-visibility” property. This is rarely needed directly, but it is used by new.

getCompletionRememberInfoVisibility :: (MonadIO m, IsCompletion o) => o -> m Bool Source #

Get the value of the “remember-info-visibility” property. When overloading is enabled, this is equivalent to

get completion #rememberInfoVisibility

setCompletionRememberInfoVisibility :: (MonadIO m, IsCompletion o) => o -> Bool -> m () Source #

Set the value of the “remember-info-visibility” property. When overloading is enabled, this is equivalent to

set completion [ #rememberInfoVisibility := value ]

selectOnShow

Determines whether the first proposal should be selected when the completion is first shown.

constructCompletionSelectOnShow :: (IsCompletion o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “select-on-show” property. This is rarely needed directly, but it is used by new.

getCompletionSelectOnShow :: (MonadIO m, IsCompletion o) => o -> m Bool Source #

Get the value of the “select-on-show” property. When overloading is enabled, this is equivalent to

get completion #selectOnShow

setCompletionSelectOnShow :: (MonadIO m, IsCompletion o) => o -> Bool -> m () Source #

Set the value of the “select-on-show” property. When overloading is enabled, this is equivalent to

set completion [ #selectOnShow := value ]

showHeaders

Determines whether provider headers should be shown in the proposal list. It can be useful to disable when there is only one provider.

constructCompletionShowHeaders :: (IsCompletion o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “show-headers” property. This is rarely needed directly, but it is used by new.

getCompletionShowHeaders :: (MonadIO m, IsCompletion o) => o -> m Bool Source #

Get the value of the “show-headers” property. When overloading is enabled, this is equivalent to

get completion #showHeaders

setCompletionShowHeaders :: (MonadIO m, IsCompletion o) => o -> Bool -> m () Source #

Set the value of the “show-headers” property. When overloading is enabled, this is equivalent to

set completion [ #showHeaders := value ]

showIcons

Determines whether provider and proposal icons should be shown in the completion popup.

constructCompletionShowIcons :: (IsCompletion o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “show-icons” property. This is rarely needed directly, but it is used by new.

getCompletionShowIcons :: (MonadIO m, IsCompletion o) => o -> m Bool Source #

Get the value of the “show-icons” property. When overloading is enabled, this is equivalent to

get completion #showIcons

setCompletionShowIcons :: (MonadIO m, IsCompletion o) => o -> Bool -> m () Source #

Set the value of the “show-icons” property. When overloading is enabled, this is equivalent to

set completion [ #showIcons := value ]

view

The View bound to the completion object.

constructCompletionView :: (IsCompletion o, MonadIO m, IsView a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “view” property. This is rarely needed directly, but it is used by new.

getCompletionView :: (MonadIO m, IsCompletion o) => o -> m (Maybe View) Source #

Get the value of the “view” property. When overloading is enabled, this is equivalent to

get completion #view

Signals

activateProposal

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

Type for the callback on the (unwrapped) C side.

type CompletionActivateProposalCallback = IO () Source #

The activateProposal signal is a keybinding signal which gets emitted when the user initiates a proposal activation.

Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the proposal activation programmatically.

afterCompletionActivateProposal :: (IsCompletion a, MonadIO m) => a -> CompletionActivateProposalCallback -> m SignalHandlerId Source #

Connect a signal handler for the activateProposal signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after completion #activateProposal callback

onCompletionActivateProposal :: (IsCompletion a, MonadIO m) => a -> CompletionActivateProposalCallback -> m SignalHandlerId Source #

Connect a signal handler for the activateProposal signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on completion #activateProposal callback

hide

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

Type for the callback on the (unwrapped) C side.

type CompletionHideCallback = IO () Source #

Emitted when the completion window is hidden. The default handler will actually hide the window.

afterCompletionHide :: (IsCompletion a, MonadIO m) => a -> CompletionHideCallback -> m SignalHandlerId Source #

Connect a signal handler for the hide signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after completion #hide callback

genClosure_CompletionHide :: MonadIO m => CompletionHideCallback -> m (GClosure C_CompletionHideCallback) Source #

Wrap the callback into a GClosure.

mk_CompletionHideCallback :: C_CompletionHideCallback -> IO (FunPtr C_CompletionHideCallback) Source #

Generate a function pointer callable from C code, from a C_CompletionHideCallback.

noCompletionHideCallback :: Maybe CompletionHideCallback Source #

A convenience synonym for Nothing :: Maybe CompletionHideCallback.

onCompletionHide :: (IsCompletion a, MonadIO m) => a -> CompletionHideCallback -> m SignalHandlerId Source #

Connect a signal handler for the hide signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on completion #hide callback

moveCursor

type C_CompletionMoveCursorCallback = Ptr () -> CUInt -> Int32 -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type CompletionMoveCursorCallback Source #

Arguments

 = ScrollStep

step: The ScrollStep by which to move the cursor

-> Int32

num: The amount of steps to move the cursor

-> IO () 

The moveCursor signal is a keybinding signal which gets emitted when the user initiates a cursor movement.

The <keycap>Up</keycap>, <keycap>Down</keycap>, <keycap>PageUp</keycap>, <keycap>PageDown</keycap>, <keycap>Home</keycap> and <keycap>End</keycap> keys are bound to the normal behavior expected by those keys.

When step is equal to ScrollStepPages, the page size is defined by the Completion:proposal-page-size property. It is used for the <keycap>PageDown</keycap> and <keycap>PageUp</keycap> keys.

Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically.

afterCompletionMoveCursor :: (IsCompletion a, MonadIO m) => a -> CompletionMoveCursorCallback -> m SignalHandlerId Source #

Connect a signal handler for the moveCursor signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after completion #moveCursor callback

onCompletionMoveCursor :: (IsCompletion a, MonadIO m) => a -> CompletionMoveCursorCallback -> m SignalHandlerId Source #

Connect a signal handler for the moveCursor signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on completion #moveCursor callback

movePage

type C_CompletionMovePageCallback = Ptr () -> CUInt -> Int32 -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type CompletionMovePageCallback Source #

Arguments

 = ScrollStep

step: The ScrollStep by which to move the page

-> Int32

num: The amount of steps to move the page

-> IO () 

The movePage signal is a keybinding signal which gets emitted when the user initiates a page movement (i.e. switches between provider pages).

<keycombo><keycap>Control</keycap><keycap>Left</keycap></keycombo> is for going to the previous provider. <keycombo><keycap>Control</keycap><keycap>Right</keycap></keycombo> is for going to the next provider. <keycombo><keycap>Control</keycap><keycap>Home</keycap></keycombo> is for displaying all the providers. <keycombo><keycap>Control</keycap><keycap>End</keycap></keycombo> is for going to the last provider.

When step is equal to GTK_SCROLL_PAGES, the page size is defined by the Completion:provider-page-size property.

Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the page selection programmatically.

afterCompletionMovePage :: (IsCompletion a, MonadIO m) => a -> CompletionMovePageCallback -> m SignalHandlerId Source #

Connect a signal handler for the movePage signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after completion #movePage callback

mk_CompletionMovePageCallback :: C_CompletionMovePageCallback -> IO (FunPtr C_CompletionMovePageCallback) Source #

Generate a function pointer callable from C code, from a C_CompletionMovePageCallback.

onCompletionMovePage :: (IsCompletion a, MonadIO m) => a -> CompletionMovePageCallback -> m SignalHandlerId Source #

Connect a signal handler for the movePage signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on completion #movePage callback

populateContext

type C_CompletionPopulateContextCallback = Ptr () -> Ptr CompletionContext -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type CompletionPopulateContextCallback Source #

Arguments

 = CompletionContext

context: The CompletionContext for the current completion

-> IO () 

Emitted just before starting to populate the completion with providers. You can use this signal to add additional attributes in the context.

afterCompletionPopulateContext :: (IsCompletion a, MonadIO m) => a -> CompletionPopulateContextCallback -> m SignalHandlerId Source #

Connect a signal handler for the populateContext signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after completion #populateContext callback

onCompletionPopulateContext :: (IsCompletion a, MonadIO m) => a -> CompletionPopulateContextCallback -> m SignalHandlerId Source #

Connect a signal handler for the populateContext signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on completion #populateContext callback

show

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

Type for the callback on the (unwrapped) C side.

type CompletionShowCallback = IO () Source #

Emitted when the completion window is shown. The default handler will actually show the window.

afterCompletionShow :: (IsCompletion a, MonadIO m) => a -> CompletionShowCallback -> m SignalHandlerId Source #

Connect a signal handler for the show signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after completion #show callback

genClosure_CompletionShow :: MonadIO m => CompletionShowCallback -> m (GClosure C_CompletionShowCallback) Source #

Wrap the callback into a GClosure.

mk_CompletionShowCallback :: C_CompletionShowCallback -> IO (FunPtr C_CompletionShowCallback) Source #

Generate a function pointer callable from C code, from a C_CompletionShowCallback.

noCompletionShowCallback :: Maybe CompletionShowCallback Source #

A convenience synonym for Nothing :: Maybe CompletionShowCallback.

onCompletionShow :: (IsCompletion a, MonadIO m) => a -> CompletionShowCallback -> m SignalHandlerId Source #

Connect a signal handler for the show signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on completion #show callback