Merge branch 'wrap-gtk.h'

Add a wrapper for gtk/gtk.h allowing to avoid gcc 8 warnings when
including the GTK+ header directly.

See https://github.com/wxWidgets/wxWidgets/pull/814
This commit is contained in:
Vadim Zeitlin
2018-05-31 01:28:40 +02:00
87 changed files with 75 additions and 164 deletions

View File

@@ -11,10 +11,9 @@
#ifndef _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/gtk2-compat.h"
#ifndef G_VALUE_INIT
// introduced in GLib 2.30

View File

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

View File

@@ -539,6 +539,8 @@ static inline void wx_gtk_widget_get_preferred_size(GtkWidget* widget, GtkRequis
}
#define gtk_widget_get_preferred_size wx_gtk_widget_get_preferred_size
#include <gdk/gdkkeysyms.h>
#if defined(GDK_Alt_L) && !defined(GDK_KEY_Alt_L)
#define GDK_KEY_Alt_L GDK_Alt_L
#define GDK_KEY_Alt_R GDK_Alt_R

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 wxNativeWindowHandle;
#elif defined(__WXGTK__)
#include <gtk/gtk.h>
// GdkNativeWindow is guint32 under GDK/X11 and gpointer under GDK/WIN32
#ifdef __UNIX__
typedef unsigned long wxNativeContainerWindowId;