GtkSourceHoverContext

GtkSourceHoverContext — Context for populating GtkSourceHoverDisplay contents

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GtkSourceHoverContext

Includes

#include <gtksourceview/gtksource.h>

Description

GtkSourceHoverContext contains information about the request to populate contents for a GtkSourceHoverDisplay.

It can be used to retrieve the GtkSourceView, GtkSourceBuffer, and GtkTextIter for the regions of text which are being displayed.

Use gtk_source_hover_context_get_bounds() to get the word that was requested. gtk_source_hover_contents_get_iter() will get you the location of the pointer when the request was made.

Functions

gtk_source_hover_context_get_bounds ()

gboolean
gtk_source_hover_context_get_bounds (GtkSourceHoverContext *self,
                                     GtkTextIter *begin,
                                     GtkTextIter *end);

gtk_source_hover_context_get_buffer ()

GtkSourceBuffer *
gtk_source_hover_context_get_buffer (GtkSourceHoverContext *self);

A convenience function to get the buffer.

Parameters

Returns

The GtkSourceBuffer for the view.

[transfer none]


gtk_source_hover_context_get_iter ()

gboolean
gtk_source_hover_context_get_iter (GtkSourceHoverContext *self,
                                   GtkTextIter *iter);

gtk_source_hover_context_get_view ()

GtkSourceView *
gtk_source_hover_context_get_view (GtkSourceHoverContext *self);

Parameters

Returns

the GtkSourceView that owns the context.

[transfer none]

Types and Values

GtkSourceHoverContext

typedef struct _GtkSourceHoverContext GtkSourceHoverContext;

See Also

GtkSourceHover, GtkSourceHoverProvider, GtkSourceHoverDisplay