GtkSource.AnnotationProvider¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class GtkSource.AnnotationProvider(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
It is used to provide annotations and display them on [class`View`] and also populate [class`HoverDisplay`] when the user hovers over an annotation.
You can subclass this object and implement [method`AnnotationProvider`.populate_hover_async] and [method`AnnotationProvider`.populate_hover_finish] or connect to [signal`AnnotationProvider`:py:func:::populate<GtkSource.AnnotationProvider.signals.populate>] and call [method`AnnotationProvider`.populate] or do it asynchronously.
New in version 5.18.
- classmethod new()¶
- Returns:
- Return type:
Used to create a new annotation provider.
New in version 5.18.
- add_annotation(annotation)¶
- Parameters:
annotation (
GtkSource.Annotation) –
Add an annotation to the provider.
New in version 5.18.
- populate_hover_async(annotation, display, cancellable, callback, *user_data)¶
- Parameters:
annotation (
GtkSource.Annotation) – aGtkSource.Annotationdisplay (
GtkSource.HoverDisplay) – aGtkSource.HoverDisplayto populatecancellable (
Gio.CancellableorNone) –callback (
Gio.AsyncReadyCallbackorNone) –
Used to populate the [class`HoverDisplay`] asynchronously, use [method`AnnotationProvider`.populate_hover] to do it synchronously.
New in version 5.18.
- populate_hover_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) –- Raises:
- Returns:
- Return type:
Finishes populating the [class`HoverDisplay`] asynchronously.
New in version 5.18.
- remove_all()¶
Removes all annotations from the provider.
New in version 5.18.
- remove_annotation(annotation)¶
- Parameters:
annotation (
GtkSource.Annotation) –- Returns:
Trueif the annotation was found and removed- Return type:
Remove an annotation from the provider.
New in version 5.18.
- do_populate_hover_async(annotation, display, cancellable, callback, *user_data) virtual¶
- Parameters:
annotation (
GtkSource.Annotation) – aGtkSource.Annotationdisplay (
GtkSource.HoverDisplay) – aGtkSource.HoverDisplayto populatecancellable (
Gio.CancellableorNone) –callback (
Gio.AsyncReadyCallbackorNone) –
Used to populate the [class`HoverDisplay`] asynchronously, use [method`AnnotationProvider`.populate_hover] to do it synchronously.
New in version 5.18.
- do_populate_hover_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult) –- Returns:
- Return type:
Finishes populating the [class`HoverDisplay`] asynchronously.
New in version 5.18.
Signal Details¶
- GtkSource.AnnotationProvider.signals.changed(annotation_provider)¶
- Signal Name:
changed- Flags:
- Parameters:
annotation_provider (
GtkSource.AnnotationProvider) – The object which received the signal
New in version 5.18.