Add wx_is_at_least_gtk3() helper

This commit is contained in:
Paul Cornett
2017-12-19 09:41:26 -08:00
parent f704c288e0
commit b573315e7f

View File

@@ -23,8 +23,6 @@ static inline gboolean wx_gtk_text_iter_starts_tag(const GtkTextIter* iter, GtkT
}
#define gtk_text_iter_starts_tag wx_gtk_text_iter_starts_tag
#endif // !__WXGTK4__
#ifdef __WXGTK3__
// ----------------------------------------------------------------------------
@@ -43,7 +41,24 @@ static inline void wx_gtk_widget_set_margin_end(GtkWidget* widget, gint margin)
#define gtk_widget_set_margin_end wx_gtk_widget_set_margin_end
#endif // __WXGTK3__
#endif // !__WXGTK4__
wxGCC_WARNING_RESTORE()
#if defined(__WXGTK4__) || !defined(__WXGTK3__)
static inline bool wx_is_at_least_gtk3(int /* minor */)
{
#ifdef __WXGTK4__
return true;
#else
return false;
#endif
}
#else
static inline bool wx_is_at_least_gtk3(int minor)
{
return gtk_check_version(3, minor, 0) == NULL;
}
#endif
#endif // _WX_GTK_PRIVATE_COMPAT3_H_