]> git.saurik.com Git - wxWidgets.git/commitdiff
Renamed wx/gtk/private/compat.h to gtk2-compat.h.
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 27 Mar 2011 17:23:39 +0000 (17:23 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 27 Mar 2011 17:23:39 +0000 (17:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/private.h
include/wx/gtk/private/compat.h [deleted file]
include/wx/gtk/private/gtk2-compat.h [new file with mode: 0644]

index 00f2c9f75918c7a133197adc23e8baea38138b84..c1a8c66f6ebc18bb4e426c0b59cad6f655cf02c3 100644 (file)
@@ -15,7 +15,7 @@
 #include <gtk/gtk.h>
 
 #include "wx/gtk/private/string.h"
-#include "wx/gtk/private/compat.h"
+#include "wx/gtk/private/gtk2-compat.h"
 
 // pango_version_check symbol is quite recent ATM (4/2007)... so we
 // use our own wrapper which implements a smart trick.
diff --git a/include/wx/gtk/private/compat.h b/include/wx/gtk/private/compat.h
deleted file mode 100644 (file)
index 9e1db82..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name:        wx/gtk/private/compat.h
-// Purpose:     Compatibility code for older GTK+ versions
-// Author:      Vaclav Slavik
-// Created:     2011-03-25
-// RCS-ID:      $Id$
-// Copyright:   (c) 2011 Vaclav Slavik <vslavik@fastmail.fm>
-// Licence:     wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_GTK_PRIVATE_COMPAT_H_
-#define _WX_GTK_PRIVATE_COMPAT_H_
-
-// ----------------------------------------------------------------------------
-// Implementations of new accessors for older GTK+ versions
-// ----------------------------------------------------------------------------
-
-// GTK+ deprecated direct access to struct members and some other stuff,
-// replacing them with simple accessor functions. These aren't available in
-// older versions, though, so we have to provide them for compatibility.
-//
-// Note: wx_ prefix is used to avoid symbol conflicts at runtime
-
-
-#if !GTK_CHECK_VERSION(2,18,0)
-    inline gboolean wx_gtk_widget_get_has_window(GtkWidget *widget)
-    {
-        return !GTK_WIDGET_NO_WINDOW(widget);
-    }
-    #define gtk_widget_get_has_window wx_gtk_widget_get_has_window
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,18,0)
-    inline gboolean wx_gtk_widget_get_has_grab(GtkWidget *widget)
-    {
-        return GTK_WIDGET_HAS_GRAB(widget);
-    }
-    #define gtk_widget_get_has_grab wx_gtk_widget_get_has_grab
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,18,0)
-    inline gboolean wx_gtk_widget_get_visible(GtkWidget *widget)
-    {
-        return GTK_WIDGET_VISIBLE(widget);
-    }
-    #define gtk_widget_get_visible wx_gtk_widget_get_visible
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,18,0)
-    inline gboolean wx_gtk_widget_get_sensitive(GtkWidget *widget)
-    {
-        return GTK_WIDGET_VISIBLE(widget);
-    }
-    #define gtk_widget_get_sensitive wx_gtk_widget_get_sensitive
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,18,0)
-    inline gboolean wx_gtk_widget_is_drawable(GtkWidget *widget)
-    {
-        return GTK_WIDGET_DRAWABLE(widget);
-    }
-    #define gtk_widget_is_drawable wx_gtk_widget_is_drawable
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,18,0)
-    inline gboolean wx_gtk_widget_get_can_focus(GtkWidget *widget)
-    {
-        return GTK_WIDGET_CAN_FOCUS(widget);
-    }
-    #define gtk_widget_get_can_focus wx_gtk_widget_get_can_focus
-
-    inline void wx_gtk_widset_set_can_focus(GtkWidget *widget, gboolean can)
-    {
-        if ( can )
-            GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_FOCUS);
-        else
-            GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_FOCUS);
-    }
-    #define gtk_widset_set_can_focus wx_gtk_widset_set_can_focus
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,18,0)
-    inline gboolean wx_gtk_widget_get_can_default(GtkWidget *widget)
-    {
-        return GTK_WIDGET_CAN_DEFAULT(widget);
-    }
-    #define gtk_widget_get_can_default wx_gtk_widget_get_can_default
-
-    inline void wx_gtk_widget_set_can_default(GtkWidget *widget, gboolean can)
-    {
-        if ( can )
-            GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_DEFAULT);
-        else
-            GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_DEFAULT);
-    }
-    #define gtk_widget_set_can_default wx_gtk_widget_set_can_default
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,18,0)
-    inline gboolean wx_gtk_widget_has_default(GtkWidget *widget)
-    {
-        return GTK_WIDGET_HAS_DEFAULT(widget);
-    }
-    #define gtk_widget_has_default wx_gtk_widget_has_default
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,18,0)
-    inline GtkStateType wx_gtk_widget_get_state(GtkWidget *widget)
-    {
-        return (GtkStateType)GTK_WIDGET_STATE(widget);
-    }
-    #define gtk_widget_get_state wx_gtk_widget_get_state
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,18,0)
-    inline gboolean wx_gtk_widget_get_double_buffered(GtkWidget *widget)
-    {
-        return GTK_WIDGET_DOUBLE_BUFFERED(widget);
-    }
-    #define gtk_widget_get_double_buffered wx_gtk_widget_get_double_buffered
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,20,0)
-    inline gboolean wx_gtk_widget_get_realized(GtkWidget *widget)
-    {
-        return GTK_WIDGET_REALIZED(widget);
-    }
-    #define gtk_widget_get_realized wx_gtk_widget_get_realized
-#endif
-
-
-#if !GTK_CHECK_VERSION(2,20,0)
-    inline gboolean wx_gtk_widget_get_mapped(GtkWidget *widget)
-    {
-        return GTK_WIDGET_MAPPED(widget);
-    }
-    #define gtk_widget_get_mapped wx_gtk_widget_get_mapped
-#endif
-
-
-#endif // _WX_GTK_PRIVATE_COMPAT_H_
-
diff --git a/include/wx/gtk/private/gtk2-compat.h b/include/wx/gtk/private/gtk2-compat.h
new file mode 100644 (file)
index 0000000..9e1db82
--- /dev/null
@@ -0,0 +1,152 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wx/gtk/private/compat.h
+// Purpose:     Compatibility code for older GTK+ versions
+// Author:      Vaclav Slavik
+// Created:     2011-03-25
+// RCS-ID:      $Id$
+// Copyright:   (c) 2011 Vaclav Slavik <vslavik@fastmail.fm>
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GTK_PRIVATE_COMPAT_H_
+#define _WX_GTK_PRIVATE_COMPAT_H_
+
+// ----------------------------------------------------------------------------
+// Implementations of new accessors for older GTK+ versions
+// ----------------------------------------------------------------------------
+
+// GTK+ deprecated direct access to struct members and some other stuff,
+// replacing them with simple accessor functions. These aren't available in
+// older versions, though, so we have to provide them for compatibility.
+//
+// Note: wx_ prefix is used to avoid symbol conflicts at runtime
+
+
+#if !GTK_CHECK_VERSION(2,18,0)
+    inline gboolean wx_gtk_widget_get_has_window(GtkWidget *widget)
+    {
+        return !GTK_WIDGET_NO_WINDOW(widget);
+    }
+    #define gtk_widget_get_has_window wx_gtk_widget_get_has_window
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0)
+    inline gboolean wx_gtk_widget_get_has_grab(GtkWidget *widget)
+    {
+        return GTK_WIDGET_HAS_GRAB(widget);
+    }
+    #define gtk_widget_get_has_grab wx_gtk_widget_get_has_grab
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0)
+    inline gboolean wx_gtk_widget_get_visible(GtkWidget *widget)
+    {
+        return GTK_WIDGET_VISIBLE(widget);
+    }
+    #define gtk_widget_get_visible wx_gtk_widget_get_visible
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0)
+    inline gboolean wx_gtk_widget_get_sensitive(GtkWidget *widget)
+    {
+        return GTK_WIDGET_VISIBLE(widget);
+    }
+    #define gtk_widget_get_sensitive wx_gtk_widget_get_sensitive
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0)
+    inline gboolean wx_gtk_widget_is_drawable(GtkWidget *widget)
+    {
+        return GTK_WIDGET_DRAWABLE(widget);
+    }
+    #define gtk_widget_is_drawable wx_gtk_widget_is_drawable
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0)
+    inline gboolean wx_gtk_widget_get_can_focus(GtkWidget *widget)
+    {
+        return GTK_WIDGET_CAN_FOCUS(widget);
+    }
+    #define gtk_widget_get_can_focus wx_gtk_widget_get_can_focus
+
+    inline void wx_gtk_widset_set_can_focus(GtkWidget *widget, gboolean can)
+    {
+        if ( can )
+            GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_FOCUS);
+        else
+            GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_FOCUS);
+    }
+    #define gtk_widset_set_can_focus wx_gtk_widset_set_can_focus
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0)
+    inline gboolean wx_gtk_widget_get_can_default(GtkWidget *widget)
+    {
+        return GTK_WIDGET_CAN_DEFAULT(widget);
+    }
+    #define gtk_widget_get_can_default wx_gtk_widget_get_can_default
+
+    inline void wx_gtk_widget_set_can_default(GtkWidget *widget, gboolean can)
+    {
+        if ( can )
+            GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_DEFAULT);
+        else
+            GTK_WIDGET_UNSET_FLAGS(widget, GTK_CAN_DEFAULT);
+    }
+    #define gtk_widget_set_can_default wx_gtk_widget_set_can_default
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0)
+    inline gboolean wx_gtk_widget_has_default(GtkWidget *widget)
+    {
+        return GTK_WIDGET_HAS_DEFAULT(widget);
+    }
+    #define gtk_widget_has_default wx_gtk_widget_has_default
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0)
+    inline GtkStateType wx_gtk_widget_get_state(GtkWidget *widget)
+    {
+        return (GtkStateType)GTK_WIDGET_STATE(widget);
+    }
+    #define gtk_widget_get_state wx_gtk_widget_get_state
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,18,0)
+    inline gboolean wx_gtk_widget_get_double_buffered(GtkWidget *widget)
+    {
+        return GTK_WIDGET_DOUBLE_BUFFERED(widget);
+    }
+    #define gtk_widget_get_double_buffered wx_gtk_widget_get_double_buffered
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,20,0)
+    inline gboolean wx_gtk_widget_get_realized(GtkWidget *widget)
+    {
+        return GTK_WIDGET_REALIZED(widget);
+    }
+    #define gtk_widget_get_realized wx_gtk_widget_get_realized
+#endif
+
+
+#if !GTK_CHECK_VERSION(2,20,0)
+    inline gboolean wx_gtk_widget_get_mapped(GtkWidget *widget)
+    {
+        return GTK_WIDGET_MAPPED(widget);
+    }
+    #define gtk_widget_get_mapped wx_gtk_widget_get_mapped
+#endif
+
+
+#endif // _WX_GTK_PRIVATE_COMPAT_H_
+