HoverProvider
- class HoverProvider(*args, **kwargs)
Interface to populate interactive tooltips.
GtkSourceHoverProvider
is an interface that should be implemented to extend
the contents of a HoverDisplay
. This is typical in editors that
interact external tooling such as those utilizing Language Server Protocol.
If you can populate the HoverDisplay
synchronously, use
populate
. Otherwise, interface implementations that
may take additional time should use populate_async
to avoid blocking the main loop.
Methods
- class HoverProvider
- populate_async(context: HoverContext, display: HoverDisplay, cancellable: Cancellable | None = None, callback: Callable[[...], None] | None = None, *user_data: Any) None
- Parameters:
context
display
cancellable
callback
user_data
- populate_finish(result: AsyncResult) bool
- Parameters:
result
Virtual Methods
- class HoverProvider
- do_populate(context: HoverContext, display: HoverDisplay) bool
- Parameters:
context
display
- do_populate_async(context: HoverContext, display: HoverDisplay, cancellable: Cancellable | None = None, callback: Callable[[...], None] | None = None, *user_data: Any) None
- Parameters:
context
display
cancellable
callback
user_data
- do_populate_finish(result: AsyncResult) bool
- Parameters:
result