[gtksourceview] completion: update documentation



commit 644b6bd3fe86e8644f4e99bcf9b5a8139e841f87
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 4 10:47:38 2021 -0800

    completion: update documentation
    
    This brings over some of the relevant docs from the previous implementation
    until we get something more complete.

 gtksourceview/gtksourcecompletion.c | 40 +++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index ceab576e..81a9db43 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -34,6 +34,46 @@
 #include "gtksourcesignalgroup-private.h"
 #include "gtksourceview-private.h"
 
+/**
+ * SECTION:completion
+ * @title: GtkSourceCompletion
+ * @short_description: Main Completion Object
+ *
+ * The completion system helps the user when he/she writes some text,
+ * such as words, command names, functions, and suchlike. Proposals can
+ * be shown, to complete the text the user is writing. Each proposal can
+ * contain an additional piece of information (for example
+ * documentation), that is displayed when the "Details" button is
+ * clicked.
+ *
+ * Proposals are created via a #GtkSourceCompletionProvider. There can
+ * be for example a provider to complete words (see
+ * #GtkSourceCompletionWords), another provider for the completion of
+ * function names, etc. To add a provider, call
+ * gtk_source_completion_add_provider().
+ *
+ * When several providers match, they are all shown in the completion
+ * window, but one can switch between providers: see the
+ * #GtkSourceCompletion::move-page signal. It is also possible to
+ * activate the first proposals with key bindings, see the
+ * #GtkSourceCompletion:accelerators property.
+ *
+ * The #GtkSourceCompletionProposal interface represents a proposal.
+ *
+ * If a proposal contains extra information (see
+ * %GTK_SOURCE_COMPLETION_COLUMN_DETAILS), it will be
+ * displayed in a supplemental details window, which appears when
+ * the "Details" button is clicked.
+ *
+ * Each #GtkSourceView object is associated with a #GtkSourceCompletion
+ * instance. This instance can be obtained with
+ * gtk_source_view_get_completion(). The #GtkSourceView class contains also the
+ * #GtkSourceView::show-completion signal.
+ *
+ * A same #GtkSourceCompletionProvider object can be used for several
+ * #GtkSourceCompletion's.
+ */
+
 #define DEFAULT_PAGE_SIZE 5
 
 struct _GtkSourceCompletion


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]