Top | ![]() |
![]() |
![]() |
![]() |
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.
void gtk_source_hover_provider_populate_async (GtkSourceHoverProvider *self
,GtkSourceHoverContext *context
,GtkSourceHoverDisplay *display
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean gtk_source_hover_provider_populate_finish (GtkSourceHoverProvider *self
,GAsyncResult *result
,GError **error
);
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); };