Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
SpellChecker
provides APIs for the spell checking
functionality used internally by WebKit to perform spell checking
in editable areas. This can be used, for example, by browsers to
implement custom spell checking context menus or sophisticated
auto-correct features.
- newtype SpellChecker = SpellChecker (ManagedPtr SpellChecker)
- noSpellChecker :: Maybe SpellChecker
- class GObject o => IsSpellChecker o
- toSpellChecker :: IsSpellChecker o => o -> IO SpellChecker
- data SpellCheckerCheckSpellingOfStringMethodInfo
- spellCheckerCheckSpellingOfString :: (HasCallStack, MonadIO m, IsSpellChecker a) => a -> Text -> m (Int32, Int32)
- data SpellCheckerGetAutocorrectSuggestionsForMisspelledWordMethodInfo
- spellCheckerGetAutocorrectSuggestionsForMisspelledWord :: (HasCallStack, MonadIO m, IsSpellChecker a) => a -> Text -> m Text
- data SpellCheckerGetGuessesForWordMethodInfo
- spellCheckerGetGuessesForWord :: (HasCallStack, MonadIO m, IsSpellChecker a) => a -> Text -> Maybe Text -> m [Text]
- data SpellCheckerIgnoreWordMethodInfo
- spellCheckerIgnoreWord :: (HasCallStack, MonadIO m, IsSpellChecker a) => a -> Text -> m ()
- data SpellCheckerLearnWordMethodInfo
- spellCheckerLearnWord :: (HasCallStack, MonadIO m, IsSpellChecker a) => a -> Text -> m ()
- data SpellCheckerUpdateSpellCheckingLanguagesMethodInfo
- spellCheckerUpdateSpellCheckingLanguages :: (HasCallStack, MonadIO m, IsSpellChecker a) => a -> Maybe Text -> m ()
Exported types
newtype SpellChecker Source #
GObject SpellChecker Source # | |
IsObject SpellChecker Source # | |
IsSpellChecker SpellChecker Source # | |
((~) * info (ResolveSpellCheckerMethod t SpellChecker), MethodInfo * info SpellChecker p) => IsLabel t (SpellChecker -> p) Source # | |
((~) * info (ResolveSpellCheckerMethod t SpellChecker), MethodInfo * info SpellChecker p) => IsLabelProxy t (SpellChecker -> p) Source # | |
HasAttributeList * SpellChecker Source # | |
type AttributeList SpellChecker Source # | |
type SignalList SpellChecker Source # | |
class GObject o => IsSpellChecker o Source #
toSpellChecker :: IsSpellChecker o => o -> IO SpellChecker Source #
Methods
checkSpellingOfString
data SpellCheckerCheckSpellingOfStringMethodInfo Source #
((~) * signature (Text -> m (Int32, Int32)), MonadIO m, IsSpellChecker a) => MethodInfo * SpellCheckerCheckSpellingOfStringMethodInfo a signature Source # | |
spellCheckerCheckSpellingOfString Source #
:: (HasCallStack, MonadIO m, IsSpellChecker a) | |
=> a |
|
-> Text |
|
-> m (Int32, Int32) |
Checks string
for misspellings using checker
, storing the
location and length of the first misspelling in
misspellingLocation
and misspellingLength
respectively.
Since: 1.5.1
getAutocorrectSuggestionsForMisspelledWord
data SpellCheckerGetAutocorrectSuggestionsForMisspelledWordMethodInfo Source #
((~) * signature (Text -> m Text), MonadIO m, IsSpellChecker a) => MethodInfo * SpellCheckerGetAutocorrectSuggestionsForMisspelledWordMethodInfo a signature Source # | |
spellCheckerGetAutocorrectSuggestionsForMisspelledWord Source #
:: (HasCallStack, MonadIO m, IsSpellChecker a) | |
=> a |
|
-> Text |
|
-> m Text | Returns: the suggestion for the autocorrection of
|
Returns a suggestion for a word to use in an "autocorrect" feature.
Since: 1.5.1
getGuessesForWord
data SpellCheckerGetGuessesForWordMethodInfo Source #
((~) * signature (Text -> Maybe Text -> m [Text]), MonadIO m, IsSpellChecker a) => MethodInfo * SpellCheckerGetGuessesForWordMethodInfo a signature Source # | |
spellCheckerGetGuessesForWord Source #
:: (HasCallStack, MonadIO m, IsSpellChecker a) | |
=> a |
|
-> Text |
|
-> Maybe Text |
|
-> m [Text] | Returns: a newly allocated |
Returns a Nothing
-terminated array of guesses for corrections of the
misspelled word word
.
Since: 1.5.1
ignoreWord
data SpellCheckerIgnoreWordMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsSpellChecker a) => MethodInfo * SpellCheckerIgnoreWordMethodInfo a signature Source # | |
spellCheckerIgnoreWord Source #
:: (HasCallStack, MonadIO m, IsSpellChecker a) | |
=> a |
|
-> Text |
|
-> m () |
Instructs the checker
to ignore word
as a misspelling for this
session.
Since: 1.5.1
learnWord
data SpellCheckerLearnWordMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsSpellChecker a) => MethodInfo * SpellCheckerLearnWordMethodInfo a signature Source # | |
spellCheckerLearnWord Source #
:: (HasCallStack, MonadIO m, IsSpellChecker a) | |
=> a |
|
-> Text |
|
-> m () |
Instructs the checker
to add word
to its dictionary as a properly
spelled word. The word will be learned permanently in the user's
personal dictionary.
Since: 1.5.1
updateSpellCheckingLanguages
data SpellCheckerUpdateSpellCheckingLanguagesMethodInfo Source #
((~) * signature (Maybe Text -> m ()), MonadIO m, IsSpellChecker a) => MethodInfo * SpellCheckerUpdateSpellCheckingLanguagesMethodInfo a signature Source # | |
spellCheckerUpdateSpellCheckingLanguages Source #
:: (HasCallStack, MonadIO m, IsSpellChecker a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets languages
as the list of languages to use by checker
. The
accepted format is a list of comma (',') separated language codes
of the form 'en_US', ie, language_VARIANT.
Since: 1.5.1