Move private platform interfaces to private QPA headers
They should not clutter the "public" QPA headers that clients use to implement new platforms, and having them in the private headers allows us to check for private configure features. Change-Id: Ib4b4db96c086d81bb5810392c7c8922fc5b4950d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>bb10
parent
3a475d48ee
commit
6034494070
|
|
@ -62,7 +62,7 @@ qt_add_module(Gui
|
|||
kernel/qplatformintegration.cpp kernel/qplatformintegration.h
|
||||
kernel/qplatformintegrationfactory.cpp kernel/qplatformintegrationfactory_p.h
|
||||
kernel/qplatformintegrationplugin.cpp kernel/qplatformintegrationplugin.h
|
||||
kernel/qplatformmenu.cpp kernel/qplatformmenu.h
|
||||
kernel/qplatformmenu.cpp kernel/qplatformmenu.h kernel/qplatformmenu_p.h
|
||||
kernel/qplatformnativeinterface.cpp kernel/qplatformnativeinterface.h
|
||||
kernel/qplatformoffscreensurface.cpp kernel/qplatformoffscreensurface.h
|
||||
kernel/qplatformscreen.cpp kernel/qplatformscreen.h kernel/qplatformscreen_p.h
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ qt_add_module(Gui
|
|||
kernel/qplatformintegration.cpp kernel/qplatformintegration.h
|
||||
kernel/qplatformintegrationfactory.cpp kernel/qplatformintegrationfactory_p.h
|
||||
kernel/qplatformintegrationplugin.cpp kernel/qplatformintegrationplugin.h
|
||||
kernel/qplatformmenu.cpp kernel/qplatformmenu.h
|
||||
kernel/qplatformmenu.cpp kernel/qplatformmenu.h kernel/qplatformmenu_p.h
|
||||
kernel/qplatformnativeinterface.cpp kernel/qplatformnativeinterface.h
|
||||
kernel/qplatformoffscreensurface.cpp kernel/qplatformoffscreensurface.h
|
||||
kernel/qplatformscreen.cpp kernel/qplatformscreen.h kernel/qplatformscreen_p.h
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ HEADERS += \
|
|||
kernel/qplatformclipboard.h \
|
||||
kernel/qplatformnativeinterface.h \
|
||||
kernel/qplatformmenu.h \
|
||||
kernel/qplatformmenu_p.h \
|
||||
kernel/qsurfaceformat.h \
|
||||
kernel/qguiapplication.h \
|
||||
kernel/qguiapplication_p.h \
|
||||
|
|
|
|||
|
|
@ -166,31 +166,6 @@ public:
|
|||
virtual QPlatformMenu *createMenu() const;
|
||||
};
|
||||
|
||||
// ----------------- QPlatformInterface -----------------
|
||||
|
||||
QT_END_NAMESPACE
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSMenu);
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
|
||||
#if defined(Q_OS_MACOS)
|
||||
struct Q_GUI_EXPORT QCocoaMenu
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaMenu)
|
||||
virtual NSMenu *nsMenu() const = 0;
|
||||
virtual void setAsDockMenu() const = 0;
|
||||
};
|
||||
|
||||
struct Q_GUI_EXPORT QCocoaMenuBar
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaMenuBar)
|
||||
virtual NSMenu *nsMenu() const = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QPLATFORMMENU_P_H
|
||||
#define QPLATFORMMENU_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtGui/private/qtguiglobal_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// ----------------- QPlatformInterface -----------------
|
||||
|
||||
QT_END_NAMESPACE
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSMenu);
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
|
||||
#if defined(Q_OS_MACOS)
|
||||
struct Q_GUI_EXPORT QCocoaMenu
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaMenu)
|
||||
virtual NSMenu *nsMenu() const = 0;
|
||||
virtual void setAsDockMenu() const = 0;
|
||||
};
|
||||
|
||||
struct Q_GUI_EXPORT QCocoaMenuBar
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaMenuBar)
|
||||
virtual NSMenu *nsMenu() const = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QPLATFORMMENU_P_H
|
||||
|
|
@ -172,21 +172,6 @@ protected:
|
|||
QScopedPointer<QPlatformWindowPrivate> d_ptr;
|
||||
};
|
||||
|
||||
// ----------------- QPlatformInterface -----------------
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
|
||||
#if defined(Q_OS_MACOS)
|
||||
struct Q_GUI_EXPORT QCocoaWindow
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaWindow)
|
||||
virtual void setContentBorderEnabled(bool enable) = 0;
|
||||
virtual QPoint bottomLeftClippedByNSWindowOffset() const = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QPLATFORMWINDOW_H
|
||||
|
|
|
|||
|
|
@ -64,6 +64,21 @@ public:
|
|||
QBasicTimer updateTimer;
|
||||
};
|
||||
|
||||
// ----------------- QPlatformInterface -----------------
|
||||
|
||||
namespace QPlatformInterface::Private {
|
||||
|
||||
#if defined(Q_OS_MACOS)
|
||||
struct Q_GUI_EXPORT QCocoaWindow
|
||||
{
|
||||
QT_DECLARE_PLATFORM_INTERFACE(QCocoaWindow)
|
||||
virtual void setContentBorderEnabled(bool enable) = 0;
|
||||
virtual QPoint bottomLeftClippedByNSWindowOffset() const = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // QPlatformInterface::Private
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QPLATFORMWINDOW_P_H
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@
|
|||
#include <QtGui/private/qguiapplication_p.h>
|
||||
#include <qpa/qplatformopenglcontext.h>
|
||||
#include <qpa/qplatformintegration.h>
|
||||
#include <qpa/qplatformwindow.h>
|
||||
#include <qpa/qplatformmenu.h>
|
||||
#include <qpa/qplatformwindow_p.h>
|
||||
#include <qpa/qplatformmenu_p.h>
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
#include <QtCore/QList>
|
||||
#include <qpa/qplatformmenu.h>
|
||||
#include <qpa/qplatformmenu_p.h>
|
||||
|
||||
#include "qcocoamenuitem.h"
|
||||
#include "qcocoansmenu.h"
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
#define QCOCOAWINDOW_H
|
||||
|
||||
#include <qpa/qplatformwindow.h>
|
||||
#include <qpa/qplatformwindow_p.h>
|
||||
#include <QRect>
|
||||
#include <QPointer>
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@
|
|||
#endif
|
||||
#include "qwidgetanimator_p.h"
|
||||
#include <QtGui/qpa/qplatformwindow.h>
|
||||
#include <QtGui/qpa/qplatformwindow_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ QT_USE_NAMESPACE
|
|||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QWindow>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
#include <qpa/qplatformmenu_p.h>
|
||||
|
||||
using namespace QPlatformInterface::Private;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue