41 # error This is a userspace-only header, not allowed by the current build.
44 #include <sifteo/menu/types.h>
53 inline void Menu::handleNeighborAdd()
55 MENU_LOG(
"Default handler: neighborAdd\n");
59 inline void Menu::handleNeighborRemove()
61 MENU_LOG(
"Default handler: neighborRemove\n");
65 inline void Menu::handleItemArrive()
67 MENU_LOG(
"Default handler: itemArrive\n");
71 inline void Menu::handleItemDepart()
73 MENU_LOG(
"Default handler: itemDepart\n");
77 inline void Menu::handleItemPress()
79 MENU_LOG(
"Default handler: itemPress\n");
81 changeState(MENU_STATE_FINISH);
84 inline void Menu::handleExit()
86 MENU_LOG(
"Default handler: exit\n");
90 inline void Menu::handlePrepaint()
98 inline void Menu::performDefault()
100 switch(currentEvent.type) {
101 case MENU_NEIGHBOR_ADD:
104 case MENU_NEIGHBOR_REMOVE:
105 handleNeighborRemove();
107 case MENU_ITEM_ARRIVE:
110 case MENU_ITEM_DEPART:
113 case MENU_ITEM_PRESS:
130 inline void Menu::clearEvent()
132 currentEvent.type = MENU_UNEVENTFUL;
135 inline bool Menu::dispatchEvent(
struct MenuEvent *ev)
137 if (currentEvent.type != MENU_UNEVENTFUL) {
static void paint()
Draw the next frame.
Definition: system.h:119