diff --git a/honoka/src/Makefile.am b/honoka/src/Makefile.am index d968c16..ac13818 100644 --- a/honoka/src/Makefile.am +++ b/honoka/src/Makefile.am @@ -26,13 +26,15 @@ -DHONOKA_ICON_FILE=\"@SCIM_ICONDIR@/honoka.png\" noinst_HEADERS = honoka_imengine.h wnnproto.h romkan.h romkan_table.h \ - wnnconversion.h honoka_def.h preeditor.h kanainput.h convertor.h anthyconversion.h + wnnconversion.h honoka_def.h preeditor.h kanainput.h convertor.h anthyconversion.h \ + honokapluginbase.h moduledir = @SCIM_MODULEDIR@/IMEngine module_LTLIBRARIES = honoka.la -honoka_la_SOURCES = honoka_imengine.cpp romkan.cpp wnnconversion.cpp \ - preeditor.cpp kanainput.cpp convertor.cpp anthyconversion.cpp +honoka_la_SOURCES = honoka_imengine.cpp romkan.cpp wnnconversion.cpp convertor.cpp preeditor.cpp \ + kanainput.cpp anthyconversion.cpp \ + honokapluginbase.cpp honoka_la_CFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ honoka_la_CXXFLAGS = @SCIM_CFLAGS@ @SCIM_DEBUG_FLAGS@ @@ -40,6 +42,7 @@ honoka_la_LDFLAGS = -avoid-version -module -rpath $(moduledir) \ @LIBTOOL_EXPORT_OPTIONS@ @INTLLIBS@ @SCIM_LIBS@ + if SCIM_BUILD_SETUP SETUP_MODULE = honoka-imengine-setup.la endif @@ -60,4 +63,5 @@ @SCIM_GTKUTILS_LIBS@ \ @INTLLIBS@ \ @SCIM_LIBS@ -honoka_la_LIBADD = + + diff --git a/honoka/src/convertor.cpp b/honoka/src/convertor.cpp index 965d0b9..c909b7f 100644 --- a/honoka/src/convertor.cpp +++ b/honoka/src/convertor.cpp @@ -21,7 +21,7 @@ /* �������ߡ��᥽�åɤ������� */ -Convertor::Convertor(ConfigPointer cfg) +Convertor::Convertor(ConfigPointer cfg) : HonokaPluginBase(String("Convertor")) { config = cfg; } diff --git a/honoka/src/convertor.h b/honoka/src/convertor.h index 48af48c..64d535c 100644 --- a/honoka/src/convertor.h +++ b/honoka/src/convertor.h @@ -22,6 +22,8 @@ #define Uses_SCIM_CONFIG_BASE +#include + #include #include #include @@ -29,6 +31,7 @@ #include #include + using namespace std; using namespace scim; @@ -44,7 +47,7 @@ vector kouho; }; -class Convertor{ +class Convertor : public HonokaPluginBase { public: Convertor(ConfigPointer cfg); diff --git a/honoka/src/honokapluginbase.cpp b/honoka/src/honokapluginbase.cpp new file mode 100644 index 0000000..1049ec4 --- /dev/null +++ b/honoka/src/honokapluginbase.cpp @@ -0,0 +1,33 @@ +/*************************************************************************** + * 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. * + ***************************************************************************/ + +#include "honokapluginbase.h" + +HonokaPluginBase::HonokaPluginBase(const String pluginType) +{ + type = pluginType; +} + + +HonokaPluginBase::~HonokaPluginBase() +{ +} + + diff --git a/honoka/src/honokapluginbase.h b/honoka/src/honokapluginbase.h new file mode 100644 index 0000000..0cb25fc --- /dev/null +++ b/honoka/src/honokapluginbase.h @@ -0,0 +1,47 @@ +/*************************************************************************** + * 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 HONOKAPLUGINBASE_H +#define HONOKAPLUGINBASE_H + +#include +#include +#include +#include + +using namespace std; +using namespace scim; + +/** +@author TAM (Teppei Tamra) +*/ +class HonokaPluginBase{ +protected: + HonokaPluginBase(const String pluginType); + + ~HonokaPluginBase(); +public: + String getPluginType(); + +private: + String type; +}; + +#endif diff --git a/honoka/src/preeditor.cpp b/honoka/src/preeditor.cpp index 39f65f4..bf6b24f 100644 --- a/honoka/src/preeditor.cpp +++ b/honoka/src/preeditor.cpp @@ -45,7 +45,7 @@ return(false); } -PreEditor::PreEditor(ConfigPointer cfg) +PreEditor::PreEditor(ConfigPointer cfg) : HonokaPluginBase(String("PreEditor")) { iconvert.set_encoding ("EUC-JP"); config = cfg; diff --git a/honoka/src/preeditor.h b/honoka/src/preeditor.h index 3762877..c06d4f5 100644 --- a/honoka/src/preeditor.h +++ b/honoka/src/preeditor.h @@ -20,6 +20,8 @@ #ifndef PREEDITOR_H #define PREEDITOR_H +#include + #define Uses_SCIM_ICONV #define Uses_SCIM_CONFIG_BASE #include @@ -60,7 +62,7 @@ bool comp(const KeyEvent &k); }; -class PreEditor{ +class PreEditor : public HonokaPluginBase { public: PreEditor(ConfigPointer cfg);