gi-gtksource-5.0.0: GtkSource bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GtkSource.Objects.HoverContext

Description

Context for populating [classhoverDisplay] contents.

GtkSourceHoverContext contains information about the request to populate contents for a [classhoverDisplay].

It can be used to retrieve the [classview], [classbuffer], and [structgtk.TextIter] for the regions of text which are being displayed.

Use [methodhoverContext.get_bounds] to get the word that was requested. [methodhoverContext.get_iter] will get you the location of the pointer when the request was made.

Synopsis

Exported types

newtype HoverContext Source #

Memory-managed wrapper type.

Constructors

HoverContext (ManagedPtr HoverContext) 

Instances

Instances details
Eq HoverContext Source # 
Instance details

Defined in GI.GtkSource.Objects.HoverContext

GObject HoverContext Source # 
Instance details

Defined in GI.GtkSource.Objects.HoverContext

ManagedPtrNewtype HoverContext Source # 
Instance details

Defined in GI.GtkSource.Objects.HoverContext

Methods

toManagedPtr :: HoverContext -> ManagedPtr HoverContext

TypedObject HoverContext Source # 
Instance details

Defined in GI.GtkSource.Objects.HoverContext

Methods

glibType :: IO GType

HasParentTypes HoverContext Source # 
Instance details

Defined in GI.GtkSource.Objects.HoverContext

IsGValue (Maybe HoverContext) Source #

Convert HoverContext to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.GtkSource.Objects.HoverContext

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe HoverContext -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe HoverContext)

type ParentTypes HoverContext Source # 
Instance details

Defined in GI.GtkSource.Objects.HoverContext

type ParentTypes HoverContext = '[Object]

class (GObject o, IsDescendantOf HoverContext o) => IsHoverContext o Source #

Type class for types which can be safely cast to HoverContext, for instance with toHoverContext.

Instances

Instances details
(GObject o, IsDescendantOf HoverContext o) => IsHoverContext o Source # 
Instance details

Defined in GI.GtkSource.Objects.HoverContext

toHoverContext :: (MonadIO m, IsHoverContext o) => o -> m HoverContext Source #

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

Methods

getBounds

hoverContextGetBounds Source #

Arguments

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

self: an HoverContext

-> m (Bool, TextIter, TextIter)

Returns: True if the marks are still valid and begin or end was set.

Gets the current word bounds of the hover.

If begin is non-Nothing, it will be set to the start position of the current word being hovered.

If end is non-Nothing, it will be set to the end position for the current word being hovered.

getBuffer

hoverContextGetBuffer Source #

Arguments

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

self: a HoverContext

-> m Buffer

Returns: The Buffer for the view

A convenience function to get the buffer.

getIter

hoverContextGetIter :: (HasCallStack, MonadIO m, IsHoverContext a) => a -> TextIter -> m Bool Source #

No description available in the introspection data.

getView

hoverContextGetView Source #

Arguments

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

self: a HoverContext

-> m View

Returns: the View that owns the context

No description available in the introspection data.