/src/ois/includes/iphone/iPhoneHelpers.h

https://bitbucket.org/cabalistic/ogredeps/ · C Header · 56 lines · 24 code · 7 blank · 25 comment · 0 complexity · cd0eb03728a1e2517cfe478848724f5a MD5 · raw file

  1. /*
  2. The zlib/libpng License
  3. Copyright (c) 2006 Chris Snyder
  4. This software is provided 'as-is', without any express or implied warranty. In no event will
  5. the authors be held liable for any damages arising from the use of this software.
  6. Permission is granted to anyone to use this software for any purpose, including commercial
  7. applications, and to alter it and redistribute it freely, subject to the following
  8. restrictions:
  9. 1. The origin of this software must not be misrepresented; you must not claim that
  10. you wrote the original software. If you use this software in a product,
  11. an acknowledgment in the product documentation would be appreciated but is
  12. not required.
  13. 2. Altered source versions must be plainly marked as such, and must not be
  14. misrepresented as being the original software.
  15. 3. This notice may not be removed or altered from any source distribution.
  16. */
  17. #ifndef OIS_iPhoneHelpers_H
  18. #define OIS_iPhoneHelpers_H
  19. #include "iphone/iPhonePrereqs.h"
  20. #include "OISMultiTouch.h"
  21. // This is needed for keeping an event stack for keyboard and mouse
  22. namespace OIS
  23. {
  24. // used in the eventStack to store the type
  25. enum iPhone_EventType { iPhone_KEYUP = 0,
  26. iPhone_KEYDOWN = 1,
  27. iPhone_KEYREPEAT,
  28. iPhone_MOUSEDOWN,
  29. iPhone_MOUSEUP,
  30. iPhone_MOUSEMOVED,
  31. iPhone_MOUSESCROLL};
  32. typedef enum iPhone_EventType iPhoneEventType;
  33. // only used by iPhoneMultiTouch
  34. typedef class iPhoneMultiTouchStackEvent
  35. {
  36. friend class iPhoneMultiTouch;
  37. private:
  38. iPhoneMultiTouchStackEvent( MultiTouchEvent event, iPhoneEventType type) : Event(event), Type(type) {}
  39. iPhoneEventType Type;
  40. MultiTouchEvent Event;
  41. } iPhoneMultiTouchStackEvent;
  42. }
  43. #endif