22 # error This is a userspace-only header, not allowed by the current build.
25 #include <sifteo/menu/types.h>
34 inline void Menu::handleNeighborAdd()
36 MENU_LOG(
"Default handler: neighborAdd\n");
40 inline void Menu::handleNeighborRemove()
42 MENU_LOG(
"Default handler: neighborRemove\n");
46 inline void Menu::handleItemArrive()
48 MENU_LOG(
"Default handler: itemArrive\n");
52 inline void Menu::handleItemDepart()
54 MENU_LOG(
"Default handler: itemDepart\n");
58 inline void Menu::handleItemPress()
60 MENU_LOG(
"Default handler: itemPress\n");
62 changeState(MENU_STATE_FINISH);
65 inline void Menu::handleExit()
67 MENU_LOG(
"Default handler: exit\n");
71 inline void Menu::handlePrepaint()
79 inline void Menu::performDefault()
81 switch(currentEvent.type) {
82 case MENU_NEIGHBOR_ADD:
85 case MENU_NEIGHBOR_REMOVE:
86 handleNeighborRemove();
88 case MENU_ITEM_ARRIVE:
91 case MENU_ITEM_DEPART:
111 inline void Menu::clearEvent()
113 currentEvent.type = MENU_UNEVENTFUL;
116 inline bool Menu::dispatchEvent(
struct MenuEvent *ev)
118 if (currentEvent.type != MENU_UNEVENTFUL) {