[gedit/wip/spell-checking] spell: write API documentation



commit d4b31b37f0bc82ad07bc85b58595ce99cf943f0d
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Aug 8 12:25:02 2015 +0200

    spell: write API documentation

 plugins/spell/gedit-automatic-spell-checker.c |   47 +++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/plugins/spell/gedit-automatic-spell-checker.c b/plugins/spell/gedit-automatic-spell-checker.c
index b977b48..6bd7e5f 100644
--- a/plugins/spell/gedit-automatic-spell-checker.c
+++ b/plugins/spell/gedit-automatic-spell-checker.c
@@ -30,6 +30,24 @@
 #include "gedit-spell-utils.h"
 #include "gtktextregion.h"
 
+/**
+ * SECTION:automatic-spell-checker
+ * @Short_description: Inline spell checker for GtkTextView
+ * @Title: GeditAutomaticSpellChecker
+ * @See_also: #GeditSpellChecker
+ *
+ * The #GeditAutomaticSpellChecker is an inline spell checker for the
+ * #GtkTextView widget. Misspelled words are highlighted with a
+ * %PANGO_UNDERLINE_ERROR, usually a red wavy underline. Right-clicking a
+ * misspelled word pops up a context menu of suggested replacements. The context
+ * menu also contains an “Ignore All” item to add the misspelled word to the
+ * session dictionary. And an “Add” item to add the word to the personal
+ * dictionary.
+ *
+ * The spell is checked only on the visible regions of the attached
+ * #GtkTextView's.
+ */
+
 struct _GeditAutomaticSpellChecker
 {
        GObject parent;
@@ -1066,6 +1084,13 @@ gedit_automatic_spell_checker_init (GeditAutomaticSpellChecker *spell)
 {
 }
 
+/**
+ * gedit_automatic_spell_checker_new:
+ * @buffer: a #GtkSourceBuffer.
+ * @checker: a #GeditSpellChecker.
+ *
+ * Returns: a new #GeditAutomaticSpellChecker object.
+ */
 GeditAutomaticSpellChecker *
 gedit_automatic_spell_checker_new (GtkSourceBuffer   *buffer,
                                   GeditSpellChecker *checker)
@@ -1089,6 +1114,14 @@ gedit_automatic_spell_checker_new (GtkSourceBuffer   *buffer,
                             NULL);
 }
 
+/**
+ * gedit_automatic_spell_checker_attach_view:
+ * @spell: a #GeditAutomaticSpellChecker.
+ * @view: a #GtkTextView.
+ *
+ * Enables the inline spell checker for @view. @view must have the same buffer as
+ * the #GeditAutomaticSpellChecker:buffer property.
+ */
 void
 gedit_automatic_spell_checker_attach_view (GeditAutomaticSpellChecker *spell,
                                           GtkTextView                *view)
@@ -1126,6 +1159,13 @@ gedit_automatic_spell_checker_attach_view (GeditAutomaticSpellChecker *spell,
        g_object_ref (view);
 }
 
+/**
+ * gedit_automatic_spell_checker_detach_view:
+ * @spell: a #GeditAutomaticSpellChecker.
+ * @view: a #GtkTextView.
+ *
+ * Disables the inline spell checker for @view.
+ */
 void
 gedit_automatic_spell_checker_detach_view (GeditAutomaticSpellChecker *spell,
                                           GtkTextView                *view)
@@ -1141,6 +1181,13 @@ gedit_automatic_spell_checker_detach_view (GeditAutomaticSpellChecker *spell,
        g_object_unref (view);
 }
 
+/**
+ * gedit_automatic_spell_checker_recheck_all:
+ * @spell: a #GeditAutomaticSpellChecker.
+ *
+ * Adds the whole buffer to the region to check. But only the visible regions of
+ * the attached #GtkTextView's are scanned.
+ */
 void
 gedit_automatic_spell_checker_recheck_all (GeditAutomaticSpellChecker *spell)
 {


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