Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _ZERO_PINYIN_SERVICE_H_
#define _ZERO_PINYIN_SERVICE_H_
#include <glib.h>
#include <string.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct {
gint shengmu_i;
gint yunmu_i;
guint length;
} Pinyin;
typedef struct {
gchar str;
guint matched_py_length;
} Candidate;
/**
* an implementation of get_candidates() with simple test data.
*/
void get_candidates_test (const char* preedit_str,
GVariantBuilder *candidates_builder,
GVariantBuilder *matched_lengths_builder);
/**
* fetch candidates for preedit_str.
*
* @preedit_str
* @candidates_builder will add candidates to this builder
* @matched_lengths_builder will add matched preedit_str length to this builder
*/
void get_candidates (const char* preedit_str,
GVariantBuilder *candidates_builder,
GVariantBuilder *matched_lengths_builder);
#ifdef __cplusplus
}
#endif
#endif /* _ZERO_PINYIN_SERVICE_H_ */