Events.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright 2010 Christophe Henry
  2. // henry UNDERSCORE christophe AT hotmail DOT com
  3. // This is an extended version of the state machine available in the boost::mpl library
  4. // Distributed under the same license as the original.
  5. // Copyright for the original version:
  6. // Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
  7. // under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. #ifndef EVENTS_HPP
  11. #define EVENTS_HPP
  12. //flags
  13. struct MenuActive{};
  14. // hardware-generated events
  15. struct Hold {};
  16. struct NoHold {};
  17. struct SouthPressed {};
  18. struct SouthReleased {};
  19. struct MiddleButton {};
  20. struct EastPressed{};
  21. struct EastReleased{};
  22. struct Off {};
  23. struct MenuButton {};
  24. // internally used events
  25. struct PlayPause {};
  26. struct EndPlay {};
  27. struct CloseMenu
  28. {
  29. template<class EVENT>
  30. CloseMenu(EVENT const &) {}
  31. };
  32. struct OnOffTimer {};
  33. struct MenuMiddleButton {};
  34. struct SelectSong {};
  35. struct SongFinished {};
  36. struct StartSong
  37. {
  38. StartSong (int song_index):m_Selected(song_index){}
  39. int m_Selected;
  40. };
  41. struct PreviousSong{};
  42. struct NextSong{};
  43. struct NextSongDerived : public NextSong{};
  44. struct ForwardTimer{};
  45. struct PlayingMiddleButton{};
  46. #endif // EVENTS_HPP