WebTextCheckerClient.h [plain text]
#ifndef WebTextCheckerClient_h
#define WebTextCheckerClient_h
#include "APIClient.h"
#include "WKTextChecker.h"
#include <WebCore/TextCheckerClient.h>
#include <wtf/Forward.h>
#include <wtf/Vector.h>
namespace API {
template<> struct ClientTraits<WKTextCheckerClientBase> {
typedef std::tuple<WKTextCheckerClientV0> Versions;
};
}
namespace WebKit {
class WebPageProxy;
class WebTextCheckerClient : public API::Client<WKTextCheckerClientBase> {
public:
bool continuousSpellCheckingAllowed();
bool continuousSpellCheckingEnabled();
void setContinuousSpellCheckingEnabled(bool);
bool grammarCheckingEnabled();
void setGrammarCheckingEnabled(bool);
uint64_t uniqueSpellDocumentTag(WebPageProxy*);
void closeSpellDocumentWithTag(uint64_t);
void checkSpellingOfString(uint64_t tag, const String& text, int32_t& misspellingLocation, int32_t& misspellingLength);
void checkGrammarOfString(uint64_t tag, const String& text, Vector<WebCore::GrammarDetail>&, int32_t& badGrammarLocation, int32_t& badGrammarLength);
bool spellingUIIsShowing();
void toggleSpellingUIIsShowing();
void updateSpellingUIWithMisspelledWord(uint64_t tag, const String& misspelledWord);
void updateSpellingUIWithGrammarString(uint64_t tag, const String& badGrammarPhrase, const WebCore::GrammarDetail&);
void guessesForWord(uint64_t tag, const String& word, Vector<String>& guesses);
void learnWord(uint64_t tag, const String& word);
void ignoreWord(uint64_t tag, const String& word);
};
}
#endif // WebTextCheckerClient_h