1 /*************************************************************************** 2 * Copyright (C) 2012~2012 by Yichao Yu * 3 * yyc1992@gmail.com * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program; if not, write to the * 17 * Free Software Foundation, Inc., * 18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * 19 ***************************************************************************/ 20 #ifndef _FCITX_MODULE_SPELL_H 21 #define _FCITX_MODULE_SPELL_H 22 23 #include "fcitx/candidate.h" 24 25 typedef enum { 26 EP_Default = 0, 27 EP_Aspell, 28 EP_Myspell 29 } EnchantProvider; 30 31 typedef struct { 32 char *display; 33 char *commit; 34 } SpellHint; 35 36 #define FCITX_SPELL_NAME "fcitx-spell" 37 38 enum { 39 FCITX_SPELL_HINT_WORDS, 40 FCITX_SPELL_ADD_PERSONAL, 41 FCITX_SPELL_DICT_AVAILABLE, 42 FCITX_SPELL_GET_CANDWORDS, 43 FCITX_SPELL_CANDWORD_GET_COMMIT, 44 }; 45 46 typedef INPUT_RETURN_VALUE (*FcitxSpellGetCandWordCb)(void *arg, 47 const char *commit); 48 49 typedef SpellHint* FCITX_SPELL_HINT_WORDS_RETURNTYPE; 50 typedef unsigned long FCITX_SPELL_ADD_PERSONAL_RETURNTYPE; 51 typedef unsigned long FCITX_SPELL_DICT_AVAILABLE_RETURNTYPE; 52 typedef FcitxCandidateWordList* FCITX_SPELL_GET_CANDWORDS_RETURNTYPE; 53 typedef const char* FCITX_SPELL_CANDWORD_GET_COMMIT_RETURNTYPE; 54 55 #endif 56 57 // kate: indent-mode cstyle; space-indent on; indent-width 0; 58