Avoid many -Wparentheses warnings from gtk/gtk.h with gcc8

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.
This commit is contained in:
Vadim Zeitlin
2018-05-20 18:43:16 +02:00
parent 8401d3fec9
commit c0b0562533
86 changed files with 79 additions and 164 deletions

View File

@@ -11,10 +11,9 @@
#ifndef _WX_GTK_PRIVATE_H_ #ifndef _WX_GTK_PRIVATE_H_
#define _WX_GTK_PRIVATE_H_ #define _WX_GTK_PRIVATE_H_
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/string.h" #include "wx/gtk/private/string.h"
#include "wx/gtk/private/gtk2-compat.h"
#ifndef G_VALUE_INIT #ifndef G_VALUE_INIT
// introduced in GLib 2.30 // introduced in GLib 2.30

View File

@@ -14,7 +14,7 @@
#include "wx/bmpbuttn.h" #include "wx/bmpbuttn.h"
#include "wx/toolbar.h" #include "wx/toolbar.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxAddRemoveImpl // wxAddRemoveImpl

View File

@@ -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 <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_

View File

@@ -38,8 +38,6 @@
typedef HWND wxNativeContainerWindowHandle; typedef HWND wxNativeContainerWindowHandle;
typedef HWND wxNativeWindowHandle; typedef HWND wxNativeWindowHandle;
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include <gtk/gtk.h>
// GdkNativeWindow is guint32 under GDK/X11 and gpointer under GDK/WIN32 // GdkNativeWindow is guint32 under GDK/X11 and gpointer under GDK/WIN32
#ifdef __UNIX__ #ifdef __UNIX__
typedef unsigned long wxNativeContainerWindowId; typedef unsigned long wxNativeContainerWindowId;

View File

