diff --git a/honoka/src/Makefile.am b/honoka/src/Makefile.am index 839b584..dc257e4 100644 --- a/honoka/src/Makefile.am +++ b/honoka/src/Makefile.am @@ -28,12 +28,12 @@ noinst_HEADERS = honoka_imengine.h wnnproto.h romkan.h romkan_table.h \ wnnconversion.h honoka_def.h kanainput.h anthyconversion.h multiconvertor.h skkdic.h \ - skkdicconversion.h honokamultiplepluginbase.h + skkdicconversion.h wnnplugin.h moduledir = @SCIM_MODULEDIR@/IMEngine module_LTLIBRARIES = honoka.la -honoka_la_SOURCES = honoka_imengine.cpp multiconvertor.cpp +honoka_la_SOURCES = honoka_imengine.cpp multiconvertor.cpp honoka_la_CFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ honoka_la_CXXFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ @@ -65,7 +65,7 @@ @SCIM_LIBS@ libhonokaincludedir = $(includedir)/honoka -libhonokainclude_HEADERS = convertor.h preeditor.h honokapluginbase.h honokakeyeventlist.h +libhonokainclude_HEADERS = convertor.h preeditor.h honokapluginbase.h honokakeyeventlist.h honokamultiplepluginbase.h lib_LTLIBRARIES = libhonoka_plugin.la libhonoka_plugin_la_SOURCES = convertor.cpp honokapluginbase.cpp preeditor.cpp \ @@ -92,7 +92,7 @@ plugin_anthy_la_LDFLAGS = -avoid-version -module -rpath $(plugindir) @LIBTOOL_EXPORT_OPTIONS@ @INTLLIBS@ @SCIM_LIBS@ @ANTHY_LIBS@ plugin_anthy_la_LIBADD = $(top_builddir)/src/libhonoka_plugin.la -plugin_wnn_la_SOURCES = wnnconversion.cpp +plugin_wnn_la_SOURCES = wnnconversion.cpp wnnplugin.cpp plugin_wnn_la_CFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ plugin_wnn_la_CXXFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ plugin_wnn_la_LDFLAGS = -avoid-version -module -rpath $(plugindir) @LIBTOOL_EXPORT_OPTIONS@ @INTLLIBS@ @SCIM_LIBS@ @WNN_LIBS@ diff --git a/honoka/src/wnnconversion.cpp b/honoka/src/wnnconversion.cpp index 16827d7..22a2098 100644 --- a/honoka/src/wnnconversion.cpp +++ b/honoka/src/wnnconversion.cpp @@ -39,7 +39,7 @@ #endif // �ץ饤�����󲽤Τ��ޤ��ʤ��Ǥ��� -HonokaPluginRegister(WnnConversion); +//HonokaPluginRegister(WnnConversion); WnnConversion::WnnConversion(ConfigPointer cfg) : Convertor(cfg) { diff --git a/honoka/src/wnnplugin.cpp b/honoka/src/wnnplugin.cpp new file mode 100644 index 0000000..d0a0dc2 --- /dev/null +++ b/honoka/src/wnnplugin.cpp @@ -0,0 +1,60 @@ +/*************************************************************************** + * Copyright (C) 2005 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. * + ***************************************************************************/ + +#include "wnnplugin.h" + +HonokaPluginRegister(WnnPlugin); + +WnnPlugin::WnnPlugin(ConfigPointer cfg) : HonokaMultiplePluginBase(cfg) +{ + convertor = new WnnConversion(cfg); +} + + +WnnPlugin::~WnnPlugin() +{ +} + +/*! + \fn WnnPlugin::getPluginInstanceAt(int p) + */ +HonokaPluginBase * WnnPlugin::getPluginInstanceAt(int p) +{ + if (p != 0) return 0; + return convertor; +} + + +/*! + \fn WnnPlugin::getPluginCount() + */ +int WnnPlugin::getPluginCount() +{ + return 1; +} + +/*! + \fn WnnPlugin::getName() + */ +String WnnPlugin::getName() +{ + return String("WnnPlugin"); +} + diff --git a/honoka/src/wnnplugin.h b/honoka/src/wnnplugin.h new file mode 100644 index 0000000..edc9bd5 --- /dev/null +++ b/honoka/src/wnnplugin.h @@ -0,0 +1,53 @@ +/*************************************************************************** + * Copyright (C) 2005 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 WNNPLUGIN_H +#define WNNPLUGIN_H + +#include +#include +#include +#include +#include + +#include +#include + +using namespace std; +using namespace scim; + + +/** +@author TAM (Teppei Tamra) +*/ +class WnnPlugin : public HonokaMultiplePluginBase { +public: + WnnPlugin(ConfigPointer cfg); + + ~WnnPlugin(); + virtual HonokaPluginBase * getPluginInstanceAt(int p); + virtual int getPluginCount(); + virtual String getName(); + +protected: + WnnConversion * convertor; +}; + +#endif