private.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/dfb/private.h
  3. // Purpose: private helpers for wxDFB implementation
  4. // Author: Vaclav Slavik
  5. // Created: 2006-08-09
  6. // Copyright: (c) 2006 REA Elektronik GmbH
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_DFB_PRIVATE_H_
  10. #define _WX_DFB_PRIVATE_H_
  11. #include "wx/intl.h"
  12. #include "wx/log.h"
  13. #include "wx/dfb/wrapdfb.h"
  14. #include <directfb_version.h>
  15. //-----------------------------------------------------------------------------
  16. // misc helpers
  17. //-----------------------------------------------------------------------------
  18. /// Convert DirectFB timestamp to wxEvent one:
  19. #define wxDFB_EVENT_TIMESTAMP(event) \
  20. ((event).timestamp.tv_sec * 1000 + (event).timestamp.tv_usec / 1000)
  21. /**
  22. Check if DirectFB library version is at least @a major.@a minor.@a release.
  23. @see wxCHECK_VERSION
  24. */
  25. #define wxCHECK_DFB_VERSION(major,minor,release) \
  26. (DIRECTFB_MAJOR_VERSION > (major) || \
  27. (DIRECTFB_MAJOR_VERSION == (major) && \
  28. DIRECTFB_MINOR_VERSION > (minor)) || \
  29. (DIRECTFB_MAJOR_VERSION == (major) && \
  30. DIRECTFB_MINOR_VERSION == (minor) && \
  31. DIRECTFB_MICRO_VERSION >= (release)))
  32. #endif // _WX_DFB_PRIVATE_H_