Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qwaylandtextinputv4_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWAYLANDTEXTINPUTV4_P_H
5#define QWAYLANDTEXTINPUTV4_P_H
6
7#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
8#include <QtWaylandCompositor/private/qwayland-server-text-input-unstable-v4-wip.h>
9#include <QtWaylandCompositor/QWaylandDestroyListener>
10
11#include <QtCore/QObject>
12#include <QtCore/QRect>
13#include <QtGui/QInputMethod>
14#include <QtWaylandCompositor/QWaylandSurface>
15
16//
17// W A R N I N G
18// -------------
19//
20// This file is not part of the Qt API. It exists purely as an
21// implementation detail. This header file may change from version to
22// version without notice, or even be removed.
23//
24// We mean it.
25//
26
28
30class QKeyEvent;
32class QWaylandView;
33
35public:
37
38 Qt::InputMethodQueries updatedQueries(const QWaylandTextInputV4ClientState &other) const;
39 Qt::InputMethodQueries mergeChanged(const QWaylandTextInputV4ClientState &other);
40
41 Qt::InputMethodHints hints = Qt::ImhNone;
46
47 Qt::InputMethodQueries changedState;
48};
49
50class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandTextInputV4Private : public QWaylandCompositorExtensionPrivate, public QtWaylandServer::zwp_text_input_v4
51{
52 Q_DECLARE_PUBLIC(QWaylandTextInputV4)
53public:
55
56 void sendInputMethodEvent(QInputMethodEvent *event);
57 void sendKeyEvent(QKeyEvent *event);
58
60
61 void setFocus(QWaylandSurface *surface);
62
64
66 Resource *focusResource = nullptr;
68
69 bool inputPanelVisible = false;
70
72
75
76 uint32_t serial = 0;
77
79
80protected:
81 void zwp_text_input_v4_bind_resource(Resource *resource) override;
82 void zwp_text_input_v4_destroy_resource(Resource *resource) override;
83
84 void zwp_text_input_v4_destroy(Resource *resource) override;
85 void zwp_text_input_v4_enable(Resource *resource) override;
86 void zwp_text_input_v4_disable(Resource *resource) override;
87 void zwp_text_input_v4_set_surrounding_text(Resource *resource, const QString &text, int32_t cursor, int32_t anchor) override;
88 void zwp_text_input_v4_set_text_change_cause(Resource *resource, uint32_t cause) override;
89 void zwp_text_input_v4_set_content_type(Resource *resource, uint32_t hint, uint32_t purpose) override;
90 void zwp_text_input_v4_set_cursor_rectangle(Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) override;
91 void zwp_text_input_v4_commit(Resource *resource) override;
92};
93
95
96#endif // QWAYLANDTEXTINPUTV4_P_H
\inmodule QtCore
Definition qhash.h:818
The QInputMethodEvent class provides parameters for input method events.
Definition qevent.h:624
The QKeyEvent class describes a key event.
Definition qevent.h:423
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore
Definition qvariant.h:64
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
Qt::InputMethodQueries mergeChanged(const QWaylandTextInputV4ClientState &other)
Qt::InputMethodQueries updatedQueries(const QWaylandTextInputV4ClientState &other) const
QScopedPointer< QWaylandTextInputV4ClientState > pendingState
QHash< Resource *, QWaylandSurface * > enabledSurfaces
QScopedPointer< QWaylandTextInputV4ClientState > currentState
QWaylandDestroyListener focusDestroyListener
\qmltype WaylandView \instantiates QWaylandView \inqmlmodule QtWayland.Compositor
QString text
bool focus
[0]
QCursor cursor
Combined button and popup list for selecting options.
InputMethodQuery
@ ImhNone
static QOpenGLCompositor * compositor
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLint GLsizei width
GLint y
struct _cl_event * event
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
const char property[13]
Definition qwizard.cpp:101
QSharedPointer< T > other(t)
[5]
QDBusArgument argument