| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2017 The Qt Company Ltd. |
| 4 | ** Contact: https://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the plugins of the Qt Toolkit. |
| 7 | ** |
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ |
| 9 | ** Commercial License Usage |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in |
| 11 | ** accordance with the commercial license agreement provided with the |
| 12 | ** Software or, alternatively, in accordance with the terms contained in |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at https://www.qt.io/contact-us. |
| 16 | ** |
| 17 | ** GNU Lesser General Public License Usage |
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser |
| 19 | ** General Public License version 3 as published by the Free Software |
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the |
| 21 | ** packaging of this file. Please review the following information to |
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements |
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. |
| 24 | ** |
| 25 | ** GNU General Public License Usage |
| 26 | ** Alternatively, this file may be used under the terms of the GNU |
| 27 | ** General Public License version 2.0 or (at your option) the GNU General |
| 28 | ** Public license version 3 or any later version approved by the KDE Free |
| 29 | ** Qt Foundation. The licenses are as published by the Free Software |
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 |
| 31 | ** included in the packaging of this file. Please review the following |
| 32 | ** information to ensure the GNU General Public License requirements will |
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and |
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. |
| 35 | ** |
| 36 | ** $QT_END_LICENSE$ |
| 37 | ** |
| 38 | ****************************************************************************/ |
| 39 | |
| 40 | #ifndef QGTK3MENU_H |
| 41 | #define |
| 42 | |
| 43 | #include <QtGui/qpa/qplatformmenu.h> |
| 44 | |
| 45 | typedef struct _GtkWidget GtkWidget; |
| 46 | typedef struct ; |
| 47 | typedef struct ; |
| 48 | |
| 49 | QT_BEGIN_NAMESPACE |
| 50 | |
| 51 | class QGtk3Menu; |
| 52 | |
| 53 | class : public QPlatformMenuItem |
| 54 | { |
| 55 | public: |
| 56 | (); |
| 57 | (); |
| 58 | |
| 59 | bool () const; |
| 60 | |
| 61 | GtkWidget *(); |
| 62 | GtkWidget *handle() const; |
| 63 | |
| 64 | QString () const; |
| 65 | void (const QString &text) override; |
| 66 | |
| 67 | QGtk3Menu *() const; |
| 68 | void (QPlatformMenu *) override; |
| 69 | |
| 70 | bool () const; |
| 71 | void (bool visible) override; |
| 72 | |
| 73 | bool () const; |
| 74 | void (bool separator) override; |
| 75 | |
| 76 | bool () const; |
| 77 | void (bool checkable) override; |
| 78 | |
| 79 | bool () const; |
| 80 | void (bool checked) override; |
| 81 | |
| 82 | #if QT_CONFIG(shortcut) |
| 83 | QKeySequence () const; |
| 84 | void (const QKeySequence &shortcut) override; |
| 85 | #endif |
| 86 | |
| 87 | bool () const; |
| 88 | void (bool enabled) override; |
| 89 | |
| 90 | bool () const; |
| 91 | void (bool exclusive) override; |
| 92 | |
| 93 | void (MenuRole role) override { Q_UNUSED(role); } |
| 94 | void (const QFont &font) override { Q_UNUSED(font); } |
| 95 | void (const QIcon &icon) override { Q_UNUSED(icon); } |
| 96 | void (int size) override { Q_UNUSED(size); } |
| 97 | |
| 98 | protected: |
| 99 | static void (GtkMenuItem *item, void *data); |
| 100 | static void (GtkMenuItem *item, void *data); |
| 101 | static void (GtkCheckMenuItem *item, void *data); |
| 102 | |
| 103 | private: |
| 104 | bool ; |
| 105 | bool ; |
| 106 | bool ; |
| 107 | bool ; |
| 108 | bool ; |
| 109 | bool ; |
| 110 | bool ; |
| 111 | bool ; |
| 112 | QGtk3Menu *; |
| 113 | GtkWidget *; |
| 114 | QString ; |
| 115 | #if QT_CONFIG(shortcut) |
| 116 | QKeySequence ; |
| 117 | #endif |
| 118 | }; |
| 119 | |
| 120 | class : public QPlatformMenu |
| 121 | { |
| 122 | Q_OBJECT |
| 123 | |
| 124 | public: |
| 125 | (); |
| 126 | (); |
| 127 | |
| 128 | GtkWidget *handle() const; |
| 129 | |
| 130 | void (QPlatformMenuItem *item, QPlatformMenuItem *before) override; |
| 131 | void (QPlatformMenuItem *item) override; |
| 132 | void (QPlatformMenuItem *item) override; |
| 133 | void (bool enable) override; |
| 134 | |
| 135 | void (bool enabled) override; |
| 136 | void (bool visible) override; |
| 137 | |
| 138 | void (const QIcon &icon) override { Q_UNUSED(icon); } |
| 139 | void (const QString &text) override { Q_UNUSED(text); } |
| 140 | |
| 141 | QPoint () const; |
| 142 | |
| 143 | void (const QWindow *parentWindow, const QRect &targetRect, const QPlatformMenuItem *item) override; |
| 144 | void () override; |
| 145 | |
| 146 | QPlatformMenuItem *(int position) const override; |
| 147 | QPlatformMenuItem *(quintptr tag) const override; |
| 148 | |
| 149 | QPlatformMenuItem *() const override; |
| 150 | QPlatformMenu *() const override; |
| 151 | |
| 152 | protected: |
| 153 | static void (GtkWidget *, void *data); |
| 154 | static void (GtkWidget *, void *data); |
| 155 | |
| 156 | private: |
| 157 | GtkWidget *; |
| 158 | QPoint ; |
| 159 | QList<QGtk3MenuItem *> ; |
| 160 | }; |
| 161 | |
| 162 | QT_END_NAMESPACE |
| 163 | |
| 164 | #endif // QGTK3MENU_H |
| 165 | |