]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxCHECK_DFB_VERSION() macro
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 27 Aug 2006 13:13:41 +0000 (13:13 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 27 Aug 2006 13:13:41 +0000 (13:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dfb/private.h

index 0c82d8ea0f01858b25bb95e3189cb6b42c982993..a613c53b4ab1e1e49e8475401e531233cd13cbd6 100644 (file)
@@ -15,6 +15,7 @@
 #include "wx/log.h"
 
 #include <directfb.h>
+#include <directfb_version.h>
 
 #include "wx/dfb/ifacehelpers.h"
 
@@ -152,5 +153,17 @@ WXDFB_DEFINE_EVENT_WRAPPER(DFBWindowEvent)
 #define wxDFB_EVENT_TIMESTAMP(event) \
         ((event).timestamp.tv_sec * 1000 + (event).timestamp.tv_usec / 1000)
 
+/**
+    Check if DirectFB library version is at least @a major.@a minor.@a release.
+
+    @sa wxCHECK_VERSION
+ */
+#define wxCHECK_DFB_VERSION(major,minor,release) \
+    (DIRECTFB_MAJOR_VERSION > (major) || \
+    (DIRECTFB_MAJOR_VERSION == (major) && \
+        DIRECTFB_MINOR_VERSION > (minor)) || \
+    (DIRECTFB_MAJOR_VERSION == (major) && \
+        DIRECTFB_MINOR_VERSION == (minor) && \
+            DIRECTFB_MICRO_VERSION >= (release)))
 
 #endif // _WX_DFB_PRIVATE_H_