GtkSourceHoverProvider

GtkSourceHoverProvider — interface to populate interactive tooltips

Functions

Types and Values

Object Hierarchy

    GInterface
    ╰── GtkSourceHoverProvider

Prerequisites

GtkSourceHoverProvider requires GObject.

Includes

#include <gtksourceview/gtksource.h>

Description

GtkSourceHoverProvider is an interface that should be implemented to extend the contents of a GtkSourceHoverDisplay. This is typical in editors that interact external tooling such as those utilizing Language Server Protocol.

If you can populate the GtkSourceHoverDisplay synchronously, use GtkSourceHoverProvider.populate. Otherwise, interface implementations that may take additional time should use GtkSourceHoverProvider.populate_async to avoid blocking the main loop.

Functions

gtk_source_hover_provider_populate_async ()

void
gtk_source_hover_provider_populate_async
                               (GtkSourceHoverProvider *self,
                                GtkSourceHoverContext *context,
                                GtkSourceHoverDisplay *display,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

gtk_source_hover_provider_populate_finish ()

gboolean
gtk_source_hover_provider_populate_finish
                               (GtkSourceHoverProvider *self,
                                GAsyncResult *result,
                                GError **error);

Types and Values

GtkSourceHoverProvider

typedef struct _GtkSourceHoverProvider GtkSourceHoverProvider;

struct GtkSourceHoverProviderInterface

struct GtkSourceHoverProviderInterface {
	GTypeInterface parent_iface;

	gboolean (*populate)        (GtkSourceHoverProvider  *self,
	                             GtkSourceHoverContext   *context,
	                             GtkSourceHoverDisplay   *display,
	                             GError                 **error);
	void     (*populate_async)  (GtkSourceHoverProvider  *self,
	                             GtkSourceHoverContext   *context,
	                             GtkSourceHoverDisplay   *display,
	                             GCancellable            *cancellable,
	                             GAsyncReadyCallback      callback,
	                             gpointer                 user_data);
	gboolean (*populate_finish) (GtkSourceHoverProvider  *self,
	                             GAsyncResult            *result,
	                             GError                 **error);
};

See Also

GtkSourceHover, GtkSourceHoverDisplay, GtkSourceHoverContext