1
/***************************************************************************
2
* Copyright (C) 2012~2012 by Yichao Yu *
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. *
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. *
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_INTERNAL_H
21
#define _FCITX_MODULE_SPELL_INTERNAL_H
24
#include <fcitx-config/fcitx-config.h>
29
FcitxGenericConfig gconfig;
31
EnchantProvider enchant_provider;
37
struct _FcitxInstance *owner;
38
FcitxSpellConfig config;
40
const char *before_str;
41
const char *current_str;
42
const char *after_str;
43
const char *provider_order;
46
EnchantProvider cur_enchant_provider;
47
char *enchant_saved_lang;
48
// UT_array* enchantLanguages;
53
boolean presage_support;
57
char *custom_saved_lang;
63
CONFIG_BINDING_DECLARE(FcitxSpellConfig);
64
SpellHint *SpellHintListWithSize(int count, char **displays, int sized,
65
char **commits, int sizec);
66
SpellHint *SpellHintListWithPrefix(int count, const char *prefix,
68
char **commits, int sizec);
69
static inline SpellHint*
70
SpellHintList(int count, char **displays, char **commits)
72
return SpellHintListWithSize(count, displays, sizeof(char*),
73
commits, sizeof(char*));
75
int SpellCalListSizeWithSize(char **list, int count, int size);
77
SpellCalListSize(char **list, int count)
79
return SpellCalListSizeWithSize(list, count, sizeof(char*));
81
boolean SpellLangIsLang(const char *full_lang, const char *lang);