X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ccb6db0909da1c76c760a22429ae171cdeed431..dea9430d44a38837380865289c387ccd1f68a9de:/include/wx/gtk/private/gtk2-compat.h diff --git a/include/wx/gtk/private/gtk2-compat.h b/include/wx/gtk/private/gtk2-compat.h index d7be4f14ad..fddeaafca9 100644 --- a/include/wx/gtk/private/gtk2-compat.h +++ b/include/wx/gtk/private/gtk2-compat.h @@ -55,13 +55,16 @@ static inline gpointer wx_g_object_ref_sink(gpointer object) #define g_object_ref_sink wx_g_object_ref_sink // ---------------------------------------------------------------------------- -// the following were introduced in GTK+ 2.12 +// the following were introduced in GTK+ 2.12 and GtkAboutDialog itself is not +// in 2.4 so skip this if we don't have it. +#if GTK_CHECK_VERSION(2,6,0) static inline void wx_gtk_about_dialog_set_program_name(GtkAboutDialog* about, const gchar* name) { gtk_about_dialog_set_name(about, name); } #define gtk_about_dialog_set_program_name wx_gtk_about_dialog_set_program_name +#endif // 2.6.0 // ---------------------------------------------------------------------------- // the following were introduced in GTK+ 2.14 @@ -358,6 +361,14 @@ static inline gint wx_gdk_window_get_width(GdkWindow* window) } #define gdk_window_get_width wx_gdk_window_get_width +#if GTK_CHECK_VERSION(2,10,0) +static inline void wx_gdk_cairo_set_source_window(cairo_t* cr, GdkWindow* window, gdouble x, gdouble y) +{ + gdk_cairo_set_source_pixmap(cr, window, x, y); +} +#define gdk_cairo_set_source_window wx_gdk_cairo_set_source_window +#endif + #endif // !GTK_CHECK_VERSION(3,0,0) && !defined(GTK_DISABLE_DEPRECATED)