Class: GtkSource::AnnotationProvider

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize ⇒ GtkSource::AnnotationProvider

Used to create a new annotation provider.

Instance Method Details

#add_annotation(annotation) ⇒ nil

Add an annotation to the provider.

Parameters:

Returns:

  • (nil)

#populate_hover_async(annotation, display, cancellable, callback, user_data) ⇒ nil

Used to populate the [classHoverDisplay] asynchronously, use
[methodAnnotationProvider.populate_hover] to do it synchronously.

Parameters:

  • annotation (GtkSource::Annotation) —

    a Gtk::SourceAnnotation

  • display (GtkSource::HoverDisplay) —

    a Gtk::SourceHoverDisplay to populate

  • cancellable (Gio::Cancellable)
  • callback (Gio::AsyncReadyCallback)
  • user_data (GObject)

Returns:

  • (nil)

#populate_hover_finish(result) ⇒ Boolean

Finishes populating the [classHoverDisplay] asynchronously.

Parameters:

  • result (Gio::AsyncResult)

Returns:

  • (Boolean) —

    true if successful; otherwise false and error is set.

#remove_all ⇒ nil

Removes all annotations from the provider.

Returns:

  • (nil)

#remove_annotation(annotation) ⇒ Boolean

Remove an annotation from the provider.

Parameters:

Returns:

  • (Boolean) —

    true if the annotation was found and removed