1
// vi:ts=4:shiftwidth=4:expandtab
4
* UNICON - The Console Chinese & I18N
5
* Copyright (c) 1999-2000
7
* This file is part of UNICON, a console Chinese & I18N
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23
* See the file COPYING directory of this archive
27
/*****************************************************************************
29
* ImmModule.h ==== Defination of Method Modules Interface
31
***************************************************************************/
32
#ifndef __IMMMODULE_H__
33
#define __IMMMODULE_H__
39
typedef struct __IMM_CLIENT__
41
/* ClientData for recording states */
44
/* Buffer for the PhraseItem */
55
u_long type; /* eg. IMM_BIG5 << 24 | IMM_CCE */
57
/* File I/O Operation */
58
IMM_CLIENT *(*open) (char *szFileName, long type);
59
int (*save) (IMM_CLIENT *p, char *szFileName);
60
int (*close) (IMM_CLIENT *p);
62
/* Indepent Modules support */
63
int (*KeyFilter) (IMM_CLIENT *p, u_char key, char *buf, int *len);
64
int (*ResetInput) (IMM_CLIENT *p);
66
/* Input Area Configuration & Operation */
67
int (*ConfigInputArea) (IMM_CLIENT *pImm, int SelectionLen);
68
int (*GetInputDisplay) (IMM_CLIENT *pImm, char *buf, long buflen);
69
int (*GetSelectDisplay) (IMM_CLIENT *pImm, char *buf, long buflen);
71
/* Phrase Operation */
72
PhraseItem * (*pGetItem) (IMM_CLIENT *p, u_long n);
73
int (*AddPhrase) (IMM_CLIENT *pClient, PhraseItem *p);
74
int (*ModifyPhraseItem) (IMM_CLIENT *p, long n, PhraseItem *pItem);
75
int (*Flush) (IMM_CLIENT *p);