diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-17 22:15:07 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-20 17:47:39 +0200 |
commit | 9166abcd997f57625c17db8e8734988ff303217e (patch) | |
tree | fa8c97b1f5d89e7c64645a2d261b75ddfbbea18c /src/platformheaders/xcbfunctions | |
parent | 6034494070041baab95b835a2605c795f0d7166c (diff) |
Add QXcbWindow platform interface
Task-number: QTBUG-84220
Change-Id: I8bb4288f1ac06d77fb4f43ae091fa1712f694eeb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/platformheaders/xcbfunctions')
3 files changed, 0 insertions, 286 deletions
diff --git a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.qdoc b/src/platformheaders/xcbfunctions/qxcbwindowfunctions.qdoc deleted file mode 100644 index 5e2aa2cbf2..0000000000 --- a/src/platformheaders/xcbfunctions/qxcbwindowfunctions.qdoc +++ /dev/null @@ -1,165 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** 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 Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \class QXcbWindowFunctions - \inmodule QtPlatformHeaders - - \brief The QXcbWindowFunctions class is an inline class containing - miscellaneous functionality for xcb window specific functionality. - - A common usage pattern is as follows: - \snippet qxcbwindowfunctions/main.cpp 0 - - \note There is no binary compatibility guarantee for this class, - meaning that an application using it is only guaranteed to work with the Qt - version it was developed against. -*/ - -/*! - \enum QXcbWindowFunctions::WmWindowType - - This enum represents the supported WM_WINDOW_TYPE atoms. - - \value Normal - \value Desktop - \value Dock - \value Toolbar - \value Menu - \value Utility - \value Splash - \value Dialog - \value DropDownMenu - \value PopupMenu - \value Tooltip - \value Notification - \value Combo - \value Dnd - \value KdeOverride -*/ - -/*! - \typedef QXcbWindowFunctions::SetWmWindowType - - This is the typedef for the function returned by - QGuiApplication::platformFunction when passed the - value returned by setWmWindowTypeIdentifier(). -*/ - -/*! - \fn QByteArray QXcbWindowFunctions::setWmWindowTypeIdentifier() - - This function returns the byte array that can be used to query - QGuiApplication::platformFunction to retrieve the SetWmWindowType function. -*/ - -/*! - \fn void QXcbWindowFunctions::setWmWindowType(QWindow *window, WmWindowType type) - - This is a convenience function that can be used directly instead - of resolving the function pointer. \a window and \a type will be - relayed to the function retrieved by QGuiApplication. -*/ - -/*! - \typedef QXcbWindowFunctions::SetWmWindowRole - \since 5.6.2 - - This is the typedef for the function returned by - QGuiApplication::platformFunction when passed the - value returned by setWmWindowRoleIdentifier(). -*/ - -/*! - \fn QByteArray QXcbWindowFunctions::setWmWindowRoleIdentifier() - \since 5.6.2 - - This function returns the byte array that can be used to query - QGuiApplication::platformFunction to retrieve the SetWmWindowRole function. -*/ - -/*! - \fn void QXcbWindowFunctions::setWmWindowRole(QWindow *window, const QByteArray &role) - \since 5.6.2 - - Sets the WM_WINDOW_ROLE property from \a role on the corresponding - X11 window. - - This is a convenience function that can be used directly instead - of resolving the function pointer. \a window and \a role will be - relayed to the function retrieved by QGuiApplication. -*/ - -/*! - \typedef QXcbWindowFunctions::SetWmWindowIconText - - This is the typedef for the function returned by - QGuiApplication::platformFunction when passed the - value returned by setWmWindowIconTextIdentifier(). -*/ - -/*! - \fn const QByteArray QXcbWindowFunctions::setWmWindowIconTextIdentifier() - - This function returns the byte array that can be used to query - QGuiApplication::platformFunction to retrieve the SetWmWindowIconText function. -*/ - -/*! - \fn void QXcbWindowFunctions::setWmWindowIconText(QWindow *window, const QString& text) - - This is a convenience function that can be used directly instead - of resolving the function pointer. \a window and \a text will be - relayed to the function retrieved by QGuiApplication. -*/ - -/*! - \typedef QXcbWindowFunctions::VisualId - - This is the typedef for the function returned by - QGuiApplication::platformFunction when passed the - value returned by visualIdIdentifier(). -*/ - -/*! - \fn const QByteArray QXcbWindowFunctions::visualIdIdentifier() - - This function returns the byte array that can be used to query - QGuiApplication::platformFunction to retrieve the VisualId function. -*/ - -/*! - \fn uint QXcbWindowFunctions::visualId(QWindow *window) - - This is a convenience function that can be used directly instead - of resolving the function pointer. \a window will be - relayed to the function retrieved by QGuiApplication. - - Returns the unsigned integer result of calling the function or - UINT_MAX if the function was not found. -*/ - diff --git a/src/platformheaders/xcbfunctions/qxcbwindowfunctions_p.h b/src/platformheaders/xcbfunctions/qxcbwindowfunctions_p.h deleted file mode 100644 index 26b0798fc8..0000000000 --- a/src/platformheaders/xcbfunctions/qxcbwindowfunctions_p.h +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins 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 QXCBWINDOWFUNCTIONS_H -#define QXCBWINDOWFUNCTIONS_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 <QtPlatformHeaders/private/qplatformheaderhelper_p.h> - -QT_BEGIN_NAMESPACE - -class QWindow; - -class QXcbWindowFunctions { -public: - enum WmWindowType { - Normal = 0x000001, - Desktop = 0x000002, - Dock = 0x000004, - Toolbar = 0x000008, - Menu = 0x000010, - Utility = 0x000020, - Splash = 0x000040, - Dialog = 0x000080, - DropDownMenu = 0x000100, - PopupMenu = 0x000200, - Tooltip = 0x000400, - Notification = 0x000800, - Combo = 0x001000, - Dnd = 0x002000, - KdeOverride = 0x004000 - }; - - Q_DECLARE_FLAGS(WmWindowTypes, WmWindowType) - - typedef void (*SetWmWindowType)(QWindow *window, QXcbWindowFunctions::WmWindowTypes windowType); - static const QByteArray setWmWindowTypeIdentifier() { return QByteArrayLiteral("XcbSetWmWindowType"); } - static void setWmWindowType(QWindow *window, WmWindowType type) - { - return QPlatformHeaderHelper::callPlatformFunction<void, SetWmWindowType, QWindow *, WmWindowType>(setWmWindowTypeIdentifier(), window, type); - } - - typedef void (*SetWmWindowRole)(QWindow *window, const QByteArray &role); - static const QByteArray setWmWindowRoleIdentifier() { return QByteArrayLiteral("XcbSetWmWindowRole"); } - - static void setWmWindowRole(QWindow *window, const QByteArray &role) - { - return QPlatformHeaderHelper::callPlatformFunction<void, SetWmWindowRole, QWindow *, const QByteArray &>(setWmWindowRoleIdentifier(), window, role); - } - - typedef void (*SetWmWindowIconText)(QWindow *window, const QString &text); - static const QByteArray setWmWindowIconTextIdentifier() { return QByteArrayLiteral("XcbSetWmWindowIconText"); } - static void setWmWindowIconText(QWindow *window, const QString &text) - { - return QPlatformHeaderHelper::callPlatformFunction<void, SetWmWindowIconText, QWindow *, const QString &>(setWmWindowIconTextIdentifier(), window, text); - } - - typedef uint (*VisualId)(QWindow *window); - static const QByteArray visualIdIdentifier() { return QByteArrayLiteral("XcbVisualId"); } - - static uint visualId(QWindow *window) - { - QXcbWindowFunctions::VisualId func = reinterpret_cast<VisualId>(QGuiApplication::platformFunction(visualIdIdentifier())); - if (func) - return func(window); - return UINT_MAX; - } -}; - - -QT_END_NAMESPACE - -#endif // QXCBWINDOWFUNCTIONS_H diff --git a/src/platformheaders/xcbfunctions/xcbfunctions.pri b/src/platformheaders/xcbfunctions/xcbfunctions.pri deleted file mode 100644 index f3fdfe605e..0000000000 --- a/src/platformheaders/xcbfunctions/xcbfunctions.pri +++ /dev/null @@ -1,2 +0,0 @@ -HEADERS += \ - $$PWD/qxcbwindowfunctions_p.h |