File: mod_aux.h

package info (click to toggle)
libchewing 0.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,588 kB
  • ctags: 878
  • sloc: sh: 9,738; ansic: 7,644; makefile: 234; python: 49
file content (99 lines) | stat: -rw-r--r-- 2,915 bytes parent folder | download
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
 * mod_aux.c
 *
 * Copyright (c) 2005, 2008
 *	libchewing Core Team. See ChangeLog for details.
 *
 * See the file "COPYING" for information on usage and redistribution
 * of this file.
 */

#ifndef CHEWING_MOD_AUX_H
#define CHEWING_MOD_AUX_H

/*! \file mod_aux.h
 *  \brief Auxiliary module
 *  \author libchewing Core Team
 */

#include "global.h"

/**
 * @brief Chewing the state for input context during commit process
 * @param ctx handle to Chewing IM context
 * @retval TRUE if it currnet input state is at the "end-of-a-char"
 */
CHEWING_API int chewing_commit_Check( ChewingContext *ctx );

/**
 * @brief Get current commit string regardless of current input state
 * @param ctx handle to Chewing IM context
 *
 * Alwasy returns a char pointer, caller must free it.
 */
CHEWING_API char *chewing_commit_String( ChewingContext *ctx );


/*! \name Preedit string buffer
 */

/*@{*/
CHEWING_API char *chewing_buffer_String( ChewingContext *ctx );
CHEWING_API int chewing_buffer_Check( ChewingContext *ctx );
CHEWING_API int chewing_buffer_Len( ChewingContext *ctx );
/*@}*/


/*@{*/
/**
 * @param ctx handle to Chewing IM context
 * @param[out] zuin_count pointer to the integer of available Zuin preedit string
 *
 * Always returns a C-style string (char pointer), caller must free it.
 */
CHEWING_API char *chewing_zuin_String( ChewingContext *ctx, int *zuin_count );

CHEWING_API int chewing_zuin_Check( ChewingContext *ctx );
/*@}*/

CHEWING_API int chewing_cursor_Current( ChewingContext *ctx );

/*@{*/
CHEWING_API int chewing_cand_CheckDone( ChewingContext *ctx );
CHEWING_API int chewing_cand_TotalPage( ChewingContext *ctx );
CHEWING_API int chewing_cand_ChoicePerPage( ChewingContext *ctx );
CHEWING_API int chewing_cand_TotalChoice( ChewingContext *ctx );
CHEWING_API int chewing_cand_CurrentPage( ChewingContext *ctx );
CHEWING_API void chewing_cand_Enumerate( ChewingContext *ctx );
CHEWING_API int chewing_cand_hasNext( ChewingContext *ctx );
CHEWING_API char *chewing_cand_String( ChewingContext *ctx );
/*@}*/


/*@{*/
CHEWING_API void chewing_interval_Enumerate( ChewingContext *ctx );
CHEWING_API int chewing_interval_hasNext( ChewingContext *ctx );
CHEWING_API void chewing_interval_Get( ChewingContext *ctx, IntervalType *it );
/*@}*/

/*@}*/
CHEWING_API int chewing_aux_Check( ChewingContext *ctx );
CHEWING_API int chewing_aux_Length( ChewingContext *ctx );
CHEWING_API char *chewing_aux_String( ChewingContext *ctx );
/*@}*/


/*@}*/
CHEWING_API int chewing_keystroke_CheckIgnore( ChewingContext *ctx );
CHEWING_API int chewing_keystroke_CheckAbsorb( ChewingContext *ctx );
/*@}*/


/*@}*/
CHEWING_API int chewing_kbtype_Total( ChewingContext *ctx );
CHEWING_API void chewing_kbtype_Enumerate( ChewingContext *ctx );
CHEWING_API int chewing_kbtype_hasNext( ChewingContext *ctx );
CHEWING_API char *chewing_kbtype_String( ChewingContext *ctx );
/*@}*/

#endif /* CHEWING_MOD_AUX_H */