Newer
Older
scim-wnn / scim-wnn / src / wnnproto.h
@tamra tamra on 20 Nov 2004 2 KB 変換の仮実装。
/***************************************************************************
 *   Copyright (C) 2004 by TAM(Teppei Tamra)                               *
 *   tam-t@par.odn.ne.jp                                                   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

/* う ぜ ぇ */
#ifndef WNNPROTO_H
#define WNNPROTO_H

extern "C" {

    /* 基礎的なん */
    #define w_char unsigned short
    struct wnn_buf *jl_open_lang(char *,char *,char *,char *,int (*)(char *),int(*)(char *),int);
    int jl_isconnect(struct wnn_buf*);

    /* 変換に関するそれ */
    int jl_ren_conv(struct wnn_buf*,w_char*,int,int,int); /*jl_fi_ren_convとかもあったなぁ */
    int wnn_get_area(struct wnn_buf*,int,int,w_char*,int);
    int jl_zenkouho_dai(struct wnn_buf*,int,int,int,int);
    int jl_zenkouho_suu(struct wnn_buf*);
    void jl_get_zenkouho_kanji(struct wnn_buf*,int ,w_char *);

    #define WNN_NO_USE    0
    #define WNN_USE_MAE   1
    #define WNN_USE_ATO   2
    #define WNN_USE_ZENGO (WNN_USE_MAE | WNN_USE_ATO)

    #define WNN_UNIQ_KNJ 2
    #define WNN_UNIQ 1
    #define WNN_NO_UNIQ  0

    #define WNN_NO_CREATE 0
    #define WNN_CREATE (-1)

    #define jl_get_kanji(buf,bun1,bun2,area) wnn_get_area(buf,bun1,bun2,area,1)
    #define jl_get_yomi(buf,bun1,bun2,area) wnn_get_area(buf,bun1,bun2,area,0)

}

#endif