diff --git a/honoka/libhonoka/honokapluginbase.h b/honoka/libhonoka/honokapluginbase.h index e60d697..6c2f56b 100644 --- a/honoka/libhonoka/honokapluginbase.h +++ b/honoka/libhonoka/honokapluginbase.h @@ -47,9 +47,9 @@ int getHonokaPluginVersion() { return(HONOKA_PLUGIN_VERSION); } \ } -#define HonokaPluginSetup(data) \ +#define HonokaPluginSetup(pName) \ extern "C" { \ - HonokaSetupCorePage *HonokaPluginSetup() { data }; \ + HonokaSetupCorePage *HonokaPluginSetup() { return pName::setup(); }; \ } #ifndef HonokaSetup #define HonokaSetupItem HonokaSetupCoreItem diff --git a/honoka/plugins/anthyplugin.cpp b/honoka/plugins/anthyplugin.cpp index 84d0c95..a3906fd 100644 --- a/honoka/plugins/anthyplugin.cpp +++ b/honoka/plugins/anthyplugin.cpp @@ -38,7 +38,11 @@ #endif HonokaPluginRegister(AnthyPlugin); -HonokaPluginSetup( +HonokaPluginSetup(AnthyPlugin); + +HonokaSetupCorePage *AnthyPlugin::setup() +{ + HonokaSetupPage *page = new HonokaSetupPage(_("Anthy-plugin"),"",""); page->append(new HonokaSetupBoolItem( @@ -48,7 +52,7 @@ true )); return page; -); +}; AnthyPlugin::AnthyPlugin(ConfigPointer cfg) : HonokaMultiplePluginBase(cfg) { diff --git a/honoka/plugins/anthyplugin.h b/honoka/plugins/anthyplugin.h index 6ea527f..9720742 100644 --- a/honoka/plugins/anthyplugin.h +++ b/honoka/plugins/anthyplugin.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -52,6 +53,7 @@ virtual HonokaPluginBase * getPluginInstanceAt(int p); virtual int getPluginCount(); virtual String getName(); + static HonokaSetupCorePage *setup(); protected: AnthyConversion * convertor; diff --git a/honoka/plugins/cannaconversion.cpp b/honoka/plugins/cannaconversion.cpp index d864c7c..4dd39c3 100644 --- a/honoka/plugins/cannaconversion.cpp +++ b/honoka/plugins/cannaconversion.cpp @@ -38,7 +38,10 @@ // �ץ饤�����󲽤Τ��ޤ��ʤ��Ǥ��� HonokaPluginRegister(CannaConversion); -HonokaPluginSetup( +HonokaPluginSetup(CannaConversion); + +HonokaSetupCorePage *CannaConversion::setup() +{ HonokaSetupPage *page = new HonokaSetupPage(_("Canna-plugin"),"",""); page->append(new HonokaSetupBoolItem( @@ -60,7 +63,7 @@ HONOKA_DEFAULT_CANNA_DICHOMEDIRPATH )); return page; -); +}; CannaConversion::CannaConversion(ConfigPointer cfg) : Convertor(cfg) { diff --git a/honoka/plugins/cannaconversion.h b/honoka/plugins/cannaconversion.h index 88c91e1..23bad89 100644 --- a/honoka/plugins/cannaconversion.h +++ b/honoka/plugins/cannaconversion.h @@ -31,6 +31,7 @@ #include #include #include +#include using namespace std; using namespace scim; @@ -60,6 +61,7 @@ virtual String getName(); virtual String getPropertyName(); virtual const vector getSegmentList(); + static HonokaSetupCorePage *setup(); protected: void buildResult(); diff --git a/honoka/plugins/kanainput.cpp b/honoka/plugins/kanainput.cpp index edd8ff5..e06af16 100644 --- a/honoka/plugins/kanainput.cpp +++ b/honoka/plugins/kanainput.cpp @@ -39,7 +39,10 @@ // �ץ饤�����󲽤Τ��ޤ��ʤ��Ǥ��� HonokaPluginRegister(KanaInput); -HonokaPluginSetup( +HonokaPluginSetup(KanaInput); + +HonokaSetupCorePage *KanaInput::setup() +{ HonokaSetupPage *page = new HonokaSetupPage(_("KanaInput-plugin"),"",""); page->append(new HonokaSetupBoolItem( @@ -56,7 +59,7 @@ )); return page; -); +}; namespace Honoka { diff --git a/honoka/plugins/kanainput.h b/honoka/plugins/kanainput.h index 6697b71..06b0b16 100644 --- a/honoka/plugins/kanainput.h +++ b/honoka/plugins/kanainput.h @@ -27,6 +27,7 @@ #include #include #include "preeditor.h" +#include using namespace std; using namespace scim; @@ -45,6 +46,7 @@ virtual String getName(); virtual String getModeName(); virtual String getPropertyName(); + static HonokaSetupCorePage *setup(); protected: bool fakeKanaInput; diff --git a/honoka/plugins/nicolainput.cpp b/honoka/plugins/nicolainput.cpp index bc96150..6c51be3 100644 --- a/honoka/plugins/nicolainput.cpp +++ b/honoka/plugins/nicolainput.cpp @@ -39,7 +39,10 @@ // �ץ饤�����󲽤Τ��ޤ��ʤ��Ǥ��� HonokaPluginRegister(NicolaInput); -HonokaPluginSetup( +HonokaPluginSetup(NicolaInput); + +HonokaSetupCorePage *NicolaInput::setup() +{ HonokaSetupPage *page = new HonokaSetupPage(_("Nicola-plugin"),"",""); page->append(new HonokaSetupBoolItem( @@ -62,7 +65,7 @@ )); return page; -); +}; namespace Honoka { struct { diff --git a/honoka/plugins/nicolainput.h b/honoka/plugins/nicolainput.h index fca6320..cdc5fb1 100644 --- a/honoka/plugins/nicolainput.h +++ b/honoka/plugins/nicolainput.h @@ -27,6 +27,7 @@ #include #include #include "preeditor.h" +#include using namespace std; using namespace scim; @@ -53,6 +54,7 @@ virtual String getModeName(); virtual String getPropertyName(); virtual bool keyEventHook(const KeyEvent &key); + static HonokaSetupCorePage *setup(); protected: bool LShift; diff --git a/honoka/plugins/primeprediction.cpp b/honoka/plugins/primeprediction.cpp index 7853e05..0919f82 100644 --- a/honoka/plugins/primeprediction.cpp +++ b/honoka/plugins/primeprediction.cpp @@ -44,7 +44,10 @@ // �ץ饤�����󲽤Τ��ޤ��ʤ��Ǥ��� HonokaPluginRegister(PrimePrediction); -HonokaPluginSetup( +HonokaPluginSetup(PrimePrediction); + +HonokaSetupCorePage *PrimePrediction::setup() +{ vector l; HonokaSetupPage *page = new HonokaSetupPage(_("PrimePrediction-plugin"),"",""); @@ -74,7 +77,8 @@ l )); return page; -); +}; + PrimePrediction::PrimePrediction(ConfigPointer cfg) : Predictor(cfg) { diff --git a/honoka/plugins/primeprediction.h b/honoka/plugins/primeprediction.h index a8e1a4f..cfca41c 100644 --- a/honoka/plugins/primeprediction.h +++ b/honoka/plugins/primeprediction.h @@ -27,6 +27,7 @@ #include +#include #include #include @@ -56,6 +57,7 @@ virtual String getPropertyName(); virtual String getName(); virtual void update(const WideString str,const WideString yomi); + static HonokaSetupCorePage *setup(); protected: String lookup_method; diff --git a/honoka/plugins/romkan.cpp b/honoka/plugins/romkan.cpp index 8d646e8..8941673 100644 --- a/honoka/plugins/romkan.cpp +++ b/honoka/plugins/romkan.cpp @@ -39,7 +39,10 @@ // �ץ饤�����󲽤Τ��ޤ��ʤ��Ǥ��� HonokaPluginRegister(RomkanPlugin); -HonokaPluginSetup( +HonokaPluginSetup(RomkanPlugin); + +HonokaSetupCorePage *RomkanPlugin::setup() +{ HonokaSetupPage *page = new HonokaSetupPage(_("Romkan-plugin"),"",""); page->append(new HonokaSetupBoolItem( @@ -56,7 +59,7 @@ )); return page; -); +}; RomkanPlugin::RomkanPlugin(ConfigPointer cfg) : HonokaMultiplePluginBase(cfg) { diff --git a/honoka/plugins/romkan.h b/honoka/plugins/romkan.h index 5e1e8a7..2ccacf6 100644 --- a/honoka/plugins/romkan.h +++ b/honoka/plugins/romkan.h @@ -30,6 +30,7 @@ #include #include #include +#include using namespace std; using namespace scim; @@ -58,6 +59,7 @@ virtual HonokaPluginBase * getPluginInstanceAt(int p); virtual int getPluginCount(); virtual String getName(); + static HonokaSetupCorePage *setup(); protected: vector romkans; diff --git a/honoka/plugins/simpleprediction.cpp b/honoka/plugins/simpleprediction.cpp index bd4f7f6..fb62f1d 100644 --- a/honoka/plugins/simpleprediction.cpp +++ b/honoka/plugins/simpleprediction.cpp @@ -39,7 +39,10 @@ // �ץ饤�����󲽤Τ��ޤ��ʤ��Ǥ��� HonokaPluginRegister(SimplePrediction); -HonokaPluginSetup( +HonokaPluginSetup(SimplePrediction); + +HonokaSetupCorePage *SimplePrediction::setup() +{ HonokaSetupPage *page = new HonokaSetupPage(_("SimplePrediction-plugin"),"",""); page->append(new HonokaSetupBoolItem( @@ -56,7 +59,7 @@ 1,500 )); return page; -); +}; SimplePrediction::SimplePrediction(ConfigPointer cfg) : Predictor(cfg) { diff --git a/honoka/plugins/simpleprediction.h b/honoka/plugins/simpleprediction.h index 0819356..bb77434 100644 --- a/honoka/plugins/simpleprediction.h +++ b/honoka/plugins/simpleprediction.h @@ -25,6 +25,7 @@ #define Uses_SCIM_CONFIG_BASE #include +#include #include #include @@ -51,6 +52,7 @@ virtual String getPropertyName(); virtual String getName(); virtual void update(const WideString str,const WideString yomi); + static HonokaSetupCorePage *setup(); protected: multimap data; diff --git a/honoka/plugins/skkdicconversion.cpp b/honoka/plugins/skkdicconversion.cpp index e55e30c..3323a6b 100644 --- a/honoka/plugins/skkdicconversion.cpp +++ b/honoka/plugins/skkdicconversion.cpp @@ -40,7 +40,10 @@ // �ץ饤�����󲽤Τ��ޤ��ʤ��Ǥ��� HonokaPluginRegister(SKKDicConversion); -HonokaPluginSetup( +HonokaPluginSetup(SKKDicConversion); + +HonokaSetupCorePage *SKKDicConversion::setup() +{ HonokaSetupPage *page = new HonokaSetupPage(_("SKKDic-plugin"),"",""); page->append(new HonokaSetupBoolItem( @@ -56,7 +59,7 @@ HONOKA_DEFAULT_SKKDIC_DICFILE )); return page; -); +}; SKKDicConversion::SKKDicConversion(ConfigPointer cfg) : Convertor(cfg) { diff --git a/honoka/plugins/skkdicconversion.h b/honoka/plugins/skkdicconversion.h index cc7ef2d..a0c8bf2 100644 --- a/honoka/plugins/skkdicconversion.h +++ b/honoka/plugins/skkdicconversion.h @@ -30,6 +30,7 @@ #include #include #include +#include #include using namespace std; @@ -59,6 +60,7 @@ virtual String getName(); virtual String getPropertyName(); virtual const vector getSegmentList(); + static HonokaSetupCorePage *setup(); protected: SKKDic *dic; diff --git a/honoka/plugins/wnnplugin.cpp b/honoka/plugins/wnnplugin.cpp index e0735d0..a0cb0bb 100644 --- a/honoka/plugins/wnnplugin.cpp +++ b/honoka/plugins/wnnplugin.cpp @@ -39,7 +39,10 @@ HonokaPluginRegister(WnnPlugin); -HonokaPluginSetup( +HonokaPluginSetup(WnnPlugin); + +HonokaSetupCorePage *WnnPlugin::setup() +{ HonokaSetupPage *page = new HonokaSetupPage(_("Wnn-plugin"),"",""); vector l; page->append(new HonokaSetupBoolItem( @@ -80,7 +83,7 @@ HONOKA_DEFAULT_WNNYOSOKU )); return page; -); +}; WnnPlugin::WnnPlugin(ConfigPointer cfg) : HonokaMultiplePluginBase(cfg) { diff --git a/honoka/plugins/wnnplugin.h b/honoka/plugins/wnnplugin.h index 3d6e393..1948d36 100644 --- a/honoka/plugins/wnnplugin.h +++ b/honoka/plugins/wnnplugin.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -52,6 +53,7 @@ virtual HonokaPluginBase * getPluginInstanceAt(int p); virtual int getPluginCount(); virtual String getName(); + static HonokaSetupCorePage *setup(); protected: WnnConversion * convertor;