gi-webkit-3.0.14: WebKit bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit.Interfaces.SpellChecker

Contents

Description

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.

Synopsis

Exported types

Methods

checkSpellingOfString

spellCheckerCheckSpellingOfString Source #

Arguments

:: (HasCallStack, MonadIO m, IsSpellChecker a) 
=> a

checker: a SpellChecker

-> Text

string: the string to check for misspellings

-> 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

spellCheckerGetAutocorrectSuggestionsForMisspelledWord Source #

Arguments

:: (HasCallStack, MonadIO m, IsSpellChecker a) 
=> a

checker: a SpellChecker

-> Text

word: a misspelled word

-> m Text

Returns: the suggestion for the autocorrection of word

Returns a suggestion for a word to use in an "autocorrect" feature.

Since: 1.5.1

getGuessesForWord

spellCheckerGetGuessesForWord Source #

Arguments

:: (HasCallStack, MonadIO m, IsSpellChecker a) 
=> a

checker: a SpellChecker

-> Text

word: the misspelled word

-> Maybe Text

context: the surrounding context of the misspelled word

-> m [Text]

Returns: a newly allocated Nothing-terminated array of suggested corrections for a misspelled word word. Free it with g_strfreev when done with it.

Returns a Nothing-terminated array of guesses for corrections of the misspelled word word.

Since: 1.5.1

ignoreWord

spellCheckerIgnoreWord Source #

Arguments

:: (HasCallStack, MonadIO m, IsSpellChecker a) 
=> a

checker: a SpellChecker

-> Text

word: the word to ignore

-> m () 

Instructs the checker to ignore word as a misspelling for this session.

Since: 1.5.1

learnWord

spellCheckerLearnWord Source #

Arguments

:: (HasCallStack, MonadIO m, IsSpellChecker a) 
=> a

checker: a SpellChecker

-> Text

word: the word to learn

-> 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

spellCheckerUpdateSpellCheckingLanguages Source #

Arguments

:: (HasCallStack, MonadIO m, IsSpellChecker a) 
=> a

checker: a SpellChecker

-> Maybe Text

languages: a string of languages to use for checker

-> 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