| 1 | // Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #include "qwaylandshell.h" |
| 5 | #include "qwaylandshell_p.h" |
| 6 | |
| 7 | QT_BEGIN_NAMESPACE |
| 8 | |
| 9 | QWaylandShellPrivate::QWaylandShellPrivate() |
| 10 | { |
| 11 | } |
| 12 | |
| 13 | QWaylandShell::QWaylandShell() |
| 14 | { |
| 15 | } |
| 16 | |
| 17 | QWaylandShell::QWaylandShell(QWaylandObject *waylandObject) |
| 18 | : QWaylandCompositorExtension(waylandObject, *new QWaylandShellPrivate()) |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | /*! |
| 23 | * \enum QWaylandShell::FocusPolicy |
| 24 | * |
| 25 | * This enum type is used to specify the focus policy for shell surfaces. |
| 26 | * |
| 27 | * \value AutomaticFocus Shell surfaces will automatically get keyboard focus when they are created. |
| 28 | * \value ManualFocus The compositor will decide whether shell surfaces should get keyboard focus or not. |
| 29 | */ |
| 30 | |
| 31 | /*! |
| 32 | * \qmlproperty enumeration Shell::focusPolicy |
| 33 | * |
| 34 | * This property holds the focus policy of the Shell. |
| 35 | */ |
| 36 | |
| 37 | /*! |
| 38 | * \property QWaylandShell::focusPolicy |
| 39 | * |
| 40 | * This property holds the focus policy of the QWaylandShell. |
| 41 | */ |
| 42 | QWaylandShell::FocusPolicy QWaylandShell::focusPolicy() const |
| 43 | { |
| 44 | Q_D(const QWaylandShell); |
| 45 | return d->focusPolicy; |
| 46 | } |
| 47 | |
| 48 | void QWaylandShell::setFocusPolicy(QWaylandShell::FocusPolicy focusPolicy) |
| 49 | { |
| 50 | Q_D(QWaylandShell); |
| 51 | |
| 52 | if (d->focusPolicy == focusPolicy) |
| 53 | return; |
| 54 | |
| 55 | d->focusPolicy = focusPolicy; |
| 56 | emit focusPolicyChanged(); |
| 57 | } |
| 58 | |
| 59 | QWaylandShell::QWaylandShell(QWaylandShellPrivate &dd) |
| 60 | : QWaylandCompositorExtension(dd) |
| 61 | { |
| 62 | } |
| 63 | |
| 64 | QWaylandShell::QWaylandShell(QWaylandObject *container, QWaylandShellPrivate &dd) |
| 65 | : QWaylandCompositorExtension(container, dd) |
| 66 | { |
| 67 | } |
| 68 | |
| 69 | QT_END_NAMESPACE |
| 70 | |
| 71 | #include "moc_qwaylandshell.cpp" |
| 72 |
