textinput: Expose enums to moc

Allows us to pass them to qDebug easily.
This commit is contained in:
Aleix Pol 2021-05-21 19:13:12 +02:00
parent 93a4104b1e
commit 961debb513
4 changed files with 15 additions and 1 deletions

View file

@ -56,6 +56,7 @@ set(SERVER_LIB_SRCS
surface_interface.cpp
surfacerole.cpp
tablet_v2_interface.cpp
textinput.cpp
textinput_v2_interface.cpp
textinput_v3_interface.cpp
touch_interface.cpp

View file

@ -0,0 +1,7 @@
/*
SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "textinput.h"

View file

@ -8,13 +8,15 @@
#include <KWaylandServer/kwaylandserver_export.h>
#include <QtGlobal>
#include <qobjectdefs.h>
#include <QVariant>
#include <inttypes.h>
namespace KWaylandServer
{
KWAYLANDSERVER_EXPORT Q_NAMESPACE
Q_NAMESPACE_EXPORT(KWAYLANDSERVER_EXPORT)
/**
* ContentHint allows to modify the behavior of the text input.
*/
@ -66,6 +68,7 @@ enum class TextInputContentHint {
};
Q_DECLARE_FLAGS(TextInputContentHints, TextInputContentHint)
Q_ENUM_NS(TextInputContentHint)
/**
* The ContentPurpose allows to specify the primary purpose of a text input.
@ -131,6 +134,7 @@ enum class TextInputContentPurpose {
*/
Pin,
};
Q_ENUM_NS(TextInputContentPurpose)
enum class TextInputChangeCause {
/**
@ -143,6 +147,7 @@ enum class TextInputChangeCause {
*/
Other,
};
Q_ENUM_NS(TextInputChangeCause)
}

View file

@ -70,6 +70,7 @@ public:
StateReset = 2, // full state after reset
StateEnter = 3, // full state after switching focus to a different widget on client side
};
Q_ENUM(UpdateReason);
/**
* The preferred language as a RFC-3066 format language tag.
*