diff --git a/src/app/ScreenManager.cpp b/src/app/ScreenManager.cpp index 93836a4..ddb30a8 100644 --- a/src/app/ScreenManager.cpp +++ b/src/app/ScreenManager.cpp @@ -196,7 +196,7 @@ void ScreenManager::iterateThroughList() } } -ViewLink* ScreenManager::getLinkByUID(ViewLinkedList viewLinkedList, const unsigned char UID) +ScreenManager::ViewLink* ScreenManager::getLinkByUID(ViewLinkedList viewLinkedList, const unsigned char UID) { if(isListEmpty(viewLinkedList)) return NULL; diff --git a/src/app/ScreenManager.h b/src/app/ScreenManager.h index 9b6a400..2513600 100644 --- a/src/app/ScreenManager.h +++ b/src/app/ScreenManager.h @@ -2,7 +2,6 @@ #define SCREENMANAGER_H #include -#include "definition.h" #include "SDCardManager.h" #include "CFGFileParser.h" #include "CFGDictionary.h" @@ -13,6 +12,14 @@ class ScreenManager friend class SAB; public: enum Error {OK, MALLOC_FAILED, VIEW_NOT_FOUND, VIEW_FUNC_UNDEFINED, VIEW_FAILED_TO_EXECUTE, CURRENT_VIEW_UNDEFINED}; + //Data structure for the view handling + typedef struct viewLink + { + boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*); + void *pData; + const int UID; + struct viewLink *next, *previous; + } ViewLink, *ViewLinkedList; boolean addView(boolean (*viewLogicFunction)(Adafruit_SSD1306&, void*), void *pData, const unsigned char UID); boolean removeView(const unsigned char UID);