Diffstat (limited to 'noncore/graphics/opie-eye/iface/dirview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/iface/dirview.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/iface/dirview.h b/noncore/graphics/opie-eye/iface/dirview.h new file mode 100644 index 0000000..20d9062 --- a/dev/null +++ b/noncore/graphics/opie-eye/iface/dirview.h @@ -0,0 +1,40 @@ +/* + * GPLv2 zecke@handhelds.org + * No WArranty... + */ + +#ifndef PHUNK_DIR_VIEW_H +#define PHUNK_DIR_VIEW_H + +#include <qmap.h> + +#include <qpe/config.h> + +class PInterfaceInfo; +class PDirLister; + +struct PDirView { + PDirView( const Config& ); + virtual ~PDirView(); + virtual PInterfaceInfo* interfaceInfo()const = 0; + virtual PDirLister* dirLister()const = 0; +}; + +typedef PDirView* (*phunkViewCreateFunc )(const Config& ); +typedef QMap<QString,phunkViewCreateFunc> ViewMap; + +ViewMap* viewMap(); +PDirView* currentView(); +void setCurrentView( PDirView* ); + + + +#define PHUNK_VIEW_INTERFACE( NAME, IMPL ) \ + static PDirView *create_ ## IMPL( const Config& cfg ) { \ + return new IMPL( cfg ); \ + } \ + static ViewMap::Iterator dummy_ ## IMPL = viewMap()->insert( NAME, create_ ## IMPL ); + + + +#endif |