@@ -143,6 +143,8 @@ protected:
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include <gtk/gtk.h>
class NativeWindow : public wxNativeWindow class NativeWindow : public wxNativeWindow
{ {
public: public:

View File

@@ -42,13 +42,8 @@
#endif #endif
#ifdef __WXGTK__ #ifdef __WXGTK__
#include <gtk/gtk.h>
#include "wx/renderer.h" #include "wx/renderer.h"
#ifdef __WXGTK20__ #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
#else
#define gtk_widget_is_drawable GTK_WIDGET_DRAWABLE
#endif
#ifdef __WXGTK3__ #ifdef __WXGTK3__
#include "wx/graphics.h" #include "wx/graphics.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"

View File

@@ -222,8 +222,7 @@ wxEND_EVENT_TABLE()
#else #else
// __WXGTK20__ // __WXGTK20__
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
static void static void
gtk_pseudo_window_realized_callback( GtkWidget *m_widget, void *WXUNUSED(win) ) gtk_pseudo_window_realized_callback( GtkWidget *m_widget, void *WXUNUSED(win) )

View File

@@ -36,8 +36,6 @@
#include "wx/gtk/dc.h" #include "wx/gtk/dc.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include <gtk/gtk.h>
#include "wx/aui/auibook.h" #include "wx/aui/auibook.h"
#include "wx/aui/tabartgtk.h" #include "wx/aui/tabartgtk.h"
#include "wx/renderer.h" #include "wx/renderer.h"

View File

@@ -42,12 +42,7 @@
#endif // __WXUNIVERSAL__ #endif // __WXUNIVERSAL__
#ifdef __WXGTK__ #ifdef __WXGTK__
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#if GTK_CHECK_VERSION(2,0,0)
#include "wx/gtk/private/gtk2-compat.h"
#else
#define gtk_widget_get_window(x) x->window
#endif
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/private.h" #include "wx/msw/private.h"
#elif defined(__WXX11__) #elif defined(__WXX11__)

View File

@@ -104,7 +104,7 @@
#endif #endif
#if wxUSE_GUI && defined(__WXGTK__) #if wxUSE_GUI && defined(__WXGTK__)
#include <gtk/gtk.h> // for GTK_XXX_VERSION constants #include "wx/gtk/private/wrapgtk.h" // for GTK_XXX_VERSION constants
#endif #endif
#if wxUSE_GUI && defined(__WXQT__) #if wxUSE_GUI && defined(__WXQT__)

View File

@@ -83,7 +83,7 @@ using namespace std;
#endif #endif
#ifdef __WXGTK__ #ifdef __WXGTK__
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#ifndef __WXGTK3__ #ifndef __WXGTK3__
#include "wx/gtk/dc.h" #include "wx/gtk/dc.h"

View File

@@ -18,7 +18,7 @@
#if wxUSE_SPLASH #if wxUSE_SPLASH
#ifdef __WXGTK20__ #ifdef __WXGTK20__
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#endif #endif
#include "wx/splash.h" #include "wx/splash.h"

View File

@@ -27,9 +27,7 @@
#endif #endif
#ifdef __WXGTK20__ #ifdef __WXGTK20__
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#endif #endif
// we only have to do it here when we use wxStatusBarGeneric in addition to the // we only have to do it here when we use wxStatusBarGeneric in addition to the

View File

@@ -26,9 +26,7 @@
#include "wx/window.h" #include "wx/window.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// GtkArray: temporary array of GTK strings // GtkArray: temporary array of GTK strings

View File

@@ -28,8 +28,7 @@
#include "wx/math.h" #include "wx/math.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
// Macro return the specified expression only if GTK+ run time version is less // 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 // than 2.20 and compiling it only if it is less than 3.0 (which is why this

View File

@@ -25,8 +25,6 @@
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/object.h" #include "wx/gtk/private/object.h"
#include <gtk/gtk.h>
// ============================================================================ // ============================================================================
// implementation // implementation

View File

@@ -18,8 +18,7 @@
#include "wx/stockitem.h" #include "wx/stockitem.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// GTK callbacks // GTK callbacks

View File

@@ -28,7 +28,6 @@
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/fontmap.h" #include "wx/fontmap.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/mimetype.h" #include "wx/gtk/mimetype.h"

View File

@@ -21,7 +21,6 @@
#include "wx/artprov.h" #include "wx/artprov.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#if !GTK_CHECK_VERSION(2,8,0) #if !GTK_CHECK_VERSION(2,8,0)

View File

@@ -10,10 +10,8 @@
#if wxDEBUG_LEVEL #if wxDEBUG_LEVEL
#include <gtk/gtk.h>
#include "wx/gtk/assertdlg_gtk.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/assertdlg_gtk.h"
#include "wx/gtk/private/mnemonics.h" #include "wx/gtk/private/mnemonics.h"
#include "wx/translation.h" #include "wx/translation.h"
#include "wx/stockitem.h" #include "wx/stockitem.h"

View File

@@ -23,8 +23,6 @@
#include "wx/gtk/private/object.h" #include "wx/gtk/private/object.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include <gtk/gtk.h>
GdkWindow* wxGetTopLevelGDK(); GdkWindow* wxGetTopLevelGDK();
#ifndef __WXGTK3__ #ifndef __WXGTK3__

View File

@@ -29,7 +29,6 @@
#include "wx/log.h" #include "wx/log.h"
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
// ============================================================================ // ============================================================================

View File

@@ -17,9 +17,7 @@
#include "wx/stockitem.h" #include "wx/stockitem.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/list.h" #include "wx/gtk/private/list.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -19,7 +19,7 @@
#include "wx/calctrl.h" #include "wx/calctrl.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
extern "C" { extern "C" {

View File

@@ -13,8 +13,7 @@
#include "wx/checkbox.h" #include "wx/checkbox.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/eventsdisabler.h" #include "wx/gtk/private/eventsdisabler.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -14,7 +14,6 @@
#include "wx/checklst.h" #include "wx/checklst.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/treeview.h" #include "wx/gtk/private/treeview.h"

View File

@@ -16,9 +16,7 @@
#include "wx/arrstr.h" #include "wx/arrstr.h"
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/eventsdisabler.h" #include "wx/gtk/private/eventsdisabler.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -20,7 +20,7 @@
#include "wx/clrpicker.h" #include "wx/clrpicker.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
// ============================================================================ // ============================================================================
// implementation // implementation

View File

@@ -23,9 +23,7 @@
#include "wx/sizer.h" #include "wx/sizer.h"
#include "wx/panel.h" #include "wx/panel.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #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 // 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 // another implementation of this class we should extract them to a common file

View File

@@ -23,9 +23,7 @@
#include "wx/intl.h" #include "wx/intl.h"
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/dialogcount.h" #include "wx/gtk/private/dialogcount.h"
extern "C" { extern "C" {

View File

@@ -20,9 +20,7 @@
#include "wx/arrstr.h" #include "wx/arrstr.h"
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// GTK callbacks // GTK callbacks

View File

@@ -22,7 +22,6 @@
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/sysopt.h" #include "wx/sysopt.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/mnemonics.h" #include "wx/gtk/private/mnemonics.h"

View File

@@ -18,9 +18,8 @@
#include "wx/log.h" #include "wx/log.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/object.h" #include "wx/gtk/private/object.h"
#include "wx/gtk/private/gtk2-compat.h"
GdkWindow* wxGetTopLevelGDK(); GdkWindow* wxGetTopLevelGDK();

View File

@@ -32,11 +32,9 @@
#include "wx/gtk/dcclient.h" #include "wx/gtk/dcclient.h"
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/event.h" #include "wx/gtk/private/event.h"
#include "wx/gtk/private/gdkconv.h" #include "wx/gtk/private/gdkconv.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/list.h" #include "wx/gtk/private/list.h"
#include "wx/gtk/private/treeview.h" #include "wx/gtk/private/treeview.h"
using namespace wxGTKImpl; using namespace wxGTKImpl;

View File

@@ -19,7 +19,7 @@
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/gtk/dc.h" #include "wx/gtk/dc.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
wxGTKCairoDCImpl::wxGTKCairoDCImpl(wxDC* owner) wxGTKCairoDCImpl::wxGTKCairoDCImpl(wxDC* owner)
: wxGCDCImpl(owner) : wxGCDCImpl(owner)

View File

@@ -11,7 +11,7 @@
#include "wx/gtk/dcmemory.h" #include "wx/gtk/dcmemory.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxMemoryDCImpl // wxMemoryDCImpl

View File

@@ -11,7 +11,7 @@
#include "wx/gtk/dcscreen.h" #include "wx/gtk/dcscreen.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxScreenDCImpl // wxScreenDCImpl

View File

@@ -19,8 +19,7 @@
#include "wx/scopedptr.h" #include "wx/scopedptr.h"
#include "wx/modalhook.h" #include "wx/modalhook.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/dialogcount.h" #include "wx/gtk/private/dialogcount.h"
wxDEFINE_TIED_SCOPED_PTR_TYPE(wxGUIEventLoop) wxDEFINE_TIED_SCOPED_PTR_TYPE(wxGUIEventLoop)

View File

@@ -14,11 +14,10 @@
#endif #endif
#include "wx/utils.h" // wxClientDisplayRect #include "wx/utils.h" // wxClientDisplayRect
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#endif #endif
#include "wx/gtk/private/gtk2-compat.h"
#if !defined(GDK_WINDOWING_WIN32) #if !defined(GDK_WINDOWING_WIN32)

View File

@@ -24,8 +24,7 @@
#include "wx/scopeguard.h" #include "wx/scopeguard.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// global data // global data

View File

@@ -34,8 +34,7 @@
#include "wx/private/eventloopsourcesmanager.h" #include "wx/private/eventloopsourcesmanager.h"
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
GdkWindow* wxGetTopLevelGDK(); GdkWindow* wxGetTopLevelGDK();

View File

@@ -19,7 +19,6 @@
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/mnemonics.h" #include "wx/gtk/private/mnemonics.h"

View File

@@ -28,10 +28,8 @@
#include "wx/filename.h" #include "wx/filename.h"
#include <glib.h>
#include <gtk/gtk.h>
#include "wx/gtk/private/string.h"
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/string.h"
// ============================================================================ // ============================================================================
// implementation // implementation

View File

@@ -25,7 +25,6 @@
#include "wx/filepicker.h" #include "wx/filepicker.h"
#include "wx/tooltip.h" #include "wx/tooltip.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
// ============================================================================ // ============================================================================

View File

@@ -17,8 +17,7 @@
#include "wx/statusbr.h" #include "wx/statusbr.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// event tables // event tables

View File

@@ -13,7 +13,7 @@
#include "wx/gauge.h" #include "wx/gauge.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxGauge // wxGauge

View File

@@ -15,9 +15,8 @@
#include "wx/glcanvas.h" #include "wx/glcanvas.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include "wx/gtk/private/gtk2-compat.h"
#if WXWIN_COMPATIBILITY_2_8 #if WXWIN_COMPATIBILITY_2_8

View File

@@ -29,7 +29,6 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -28,15 +28,14 @@
#include "wx/tooltip.h" #include "wx/tooltip.h"
#endif #endif
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/eventsdisabler.h" #include "wx/gtk/private/eventsdisabler.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/object.h" #include "wx/gtk/private/object.h"
#include "wx/gtk/private/treeentry_gtk.h" #include "wx/gtk/private/treeentry_gtk.h"
#include "wx/gtk/private/treeview.h" #include "wx/gtk/private/treeview.h"
#include <gdk/gdkkeysyms.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// data // data
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -25,9 +25,7 @@
#include "wx/accel.h" #include "wx/accel.h"
#include "wx/stockitem.h" #include "wx/stockitem.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/mnemonics.h" #include "wx/gtk/private/mnemonics.h"
// Number of currently open modal dialogs, defined in src/gtk/toplevel.cpp. // Number of currently open modal dialogs, defined in src/gtk/toplevel.cpp.

View File

@@ -13,11 +13,10 @@
#include "wx/gtk/mimetype.h" #include "wx/gtk/mimetype.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/string.h" #include "wx/gtk/private/string.h"
#include "wx/gtk/private/object.h" #include "wx/gtk/private/object.h"
#include "wx/gtk/private/gtk2-compat.h"
#if defined(__UNIX__) #if defined(__UNIX__)
wxString wxGTKMimeTypesManagerImpl::GetIconFromMimeType(const wxString& mime) wxString wxGTKMimeTypesManagerImpl::GetIconFromMimeType(const wxString& mime)

View File

@@ -24,8 +24,7 @@
#include "wx/gtk/dcclient.h" #include "wx/gtk/dcclient.h"
#endif #endif
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/gtk3-compat.h" #include "wx/gtk/private/gtk3-compat.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -25,7 +25,6 @@
#include "wx/modalhook.h" #include "wx/modalhook.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/messagetype.h" #include "wx/gtk/private/messagetype.h"
#include "wx/gtk/private/mnemonics.h" #include "wx/gtk/private/mnemonics.h"

View File

@@ -27,8 +27,7 @@
#include "wx/nativewin.h" #include "wx/nativewin.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h> #include <gdk/gdkx.h>

View File

@@ -31,8 +31,7 @@
#include "wx/graphics.h" #include "wx/graphics.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxNonOwnedWindowShapeImpl: base class for region and path-based classes. // wxNonOwnedWindowShapeImpl: base class for region and path-based classes.

View File

@@ -24,9 +24,7 @@
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxGtkNotebookPage // wxGtkNotebookPage

View File

@@ -16,7 +16,7 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/win_gtk.h" #include "wx/gtk/private/win_gtk.h"

View File

@@ -34,7 +34,7 @@
#include "wx/paper.h" #include "wx/paper.h"
#include "wx/modalhook.h" #include "wx/modalhook.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#if GTK_CHECK_VERSION(2,14,0) #if GTK_CHECK_VERSION(2,14,0)
#include <gtk/gtkunixprint.h> #include <gtk/gtkunixprint.h>
@@ -46,7 +46,6 @@
wxFORCE_LINK_THIS_MODULE(gtk_print) wxFORCE_LINK_THIS_MODULE(gtk_print)
#include "wx/gtk/private/object.h" #include "wx/gtk/private/object.h"
#include "wx/gtk/private/gtk2-compat.h"
// Useful to convert angles from degrees to radians. // Useful to convert angles from degrees to radians.
static const double DEG2RAD = M_PI / 180.0; static const double DEG2RAD = M_PI / 180.0;

View File

@@ -27,7 +27,6 @@
#include "wx/module.h" #include "wx/module.h"
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -17,10 +17,9 @@
#include "wx/tooltip.h" #include "wx/tooltip.h"
#endif #endif
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#include <gdk/gdkkeysyms.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxGTKRadioButtonInfo // wxGTKRadioButtonInfo

View File

@@ -13,9 +13,7 @@
#include "wx/radiobut.h" #include "wx/radiobut.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// data // data

View File

@@ -37,9 +37,7 @@
#include "wx/gtk/dc.h" #include "wx/gtk/dc.h"
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#if defined(__WXGTK3__) && !GTK_CHECK_VERSION(3,14,0) #if defined(__WXGTK3__) && !GTK_CHECK_VERSION(3,14,0)
#define GTK_STATE_FLAG_CHECKED (1 << 11) #define GTK_STATE_FLAG_CHECKED (1 << 11)

View File

@@ -18,8 +18,7 @@
#include "wx/scrolwin.h" #include "wx/scrolwin.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxScrollHelper implementation // wxScrollHelper implementation

View File

@@ -20,9 +20,8 @@
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/fontenum.h" #include "wx/fontenum.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/win_gtk.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); bool wxGetFrameExtents(GdkWindow* window, int* left, int* right, int* top, int* bottom);

View File

@@ -18,8 +18,7 @@
#include "wx/math.h" #include "wx/math.h"
#endif #endif
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/eventsdisabler.h" #include "wx/gtk/private/eventsdisabler.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -14,7 +14,7 @@
#include "wx/spinbutt.h" #include "wx/spinbutt.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// data // data

View File

@@ -20,9 +20,7 @@
#include "wx/wxcrtvararg.h" #include "wx/wxcrtvararg.h"
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// data // data

View File

@@ -13,7 +13,7 @@
#include "wx/statbmp.h" #include "wx/statbmp.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxStaticBitmap // wxStaticBitmap

View File

@@ -13,8 +13,7 @@
#include "wx/statbox.h" #include "wx/statbox.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/win_gtk.h" #include "wx/gtk/private/win_gtk.h"
// constants taken from GTK sources // constants taken from GTK sources

View File

@@ -13,8 +13,7 @@
#if wxUSE_STATLINE #if wxUSE_STATLINE
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include "wx/gtk/private/gtk2-compat.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxStaticLine // wxStaticLine

View File

@@ -13,7 +13,6 @@
#include "wx/stattext.h" #include "wx/stattext.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -23,14 +23,13 @@
#include "wx/icon.h" #include "wx/icon.h"
#endif #endif
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#endif #endif
#ifndef __WXGTK3__ #ifndef __WXGTK3__
#include "eggtrayicon.h" #include "eggtrayicon.h"
#endif #endif
#include "wx/gtk/private/gtk2-compat.h"
wxGCC_WARNING_SUPPRESS(deprecated-declarations) wxGCC_WARNING_SUPPRESS(deprecated-declarations)

View File

@@ -29,9 +29,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <ctype.h> #include <ctype.h>
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/gtk3-compat.h" #include "wx/gtk/private/gtk3-compat.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -33,9 +33,7 @@
#include "wx/textcompleter.h" #include "wx/textcompleter.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/object.h" #include "wx/gtk/private/object.h"
#include "wx/gtk/private/string.h" #include "wx/gtk/private/string.h"

View File

@@ -20,7 +20,6 @@
#include "wx/button.h" #include "wx/button.h"
#endif #endif
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/eventsdisabler.h" #include "wx/gtk/private/eventsdisabler.h"
#include "wx/gtk/private/list.h" #include "wx/gtk/private/list.h"

View File

@@ -14,7 +14,7 @@
#include "wx/gtk/private/timer.h" #include "wx/gtk/private/timer.h"
#include "wx/app.h" #include "wx/app.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxTimerImpl // wxTimerImpl

View File

@@ -14,9 +14,7 @@
#include "wx/toolbar.h" #include "wx/toolbar.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/gtk3-compat.h" #include "wx/gtk/private/gtk3-compat.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -32,18 +32,16 @@
#include "wx/evtloop.h" #include "wx/evtloop.h"
#include "wx/sysopt.h" #include "wx/sysopt.h"
#include <gtk/gtk.h> #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk3-compat.h"
#include "wx/gtk/private/win_gtk.h"
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include <X11/Xatom.h> // XA_CARDINAL #include <X11/Xatom.h> // XA_CARDINAL
#include "wx/unix/utilsx11.h" #include "wx/unix/utilsx11.h"
#endif #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 // data
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -25,7 +25,7 @@
#include "wx/gtk/private/timer.h" #include "wx/gtk/private/timer.h"
#include "wx/evtloop.h" #include "wx/evtloop.h"
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#ifdef GDK_WINDOWING_WIN32 #ifdef GDK_WINDOWING_WIN32
#include <gdk/gdkwin32.h> #include <gdk/gdkwin32.h>
#endif #endif
@@ -54,8 +54,6 @@
#include "wx/unix/utilsx11.h" #include "wx/unix/utilsx11.h"
#endif #endif
#include "wx/gtk/private/gtk2-compat.h"
GdkWindow* wxGetTopLevelGDK(); GdkWindow* wxGetTopLevelGDK();
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@@ -8,13 +8,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/defs.h"
#include <gtk/gtk.h>
#include "wx/gtk/private/win_gtk.h"
#include "wx/gtk/private.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 wxPizza is a custom GTK+ widget derived from GtkFixed. A custom widget

View File

@@ -37,16 +37,15 @@
#include <ctype.h> #include <ctype.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "wx/gtk/private.h" #include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
#include "wx/gtk/private/gtk3-compat.h" #include "wx/gtk/private/gtk3-compat.h"
#include "wx/gtk/private/event.h" #include "wx/gtk/private/event.h"
#include "wx/gtk/private/win_gtk.h" #include "wx/gtk/private/win_gtk.h"
#include "wx/private/textmeasure.h" #include "wx/private/textmeasure.h"
using namespace wxGTKImpl; using namespace wxGTKImpl;
#include <gdk/gdkkeysyms.h>
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include "wx/x11/private/wrapxkb.h" #include "wx/x11/private/wrapxkb.h"

View File

@@ -34,9 +34,8 @@
#include "wx/vector.h" // wxVector<wxString> #include "wx/vector.h" // wxVector<wxString>
#ifdef __WXGTK__ #ifdef __WXGTK__
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include "wx/gtk/private/gtk2-compat.h"
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -28,9 +28,8 @@
#include "wx/vector.h" // wxVector<wxString> #include "wx/vector.h" // wxVector<wxString>
#ifdef __WXGTK__ #ifdef __WXGTK__
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#include "wx/gtk/private/gtk2-compat.h"
#endif #endif
//============================================================================= //=============================================================================

View File

@@ -64,7 +64,7 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if defined(__WXGTK__) #if defined(__WXGTK__)
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#define GetDisplay() GDK_DISPLAY() #define GetDisplay() GDK_DISPLAY()
#define GetXWindow(wxwin) GDK_WINDOW_XWINDOW((wxwin)->m_widget->window) #define GetXWindow(wxwin) GDK_WINDOW_XWINDOW((wxwin)->m_widget->window)

View File

@@ -28,7 +28,7 @@
#include "wx/unix/utilsx11.h" #include "wx/unix/utilsx11.h"
#ifdef __WXGTK3__ #ifdef __WXGTK3__
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
GtkWidget* wxGetTopLevelGTK(); GtkWidget* wxGetTopLevelGTK();
#endif #endif

View File

@@ -37,12 +37,9 @@
#endif #endif
#ifdef __WXGTK__ #ifdef __WXGTK__
#include <gtk/gtk.h> #include "wx/gtk/private/wrapgtk.h"
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h> #include <gdk/gdkx.h>
#ifdef __WXGTK20__
#include "wx/gtk/private/gtk2-compat.h" // gdk_window_get_screen()
#endif
#endif #endif
GdkWindow* wxGetTopLevelGDK(); GdkWindow* wxGetTopLevelGDK();
GtkWidget* wxGetTopLevelGTK(); GtkWidget* wxGetTopLevelGTK();