2
Copyright (c) 2008 uim Project http://uim.freedesktop.org/
6
Redistribution and use in source and binary forms, with or without
7
modification, are permitted provided that the following conditions
10
1. Redistributions of source code must retain the above copyright
11
notice, this list of conditions and the following disclaimer.
12
2. Redistributions in binary form must reproduce the above copyright
13
notice, this list of conditions and the following disclaimer in the
14
documentation and/or other materials provided with the distribution.
15
3. Neither the name of authors nor the names of its contributors
16
may be used to endorse or promote products derived from this software
17
without specific prior written permission.
19
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
20
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
23
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32
/* $Id: wnnlib.h,v 10.8 1999/05/25 06:21:10 ishisone Exp $ */
35
* wnnlib.h -- wnnlib $BMQ%X%C%@%U%!%$%k(B (Wnn Version4/6 $BBP1~HG(B)
41
* Copyright (c) 1989 Software Research Associates, Inc.
42
* Copyright (c) 1998 MORIBE, Hideyuki
44
* Permission to use, copy, modify, and distribute this software and its
45
* documentation for any purpose and without fee is hereby granted, provided
46
* that the above copyright notice appear in all copies and that both that
47
* copyright notice and this permission notice appear in supporting
48
* documentation, and that the name of Software Research Associates not be
49
* used in advertising or publicity pertaining to distribution of the
50
* software without specific, written prior permission. Software Research
51
* Associates makes no representations about the suitability of this software
52
* for any purpose. It is provided "as is" without express or implied
55
* Author: Makoto Ishisone, Software Research Associates, Inc., Japan
74
typedef unsigned short wchar;
88
#define JE_WNNERROR 1 /* jllib $B$N%(%i!<(B */
89
#define JE_NOCORE 2 /* $B%a%b%j$,3NJ]$G$-$J$$(B */
90
#define JE_NOTCONVERTED 3 /* $BBP>]J8@a$,$^$@JQ49$5$l$F$$$J$$(B */
91
#define JE_CANTDELETE 4 /* $B%P%C%U%!$N@hF,$NA0!"$"$k$$$O(B
92
* $B:G8e$N<!$NJ8;z$r:o=|$7$h$&$H$7$?(B */
93
#define JE_NOSUCHCLAUSE 5 /* $B;XDj$5$l$?HV9f$NJ8@a$,B8:_$7$J$$(B */
94
#define JE_CANTSHRINK 6 /* 1 $BJ8;z$NJ8@a$r=L$a$h$&$H$7$?(B */
95
#define JE_CANTEXPAND 7 /* $B:G8e$NJ8@a$r?-$P$=$&$H$7$?(B */
96
#define JE_NOCANDIDATE 8 /* $B<!8uJd$,$J$$(B */
97
#define JE_NOSUCHCANDIDATE 9 /* $B;XDj$5$l$?HV9f$N8uJd$,B8:_$7$J$$(B */
98
#define JE_CANTMOVE 10 /* $B%P%C%U%!$N@hF,$NA0!"$"$k$$$O(B
99
* $B:G8e$N<!$K0\F0$7$h$&$H$7$?(B */
100
#define JE_CLAUSEEMPTY 11 /* $B6u$NJ8$rJQ49$7$h$&$H$7$?(B */
101
#define JE_ALREADYFIXED 12 /* $B$9$G$K3NDj$5$l$F$$$kJ8$KBP$7$F(B
102
* $BA`:n$r9T$J$C$?(B */
105
extern int jcErrno; /* $B%(%i!<HV9f(B */
107
/* $B%G!<%?%?%$%W(B */
109
/* $B3F>.J8@a$N>pJs(B */
111
wchar *kanap; /* $BFI$_J8;zNs(B */
112
wchar *dispp; /* $BI=<(J8;zNs(B */
113
char conv; /* $BJQ49:Q$_$+(B */
114
/* 0: $BL$JQ49(B 1: $BJQ49:Q(B -1: $B$G5?;wJQ49(B */
115
char ltop; /* $BBgJ8@a$N@hF,$+(B? */
122
int nClause; /* $BJ8@a?t(B */
123
int curClause; /* $B%+%l%s%HJ8@aHV9f(B */
124
int curLCStart; /* $B%+%l%s%HBgJ8@a3+;OJ8@aHV9f(B */
125
int curLCEnd; /* $B%+%l%s%HBgJ8@a=*N;J8@aHV9f(B */
126
wchar *kanaBuf; /* $B$+$J%P%C%U%!(B */
128
wchar *displayBuf; /* $B%G%#%9%W%l%$%P%C%U%!(B */
130
jcClause *clauseInfo; /* $BJ8@a>pJs(B */
133
int fixed; /* $B3NDj$5$l$?$+$I$&$+(B */
134
wchar *dot; /* $B%I%C%H$N0LCV(B */
135
int candKind; /* $BBgJ8@a$NA48uJd$+>.J8@a$N8uJd$+$r(B
137
int candClause; /* $BA48uJd$r$H$C$F$$$kJ8@aHV9f(B */
138
int candClauseEnd; /* $BBgJ8@a$NA48uJd$N;~!"=*N;J8@aHV9f(B */
139
int bufferSize; /* kanaBuf/displayBuf $B$NBg$-$5(B */
140
int clauseSize; /* clauseInfo $B$NBg$-$5(B */
143
struct wnn_buf *jcOpen(char *, char *, int, char *, void (*)(), int (*)(), int);
144
struct wnn_buf *jcOpen2(char *, char *, int, char *, char *, void (*)(), int (*)(), int);
145
void jcClose(struct wnn_buf *);
146
int jcIsConnect(struct wnn_buf *);
147
jcConvBuf *jcCreateBuffer(struct wnn_buf *, int, int);
148
int jcDestroyBuffer(jcConvBuf *, int);
149
int jcClear(jcConvBuf *);
150
int jcInsertChar(jcConvBuf *, int);
151
int jcDeleteChar(jcConvBuf *, int);
152
int jcKillLine(jcConvBuf *);
153
int jcConvert(jcConvBuf *, int, int, int);
154
int jcUnconvert(jcConvBuf *);
155
int jcCancel(jcConvBuf *);
156
int jcExpand(jcConvBuf *, int, int);
157
int jcShrink(jcConvBuf *, int, int);
158
int jcKana(jcConvBuf *, int, int);
159
int jcFix(jcConvBuf *);
160
int jcFix1(jcConvBuf *);
161
int jcNext(jcConvBuf *, int, int);
162
int jcCandidateInfo(jcConvBuf *, int, int *, int *);
163
int jcGetCandidate(jcConvBuf *, int, wchar *, int);
164
int jcSelect(jcConvBuf *, int);
165
int jcDotOffset(jcConvBuf *);
166
int jcIsConverted(jcConvBuf *, int);
167
int jcMove(jcConvBuf *, int, int);
168
int jcTop(jcConvBuf *);
169
int jcBottom(jcConvBuf *);
170
int jcChangeClause(jcConvBuf *, wchar *);
171
int jcSaveDic(jcConvBuf *);
173
#endif /* _wnnlib_h */