Add wx/gtk/private/wrapgtk.h wrapping gtk/gtk.h in pragmas disabling these warnings and include it everywhere instead of directly including gtk/gtk.h. Also include wx/gtk/private/gtk2-compat.h from this wrapper header as it was included by 90% of the files including gtk/gtk.h itself and it seems to be better and simpler to just always include it.
20 lines
670 B
C
20 lines
670 B
C
///////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/gtk/private/wrapgtk.h
|
|
// Purpose: Include gtk/gtk.h without warnings and with compatibility
|
|
// Author: Vadim Zeitlin
|
|
// Created: 2018-05-20
|
|
// Copyright: (c) 2018 Vadim Zeitlin <vadim@wxwidgets.org>
|
|
// Licence: wxWindows licence
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_GTK_PRIVATE_WRAPGTK_H_
|
|
#define _WX_GTK_PRIVATE_WRAPGTK_H_
|
|
|
|
wxGCC_WARNING_SUPPRESS(parentheses)
|
|
#include <gtk/gtk.h>
|
|
wxGCC_WARNING_RESTORE(parentheses)
|
|
|
|
#include "wx/gtk/private/gtk2-compat.h"
|
|
|
|
#endif // _WX_GTK_PRIVATE_WRAPGTK_H_
|