Skip to content
parse-pinyin.h 643 B
Newer Older
#ifndef _PARSE_PINYIN_H_
#define _PARSE_PINYIN_H_

#include <glib.h>
#include "zero-pinyin-service.h"
#include "../Const.h"
G_BEGIN_DECLS

#define PINYIN_FLAGS_NONE 0

/**
 * parse preedit_str to groups of pinyin.
 *
 * @preedit_str: the preedit str
 * @max_pinyin: parse at most this many pinyin from preedit str.
 * @flags: support incomplete pinyin, fuzzy pinyin, correction, see ../Const.h
 *
 * Returns: a list of Pinyin struct. caller should free each Pinyin and the
 * GList after use.
GList *parse_pinyin(const char *preedit_str,
		    const guint max_pinyin,
		    const guint flags);

#endif /* _PARSE_PINYIN_H_ */