µGFX library fork

ginput_rules.h 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * This file is subject to the terms of the GFX License. If a copy of
  3. * the license was not distributed with this file, you can obtain one at:
  4. *
  5. * http://ugfx.org/license.html
  6. */
  7. /**
  8. * @file src/ginput/ginput_rules.h
  9. * @brief GINPUT safety rules header file.
  10. *
  11. * @addtogroup GINPUT
  12. * @{
  13. */
  14. #ifndef _GINPUT_RULES_H
  15. #define _GINPUT_RULES_H
  16. #if GFX_USE_GINPUT
  17. #if !GFX_USE_GEVENT
  18. #if GFX_DISPLAY_RULE_WARNINGS
  19. #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
  20. #warning "GINPUT: GFX_USE_GEVENT is required if GFX_USE_GINPUT is TRUE. It has been turned on for you."
  21. #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
  22. COMPILER_WARNING("GINPUT: GFX_USE_GEVENT is required if GFX_USE_GINPUT is TRUE. It has been turned on for you.")
  23. #endif
  24. #endif
  25. #undef GFX_USE_GEVENT
  26. #define GFX_USE_GEVENT TRUE
  27. #endif
  28. #if !GFX_USE_GTIMER
  29. #if GFX_DISPLAY_RULE_WARNINGS
  30. #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
  31. #warning "GINPUT: GFX_USE_GTIMER is required if GFX_USE_GINPUT is TRUE. It has been turned on for you."
  32. #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
  33. COMPILER_WARNING("GINPUT: GFX_USE_GTIMER is required if GFX_USE_GINPUT is TRUE. It has been turned on for you.")
  34. #endif
  35. #endif
  36. #undef GFX_USE_GTIMER
  37. #define GFX_USE_GTIMER TRUE
  38. #endif
  39. #if GINPUT_NEED_MOUSE
  40. #if GINPUT_TOUCH_NOTOUCH
  41. // No warning needed for this
  42. #undef GINPUT_TOUCH_NOCALIBRATE
  43. #define GINPUT_TOUCH_NOCALIBRATE TRUE
  44. #endif
  45. #if GINPUT_TOUCH_NOCALIBRATE
  46. // No warning needed for this
  47. #undef GINPUT_TOUCH_NOCALIBRATE_GUI
  48. #define GINPUT_TOUCH_NOCALIBRATE_GUI TRUE
  49. #endif
  50. #if !GINPUT_TOUCH_NOTOUCH && GINPUT_MOUSE_CLICK_TIME > GINPUT_TOUCH_CXTCLICK_TIME
  51. #error "GINPUT MOUSE: The GINPUT_MOUSE_CLICK_TIME must be <= GINPUT_TOUCH_CXTCLICK_TIME"
  52. #endif
  53. #endif
  54. #endif
  55. #endif /* _GINPUT_RULES_H */
  56. /** @} */