diff --git a/include/wx/gtk/private.h b/include/wx/gtk/private.h index 4c52f53c50..ce6efd5ad8 100644 --- a/include/wx/gtk/private.h +++ b/include/wx/gtk/private.h @@ -11,10 +11,9 @@ #ifndef _WX_GTK_PRIVATE_H_ #define _WX_GTK_PRIVATE_H_ -#include +#include "wx/gtk/private/wrapgtk.h" #include "wx/gtk/private/string.h" -#include "wx/gtk/private/gtk2-compat.h" #ifndef G_VALUE_INIT // introduced in GLib 2.30 diff --git a/include/wx/gtk/private/addremovectrl.h b/include/wx/gtk/private/addremovectrl.h index bce4061df5..a790c6e674 100644 --- a/include/wx/gtk/private/addremovectrl.h +++ b/include/wx/gtk/private/addremovectrl.h @@ -14,7 +14,7 @@ #include "wx/bmpbuttn.h" #include "wx/toolbar.h" -#include +#include "wx/gtk/private/wrapgtk.h" // ---------------------------------------------------------------------------- // wxAddRemoveImpl diff --git a/include/wx/gtk/private/wrapgtk.h b/include/wx/gtk/private/wrapgtk.h new file mode 100644 index 0000000000..186e71ce11 --- /dev/null +++ b/include/wx/gtk/private/wrapgtk.h @@ -0,0 +1,19 @@ +/////////////////////////////////////////////////////////////////////////////// +// 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 +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_WRAPGTK_H_ +#define _WX_GTK_PRIVATE_WRAPGTK_H_ + +wxGCC_WARNING_SUPPRESS(parentheses) +#include +wxGCC_WARNING_RESTORE(parentheses) + +#include "wx/gtk/private/gtk2-compat.h" + +#endif // _WX_GTK_PRIVATE_WRAPGTK_H_ diff --git a/include/wx/nativewin.h b/include/wx/nativewin.h index bf585d5796..ebde3ded93 100644 --- a/include/wx/nativewin.h +++ b/include/wx/nativewin.h @@ -38,8 +38,6 @@ typedef HWND wxNativeContainerWindowHandle; typedef HWND wxNativeWindowHandle; #elif defined(__WXGTK__) - #include - // GdkNativeWindow is guint32 under GDK/X11 and gpointer under GDK/WIN32 #ifdef __UNIX__ typedef unsigned long wxNativeContainerWindowId; diff --git a/samples/widgets/native.cpp b/samples/widgets/native.cpp index 030b8f8c40..2bf606ac46 100644 --- a/samples/widgets/native.cpp +++ b/samples/widgets/native.cpp @@ -143,6 +143,8 @@ protected: #elif defined(__WXGTK__) +#include + class NativeWindow : public wxNativeWindow { public: diff --git a/src/aui/dockart.cpp b/src/aui/dockart.cpp index 0d4e2b7167..bc9e014bb3 100644 --- a/src/aui/dockart.cpp +++ b/src/aui/dockart.cpp @@ -42,13 +42,8 @@ #endif #ifdef __WXGTK__ -#include #include "wx/renderer.h" -#ifdef __WXGTK20__ - #include "wx/gtk/private/gtk2-compat.h" -#else - #define gtk_widget_is_drawable GTK_WIDGET_DRAWABLE -#endif +#include "wx/gtk/private/wrapgtk.h" #ifdef __WXGTK3__ #include "wx/graphics.h" #include "wx/gtk/private.h" diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 87c4c37542..b409771f18 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -222,8 +222,7 @@ wxEND_EVENT_TABLE() #else // __WXGTK20__ -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" static void gtk_pseudo_window_realized_callback( GtkWidget *m_widget, void *WXUNUSED(win) ) diff --git a/src/aui/tabartgtk.cpp b/src/aui/tabartgtk.cpp index 0c795f51eb..419ff06eea 100644 --- a/src/aui/tabartgtk.cpp +++ b/src/aui/tabartgtk.cpp @@ -36,8 +36,6 @@ #include "wx/gtk/dc.h" #include "wx/gtk/private.h" -#include - #include "wx/aui/auibook.h" #include "wx/aui/tabartgtk.h" #include "wx/renderer.h" diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index 1c71502574..f05fc5e97c 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -42,12 +42,7 @@ #endif // __WXUNIVERSAL__ #ifdef __WXGTK__ - #include - #if GTK_CHECK_VERSION(2,0,0) - #include "wx/gtk/private/gtk2-compat.h" - #else - #define gtk_widget_get_window(x) x->window - #endif + #include "wx/gtk/private/wrapgtk.h" #elif defined(__WXMSW__) #include "wx/msw/private.h" #elif defined(__WXX11__) diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 81fddcc644..6000660563 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -104,7 +104,7 @@ #endif #if wxUSE_GUI && defined(__WXGTK__) - #include // for GTK_XXX_VERSION constants + #include "wx/gtk/private/wrapgtk.h" // for GTK_XXX_VERSION constants #endif #if wxUSE_GUI && defined(__WXQT__) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index e228db9e1c..a1ad0dca9f 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -83,7 +83,7 @@ using namespace std; #endif #ifdef __WXGTK__ -#include +#include "wx/gtk/private/wrapgtk.h" #include "wx/fontutil.h" #ifndef __WXGTK3__ #include "wx/gtk/dc.h" diff --git a/src/generic/splash.cpp b/src/generic/splash.cpp index c1227d329d..6094bd190c 100644 --- a/src/generic/splash.cpp +++ b/src/generic/splash.cpp @@ -18,7 +18,7 @@ #if wxUSE_SPLASH #ifdef __WXGTK20__ - #include + #include "wx/gtk/private/wrapgtk.h" #endif #include "wx/splash.h" diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 76186c0257..f364677c7b 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -27,9 +27,7 @@ #endif #ifdef __WXGTK20__ - #include #include "wx/gtk/private.h" - #include "wx/gtk/private/gtk2-compat.h" #endif // we only have to do it here when we use wxStatusBarGeneric in addition to the diff --git a/src/gtk/aboutdlg.cpp b/src/gtk/aboutdlg.cpp index e65eb41d24..8f00bead0e 100644 --- a/src/gtk/aboutdlg.cpp +++ b/src/gtk/aboutdlg.cpp @@ -26,9 +26,7 @@ #include "wx/window.h" #endif //WX_PRECOMP -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" // ---------------------------------------------------------------------------- // GtkArray: temporary array of GTK strings diff --git a/src/gtk/activityindicator.cpp b/src/gtk/activityindicator.cpp index dd07fc376e..b63f8d4318 100644 --- a/src/gtk/activityindicator.cpp +++ b/src/gtk/activityindicator.cpp @@ -28,8 +28,7 @@ #include "wx/math.h" -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" // Macro return the specified expression only if GTK+ run time version is less // than 2.20 and compiling it only if it is less than 3.0 (which is why this diff --git a/src/gtk/animate.cpp b/src/gtk/animate.cpp index afb78b9ca9..1bf80687e1 100644 --- a/src/gtk/animate.cpp +++ b/src/gtk/animate.cpp @@ -25,8 +25,6 @@ #include "wx/gtk/private.h" #include "wx/gtk/private/object.h" -#include - // ============================================================================ // implementation diff --git a/src/gtk/anybutton.cpp b/src/gtk/anybutton.cpp index d58e318af2..bc12e5860c 100644 --- a/src/gtk/anybutton.cpp +++ b/src/gtk/anybutton.cpp @@ -18,8 +18,7 @@ #include "wx/stockitem.h" -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" // ---------------------------------------------------------------------------- // GTK callbacks diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 82b2102837..2784771dc5 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -28,7 +28,6 @@ #include "wx/apptrait.h" #include "wx/fontmap.h" -#include #include "wx/gtk/private.h" #include "wx/gtk/mimetype.h" diff --git a/src/gtk/artgtk.cpp b/src/gtk/artgtk.cpp index 195c501063..b5fa77f9af 100644 --- a/src/gtk/artgtk.cpp +++ b/src/gtk/artgtk.cpp @@ -21,7 +21,6 @@ #include "wx/artprov.h" -#include #include "wx/gtk/private.h" #if !GTK_CHECK_VERSION(2,8,0) diff --git a/src/gtk/assertdlg_gtk.cpp b/src/gtk/assertdlg_gtk.cpp index f71bba371c..34c193bdde 100644 --- a/src/gtk/assertdlg_gtk.cpp +++ b/src/gtk/assertdlg_gtk.cpp @@ -10,10 +10,8 @@ #if wxDEBUG_LEVEL -#include -#include "wx/gtk/assertdlg_gtk.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private.h" +#include "wx/gtk/assertdlg_gtk.h" #include "wx/gtk/private/mnemonics.h" #include "wx/translation.h" #include "wx/stockitem.h" diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 4a7e240242..0d45b88619 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -23,8 +23,6 @@ #include "wx/gtk/private/object.h" #include "wx/gtk/private.h" -#include - GdkWindow* wxGetTopLevelGDK(); #ifndef __WXGTK3__ diff --git a/src/gtk/bmpcbox.cpp b/src/gtk/bmpcbox.cpp index 9fc5ac0e1f..b7a124cd3a 100644 --- a/src/gtk/bmpcbox.cpp +++ b/src/gtk/bmpcbox.cpp @@ -29,7 +29,6 @@ #include "wx/log.h" #endif -#include #include "wx/gtk/private.h" // ============================================================================ diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 96e1fb2605..247c5150b8 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -17,9 +17,7 @@ #include "wx/stockitem.h" -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private/list.h" // ---------------------------------------------------------------------------- diff --git a/src/gtk/calctrl.cpp b/src/gtk/calctrl.cpp index aa325ae0b6..221fa53ef5 100644 --- a/src/gtk/calctrl.cpp +++ b/src/gtk/calctrl.cpp @@ -19,7 +19,7 @@ #include "wx/calctrl.h" -#include +#include "wx/gtk/private/wrapgtk.h" extern "C" { diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp index 72beb09210..401f94358d 100644 --- a/src/gtk/checkbox.cpp +++ b/src/gtk/checkbox.cpp @@ -13,8 +13,7 @@ #include "wx/checkbox.h" -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" #include "wx/gtk/private/eventsdisabler.h" //----------------------------------------------------------------------------- diff --git a/src/gtk/checklst.cpp b/src/gtk/checklst.cpp index 4105ce2716..74d3ebdf46 100644 --- a/src/gtk/checklst.cpp +++ b/src/gtk/checklst.cpp @@ -14,7 +14,6 @@ #include "wx/checklst.h" -#include #include "wx/gtk/private.h" #include "wx/gtk/private/treeview.h" diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index f224679451..9c6ebc9039 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -16,9 +16,7 @@ #include "wx/arrstr.h" #endif -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private/eventsdisabler.h" // ---------------------------------------------------------------------------- diff --git a/src/gtk/clrpicker.cpp b/src/gtk/clrpicker.cpp index 16754db196..856421e94e 100644 --- a/src/gtk/clrpicker.cpp +++ b/src/gtk/clrpicker.cpp @@ -20,7 +20,7 @@ #include "wx/clrpicker.h" -#include +#include "wx/gtk/private/wrapgtk.h" // ============================================================================ // implementation diff --git a/src/gtk/collpane.cpp b/src/gtk/collpane.cpp index e02c0be1da..4c8d1d38f8 100644 --- a/src/gtk/collpane.cpp +++ b/src/gtk/collpane.cpp @@ -23,9 +23,7 @@ #include "wx/sizer.h" #include "wx/panel.h" -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" // the lines below duplicate the same definitions in collpaneg.cpp, if we have // another implementation of this class we should extract them to a common file diff --git a/src/gtk/colordlg.cpp b/src/gtk/colordlg.cpp index ce8aba58d8..7f7d11a5ed 100644 --- a/src/gtk/colordlg.cpp +++ b/src/gtk/colordlg.cpp @@ -23,9 +23,7 @@ #include "wx/intl.h" #endif -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private/dialogcount.h" extern "C" { diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 4c0231dcf3..578088c0fd 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -20,9 +20,7 @@ #include "wx/arrstr.h" #endif -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" // ---------------------------------------------------------------------------- // GTK callbacks diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index c43f727d15..772e2f8c8a 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -22,7 +22,6 @@ #include "wx/utils.h" #include "wx/sysopt.h" -#include #include "wx/gtk/private.h" #include "wx/gtk/private/mnemonics.h" diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index b80f4872fe..07fe835b85 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -18,9 +18,8 @@ #include "wx/log.h" #endif // WX_PRECOMP -#include +#include "wx/gtk/private/wrapgtk.h" #include "wx/gtk/private/object.h" -#include "wx/gtk/private/gtk2-compat.h" GdkWindow* wxGetTopLevelGDK(); diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 2877a9996c..8c87aee3ee 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -32,11 +32,9 @@ #include "wx/gtk/dcclient.h" #endif -#include #include "wx/gtk/private.h" #include "wx/gtk/private/event.h" #include "wx/gtk/private/gdkconv.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private/list.h" #include "wx/gtk/private/treeview.h" using namespace wxGTKImpl; diff --git a/src/gtk/dc.cpp b/src/gtk/dc.cpp index 4a6603f5ee..3e7868173c 100644 --- a/src/gtk/dc.cpp +++ b/src/gtk/dc.cpp @@ -19,7 +19,7 @@ #include "wx/icon.h" #include "wx/gtk/dc.h" -#include +#include "wx/gtk/private/wrapgtk.h" wxGTKCairoDCImpl::wxGTKCairoDCImpl(wxDC* owner) : wxGCDCImpl(owner) diff --git a/src/gtk/dcmemory.cpp b/src/gtk/dcmemory.cpp index a75c8ed21d..9ac137d837 100644 --- a/src/gtk/dcmemory.cpp +++ b/src/gtk/dcmemory.cpp @@ -11,7 +11,7 @@ #include "wx/gtk/dcmemory.h" -#include +#include "wx/gtk/private/wrapgtk.h" //----------------------------------------------------------------------------- // wxMemoryDCImpl diff --git a/src/gtk/dcscreen.cpp b/src/gtk/dcscreen.cpp index c895c9e200..ea9f607ed9 100644 --- a/src/gtk/dcscreen.cpp +++ b/src/gtk/dcscreen.cpp @@ -11,7 +11,7 @@ #include "wx/gtk/dcscreen.h" -#include +#include "wx/gtk/private/wrapgtk.h" //----------------------------------------------------------------------------- // wxScreenDCImpl diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 5483eca3bc..c399ad5775 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -19,8 +19,7 @@ #include "wx/scopedptr.h" #include "wx/modalhook.h" -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" #include "wx/gtk/private/dialogcount.h" wxDEFINE_TIED_SCOPED_PTR_TYPE(wxGUIEventLoop) diff --git a/src/gtk/display.cpp b/src/gtk/display.cpp index e04ca9160d..d3fc6e465c 100644 --- a/src/gtk/display.cpp +++ b/src/gtk/display.cpp @@ -14,11 +14,10 @@ #endif #include "wx/utils.h" // wxClientDisplayRect -#include +#include "wx/gtk/private/wrapgtk.h" #ifdef GDK_WINDOWING_X11 #include #endif -#include "wx/gtk/private/gtk2-compat.h" #if !defined(GDK_WINDOWING_WIN32) diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index ddcf5cd0d1..2638a0ccff 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -24,8 +24,7 @@ #include "wx/scopeguard.h" -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" //---------------------------------------------------------------------------- // global data diff --git a/src/gtk/evtloop.cpp b/src/gtk/evtloop.cpp index 7a2a98c4ef..bd5225e4c5 100644 --- a/src/gtk/evtloop.cpp +++ b/src/gtk/evtloop.cpp @@ -34,8 +34,7 @@ #include "wx/private/eventloopsourcesmanager.h" #include "wx/apptrait.h" -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" GdkWindow* wxGetTopLevelGDK(); diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index 91541c7986..7aa39cdfb3 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -19,7 +19,6 @@ #include "wx/msgdlg.h" #endif -#include #include "wx/gtk/private.h" #include "wx/gtk/private/mnemonics.h" diff --git a/src/gtk/filehistory.cpp b/src/gtk/filehistory.cpp index a81da0a7c5..e0eabf4d74 100644 --- a/src/gtk/filehistory.cpp +++ b/src/gtk/filehistory.cpp @@ -28,10 +28,8 @@ #include "wx/filename.h" -#include -#include -#include "wx/gtk/private/string.h" #include "wx/gtk/private.h" +#include "wx/gtk/private/string.h" // ============================================================================ // implementation diff --git a/src/gtk/filepicker.cpp b/src/gtk/filepicker.cpp index 8ee67cb02b..8940155922 100644 --- a/src/gtk/filepicker.cpp +++ b/src/gtk/filepicker.cpp @@ -25,7 +25,6 @@ #include "wx/filepicker.h" #include "wx/tooltip.h" -#include #include "wx/gtk/private.h" // ============================================================================ diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index f902f70fea..7a6a3e93db 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -17,8 +17,7 @@ #include "wx/statusbr.h" #endif // WX_PRECOMP -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" // ---------------------------------------------------------------------------- // event tables diff --git a/src/gtk/gauge.cpp b/src/gtk/gauge.cpp index 85c044899b..e6d600a74f 100644 --- a/src/gtk/gauge.cpp +++ b/src/gtk/gauge.cpp @@ -13,7 +13,7 @@ #include "wx/gauge.h" -#include +#include "wx/gtk/private/wrapgtk.h" //----------------------------------------------------------------------------- // wxGauge diff --git a/src/gtk/glcanvas.cpp b/src/gtk/glcanvas.cpp index 1e68741ca0..5cfdb34f40 100644 --- a/src/gtk/glcanvas.cpp +++ b/src/gtk/glcanvas.cpp @@ -15,9 +15,8 @@ #include "wx/glcanvas.h" -#include +#include "wx/gtk/private/wrapgtk.h" #include -#include "wx/gtk/private/gtk2-compat.h" #if WXWIN_COMPATIBILITY_2_8 diff --git a/src/gtk/hyperlink.cpp b/src/gtk/hyperlink.cpp index d4b0786cdf..5a11df73e9 100644 --- a/src/gtk/hyperlink.cpp +++ b/src/gtk/hyperlink.cpp @@ -29,7 +29,6 @@ #ifndef WX_PRECOMP #endif -#include #include "wx/gtk/private.h" // ---------------------------------------------------------------------------- diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 11ad433739..78b5255668 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -28,15 +28,14 @@ #include "wx/tooltip.h" #endif -#include -#include #include "wx/gtk/private.h" #include "wx/gtk/private/eventsdisabler.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private/object.h" #include "wx/gtk/private/treeentry_gtk.h" #include "wx/gtk/private/treeview.h" +#include + //----------------------------------------------------------------------------- // data //----------------------------------------------------------------------------- diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 9d164d06df..6aac109556 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -25,9 +25,7 @@ #include "wx/accel.h" #include "wx/stockitem.h" -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private/mnemonics.h" // Number of currently open modal dialogs, defined in src/gtk/toplevel.cpp. diff --git a/src/gtk/mimetype.cpp b/src/gtk/mimetype.cpp index 7031c1ea52..99f5aa19a0 100644 --- a/src/gtk/mimetype.cpp +++ b/src/gtk/mimetype.cpp @@ -13,11 +13,10 @@ #include "wx/gtk/mimetype.h" -#include +#include "wx/gtk/private/wrapgtk.h" #include "wx/gtk/private/string.h" #include "wx/gtk/private/object.h" -#include "wx/gtk/private/gtk2-compat.h" #if defined(__UNIX__) wxString wxGTKMimeTypesManagerImpl::GetIconFromMimeType(const wxString& mime) diff --git a/src/gtk/minifram.cpp b/src/gtk/minifram.cpp index 20735bc921..b342f7f13d 100644 --- a/src/gtk/minifram.cpp +++ b/src/gtk/minifram.cpp @@ -24,8 +24,7 @@ #include "wx/gtk/dcclient.h" #endif -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" #include "wx/gtk/private/gtk3-compat.h" //----------------------------------------------------------------------------- diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index 386ad774db..77d2d6a0ea 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -25,7 +25,6 @@ #include "wx/modalhook.h" -#include #include "wx/gtk/private.h" #include "wx/gtk/private/messagetype.h" #include "wx/gtk/private/mnemonics.h" diff --git a/src/gtk/nativewin.cpp b/src/gtk/nativewin.cpp index b3664b55b0..8bba19c685 100644 --- a/src/gtk/nativewin.cpp +++ b/src/gtk/nativewin.cpp @@ -27,8 +27,7 @@ #include "wx/nativewin.h" -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" #ifdef GDK_WINDOWING_X11 #include diff --git a/src/gtk/nonownedwnd.cpp b/src/gtk/nonownedwnd.cpp index b23a76a0a1..b23a53c191 100644 --- a/src/gtk/nonownedwnd.cpp +++ b/src/gtk/nonownedwnd.cpp @@ -31,8 +31,7 @@ #include "wx/graphics.h" -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" // ---------------------------------------------------------------------------- // wxNonOwnedWindowShapeImpl: base class for region and path-based classes. diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 35cd915ca6..0f141cfe8e 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -24,9 +24,7 @@ #include "wx/imaglist.h" #include "wx/fontutil.h" -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" //----------------------------------------------------------------------------- // wxGtkNotebookPage diff --git a/src/gtk/popupwin.cpp b/src/gtk/popupwin.cpp index 1b211db1c4..6c1b56f86d 100644 --- a/src/gtk/popupwin.cpp +++ b/src/gtk/popupwin.cpp @@ -16,7 +16,7 @@ #ifndef WX_PRECOMP #endif // WX_PRECOMP -#include +#include "wx/gtk/private/wrapgtk.h" #include "wx/gtk/private/win_gtk.h" diff --git a/src/gtk/print.cpp b/src/gtk/print.cpp index 62578a44e5..b43a1f148b 100644 --- a/src/gtk/print.cpp +++ b/src/gtk/print.cpp @@ -34,7 +34,7 @@ #include "wx/paper.h" #include "wx/modalhook.h" -#include +#include "wx/gtk/private/wrapgtk.h" #if GTK_CHECK_VERSION(2,14,0) #include @@ -46,7 +46,6 @@ wxFORCE_LINK_THIS_MODULE(gtk_print) #include "wx/gtk/private/object.h" -#include "wx/gtk/private/gtk2-compat.h" // Useful to convert angles from degrees to radians. static const double DEG2RAD = M_PI / 180.0; diff --git a/src/gtk/private.cpp b/src/gtk/private.cpp index 1971c52b60..6f40083d48 100644 --- a/src/gtk/private.cpp +++ b/src/gtk/private.cpp @@ -27,7 +27,6 @@ #include "wx/module.h" #endif -#include #include "wx/gtk/private.h" // ---------------------------------------------------------------------------- diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index a92985a16a..b59022bd4b 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -17,10 +17,9 @@ #include "wx/tooltip.h" #endif -#include -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" + +#include //----------------------------------------------------------------------------- // wxGTKRadioButtonInfo diff --git a/src/gtk/radiobut.cpp b/src/gtk/radiobut.cpp index 9637a8004c..9b87a178ad 100644 --- a/src/gtk/radiobut.cpp +++ b/src/gtk/radiobut.cpp @@ -13,9 +13,7 @@ #include "wx/radiobut.h" -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" //----------------------------------------------------------------------------- // data diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index 6b31d490d8..ef0636771e 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -37,9 +37,7 @@ #include "wx/gtk/dc.h" #endif -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" #if defined(__WXGTK3__) && !GTK_CHECK_VERSION(3,14,0) #define GTK_STATE_FLAG_CHECKED (1 << 11) diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 021c5243ce..95765bf0c7 100644 --- a/src/gtk/scrolwin.cpp +++ b/src/gtk/scrolwin.cpp @@ -18,8 +18,7 @@ #include "wx/scrolwin.h" -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" // ---------------------------------------------------------------------------- // wxScrollHelper implementation diff --git a/src/gtk/settings.cpp b/src/gtk/settings.cpp index 87748f5271..d65178723b 100644 --- a/src/gtk/settings.cpp +++ b/src/gtk/settings.cpp @@ -20,9 +20,8 @@ #include "wx/fontutil.h" #include "wx/fontenum.h" -#include +#include "wx/gtk/private/wrapgtk.h" #include "wx/gtk/private/win_gtk.h" -#include "wx/gtk/private/gtk2-compat.h" bool wxGetFrameExtents(GdkWindow* window, int* left, int* right, int* top, int* bottom); diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 69d994abc3..2d86c965cf 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -18,8 +18,7 @@ #include "wx/math.h" #endif -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" #include "wx/gtk/private/eventsdisabler.h" //----------------------------------------------------------------------------- diff --git a/src/gtk/spinbutt.cpp b/src/gtk/spinbutt.cpp index 28ae45dbbd..a0a3ebef55 100644 --- a/src/gtk/spinbutt.cpp +++ b/src/gtk/spinbutt.cpp @@ -14,7 +14,7 @@ #include "wx/spinbutt.h" -#include +#include "wx/gtk/private/wrapgtk.h" //----------------------------------------------------------------------------- // data diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index 5a22d6fbe4..932bc4623d 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -20,9 +20,7 @@ #include "wx/wxcrtvararg.h" #endif -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" //----------------------------------------------------------------------------- // data diff --git a/src/gtk/statbmp.cpp b/src/gtk/statbmp.cpp index 4a56efc6f1..9b9a7c9d41 100644 --- a/src/gtk/statbmp.cpp +++ b/src/gtk/statbmp.cpp @@ -13,7 +13,7 @@ #include "wx/statbmp.h" -#include +#include "wx/gtk/private/wrapgtk.h" //----------------------------------------------------------------------------- // wxStaticBitmap diff --git a/src/gtk/statbox.cpp b/src/gtk/statbox.cpp index 6979591287..f5a69afa5f 100644 --- a/src/gtk/statbox.cpp +++ b/src/gtk/statbox.cpp @@ -13,8 +13,7 @@ #include "wx/statbox.h" -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" #include "wx/gtk/private/win_gtk.h" // constants taken from GTK sources diff --git a/src/gtk/statline.cpp b/src/gtk/statline.cpp index a9b52ab88e..d7752e0a29 100644 --- a/src/gtk/statline.cpp +++ b/src/gtk/statline.cpp @@ -13,8 +13,7 @@ #if wxUSE_STATLINE -#include -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/wrapgtk.h" //----------------------------------------------------------------------------- // wxStaticLine diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index 78e154c006..36d87b502c 100644 --- a/src/gtk/stattext.cpp +++ b/src/gtk/stattext.cpp @@ -13,7 +13,6 @@ #include "wx/stattext.h" -#include #include "wx/gtk/private.h" //----------------------------------------------------------------------------- diff --git a/src/gtk/taskbar.cpp b/src/gtk/taskbar.cpp index f501457b03..bf0f27a399 100644 --- a/src/gtk/taskbar.cpp +++ b/src/gtk/taskbar.cpp @@ -23,14 +23,13 @@ #include "wx/icon.h" #endif -#include +#include "wx/gtk/private/wrapgtk.h" #ifdef GDK_WINDOWING_X11 #include #endif #ifndef __WXGTK3__ #include "eggtrayicon.h" #endif -#include "wx/gtk/private/gtk2-compat.h" wxGCC_WARNING_SUPPRESS(deprecated-declarations) diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 5febd63944..281099dce9 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -29,9 +29,7 @@ #include #include -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private/gtk3-compat.h" // ---------------------------------------------------------------------------- diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index c608a609de..bc4735a8a7 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -33,9 +33,7 @@ #include "wx/textcompleter.h" -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private/object.h" #include "wx/gtk/private/string.h" diff --git a/src/gtk/tglbtn.cpp b/src/gtk/tglbtn.cpp index 0778546883..bb27f5c234 100644 --- a/src/gtk/tglbtn.cpp +++ b/src/gtk/tglbtn.cpp @@ -20,7 +20,6 @@ #include "wx/button.h" #endif -#include #include "wx/gtk/private.h" #include "wx/gtk/private/eventsdisabler.h" #include "wx/gtk/private/list.h" diff --git a/src/gtk/timer.cpp b/src/gtk/timer.cpp index 5e819097eb..83bacce20a 100644 --- a/src/gtk/timer.cpp +++ b/src/gtk/timer.cpp @@ -14,7 +14,7 @@ #include "wx/gtk/private/timer.h" #include "wx/app.h" -#include +#include "wx/gtk/private/wrapgtk.h" // ---------------------------------------------------------------------------- // wxTimerImpl diff --git a/src/gtk/toolbar.cpp b/src/gtk/toolbar.cpp index e7ead42550..d857972eff 100644 --- a/src/gtk/toolbar.cpp +++ b/src/gtk/toolbar.cpp @@ -14,9 +14,7 @@ #include "wx/toolbar.h" -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private/gtk3-compat.h" // ---------------------------------------------------------------------------- diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index bdb8ffa790..57a457a418 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -32,18 +32,16 @@ #include "wx/evtloop.h" #include "wx/sysopt.h" -#include +#include "wx/gtk/private.h" +#include "wx/gtk/private/gtk3-compat.h" +#include "wx/gtk/private/win_gtk.h" + #ifdef GDK_WINDOWING_X11 #include #include // XA_CARDINAL #include "wx/unix/utilsx11.h" #endif -#include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" -#include "wx/gtk/private/gtk3-compat.h" -#include "wx/gtk/private/win_gtk.h" - // ---------------------------------------------------------------------------- // data // ---------------------------------------------------------------------------- diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index 7a43641e96..7cdbd871c8 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -25,7 +25,7 @@ #include "wx/gtk/private/timer.h" #include "wx/evtloop.h" -#include +#include "wx/gtk/private/wrapgtk.h" #ifdef GDK_WINDOWING_WIN32 #include #endif @@ -54,8 +54,6 @@ #include "wx/unix/utilsx11.h" #endif -#include "wx/gtk/private/gtk2-compat.h" - GdkWindow* wxGetTopLevelGDK(); //---------------------------------------------------------------------------- diff --git a/src/gtk/win_gtk.cpp b/src/gtk/win_gtk.cpp index 2adab9c58a..98b17fe117 100644 --- a/src/gtk/win_gtk.cpp +++ b/src/gtk/win_gtk.cpp @@ -8,13 +8,8 @@ #include "wx/wxprec.h" -#include "wx/defs.h" - -#include -#include "wx/gtk/private/win_gtk.h" - #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/win_gtk.h" /* wxPizza is a custom GTK+ widget derived from GtkFixed. A custom widget diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index b2700cb280..fa49c0f2d9 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -37,16 +37,15 @@ #include -#include -#include #include "wx/gtk/private.h" -#include "wx/gtk/private/gtk2-compat.h" #include "wx/gtk/private/gtk3-compat.h" #include "wx/gtk/private/event.h" #include "wx/gtk/private/win_gtk.h" #include "wx/private/textmeasure.h" using namespace wxGTKImpl; +#include + #ifdef GDK_WINDOWING_X11 #include #include "wx/x11/private/wrapxkb.h" diff --git a/src/unix/mediactrl.cpp b/src/unix/mediactrl.cpp index bdcb909b4b..a71f5bf043 100644 --- a/src/unix/mediactrl.cpp +++ b/src/unix/mediactrl.cpp @@ -34,9 +34,8 @@ #include "wx/vector.h" // wxVector #ifdef __WXGTK__ - #include + #include "wx/gtk/private/wrapgtk.h" #include - #include "wx/gtk/private/gtk2-compat.h" #endif //----------------------------------------------------------------------------- diff --git a/src/unix/mediactrl_gstplayer.cpp b/src/unix/mediactrl_gstplayer.cpp index b7c22c0a04..235bdbc721 100644 --- a/src/unix/mediactrl_gstplayer.cpp +++ b/src/unix/mediactrl_gstplayer.cpp @@ -28,9 +28,8 @@ #include "wx/vector.h" // wxVector #ifdef __WXGTK__ - #include + #include "wx/gtk/private/wrapgtk.h" #include - #include "wx/gtk/private/gtk2-compat.h" #endif //============================================================================= diff --git a/src/unix/taskbarx11.cpp b/src/unix/taskbarx11.cpp index 5633edbbde..5bd8837f2e 100644 --- a/src/unix/taskbarx11.cpp +++ b/src/unix/taskbarx11.cpp @@ -64,7 +64,7 @@ // ---------------------------------------------------------------------------- #if defined(__WXGTK__) - #include + #include "wx/gtk/private/wrapgtk.h" #include #define GetDisplay() GDK_DISPLAY() #define GetXWindow(wxwin) GDK_WINDOW_XWINDOW((wxwin)->m_widget->window) diff --git a/src/unix/uiactionx11.cpp b/src/unix/uiactionx11.cpp index aac179e6e4..96fe8c0629 100644 --- a/src/unix/uiactionx11.cpp +++ b/src/unix/uiactionx11.cpp @@ -28,7 +28,7 @@ #include "wx/unix/utilsx11.h" #ifdef __WXGTK3__ -#include +#include "wx/gtk/private/wrapgtk.h" GtkWidget* wxGetTopLevelGTK(); #endif diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp index 50d5dd0c0e..8b9f37b831 100644 --- a/src/unix/utilsx11.cpp +++ b/src/unix/utilsx11.cpp @@ -37,12 +37,9 @@ #endif #ifdef __WXGTK__ -#include +#include "wx/gtk/private/wrapgtk.h" #ifdef GDK_WINDOWING_X11 #include -#ifdef __WXGTK20__ -#include "wx/gtk/private/gtk2-compat.h" // gdk_window_get_screen() -#endif #endif GdkWindow* wxGetTopLevelGDK(); GtkWidget* wxGetTopLevelGTK();