diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-12-19 02:12:57 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-12-19 02:12:57 +0000 |
| commit | ed40f6f85c9c07c3c1224ae20601082c0309a631 (patch) | |
| tree | 4082515a3e85107bd4a278b6613857b58da1770f /lib/actions | |
| parent | b3658b04216ed3974047b4c4ec885ee0161d9267 (diff) | |
| download | enigma2-ed40f6f85c9c07c3c1224ae20601082c0309a631.tar.gz enigma2-ed40f6f85c9c07c3c1224ae20601082c0309a631.zip | |
some python import cleanups
lesser swig overhead
Diffstat (limited to 'lib/actions')
| -rw-r--r-- | lib/actions/action.cpp | 14 | ||||
| -rw-r--r-- | lib/actions/action.h | 11 |
2 files changed, 17 insertions, 8 deletions
diff --git a/lib/actions/action.cpp b/lib/actions/action.cpp index 56ad89a1..c1d2c191 100644 --- a/lib/actions/action.cpp +++ b/lib/actions/action.cpp @@ -41,13 +41,6 @@ RESULT eActionMap::getInstance(ePtr<eActionMap> &ptr) return 0; } -#if 0 -void eActionMap::getInstance(eActionMap **ptr) -{ - *ptr = instance; -} -#endif - void eActionMap::bindAction(const std::string &context, int priority, int id, eWidget *widget) { eActionBinding bnd; @@ -221,4 +214,11 @@ void eActionMap::keyPressed(const std::string &device, int key, int flags) } } +ePtr<eActionMap> NewActionMapPtr(void) +{ + ePtr<eActionMap> ptr; + eActionMap::getInstance(ptr); + return ptr; +} + eAutoInitPtr<eActionMap> init_eActionMap(eAutoInitNumbers::actions, "eActionMap"); diff --git a/lib/actions/action.h b/lib/actions/action.h index f2e0d8f4..7bd71259 100644 --- a/lib/actions/action.h +++ b/lib/actions/action.h @@ -13,6 +13,7 @@ class eWidget; +SWIG_IGNORE(eActionMap); class eActionMap: public iObject { DECLARE_REF(eActionMap); @@ -35,8 +36,8 @@ public: void keyPressed(const std::string &device, int key, int flags); - static RESULT getInstance(ePtr<eActionMap> &ptr); #ifndef SWIG + static RESULT getInstance(ePtr<eActionMap> &); private: static eActionMap *instance; struct eActionBinding @@ -78,5 +79,13 @@ private: std::multimap<std::string, ePythonKeyBinding> m_python_keys; #endif }; +SWIG_TEMPLATE_TYPEDEF_REPLACE(ePtr<eActionMap>, eActionMap); +SWIG_EXTEND(ePtr<eActionMap>, + static ePtr<eActionMap> getInstance() + { + extern ePtr<eActionMap> NewActionMapPtr(void); + return NewActionMapPtr(); + } +); #endif |
