Add wx_is_at_least_gtk3() helper
This commit is contained in:
@@ -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
|
#define gtk_text_iter_starts_tag wx_gtk_text_iter_starts_tag
|
||||||
|
|
||||||
#endif // !__WXGTK4__
|
|
||||||
|
|
||||||
#ifdef __WXGTK3__
|
#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
|
#define gtk_widget_set_margin_end wx_gtk_widget_set_margin_end
|
||||||
|
|
||||||
#endif // __WXGTK3__
|
#endif // __WXGTK3__
|
||||||
|
#endif // !__WXGTK4__
|
||||||
|
|
||||||
wxGCC_WARNING_RESTORE()
|
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_
|
#endif // _WX_GTK_PRIVATE_COMPAT3_H_
|
||||||
|
Reference in New Issue
Block a user