Diffstat (limited to 'noncore/apps/opie-reader/Navigation.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Navigation.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/Navigation.h b/noncore/apps/opie-reader/Navigation.h new file mode 100644 index 0000000..57fb006 --- a/dev/null +++ b/noncore/apps/opie-reader/Navigation.h @@ -0,0 +1,16 @@ +#include <stdlib.h> + +const size_t NAVIGATION_HISTORY_SIZE = 32; + +class CNavigation +{ + size_t history[NAVIGATION_HISTORY_SIZE]; + size_t historystart, historyend, historycurrent; + public: + CNavigation() : historystart(0),historyend(0),historycurrent(0) {} + void saveposn(size_t posn); + bool forward(size_t& loc); + bool back(size_t& loc); + void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen); + void putSaveData(unsigned char*& src, unsigned short& srclen); +}; |