Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwaylandqttextinputmethod_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDQTTEXTINPUTMETHOD_P_H
5#define QWAYLANDQTTEXTINPUTMETHOD_P_H
6
7
9
10#include <QtWaylandCompositor/private/qwaylandcompositorextension_p.h>
11#include <QtWaylandCompositor/private/qwayland-server-qt-text-input-method-unstable-v1.h>
12#include <QtWaylandCompositor/qwaylanddestroylistener.h>
13
14#include <QtCore/qrect.h>
15#include <QtCore/qhash.h>
16
17//
18// W A R N I N G
19// -------------
20//
21// This file is not part of the Qt API. It exists purely as an
22// implementation detail. This header file may change from version to
23// version without notice, or even be removed.
24//
25// We mean it.
26//
27
29
31class QWaylandSurface;
32
33class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandQtTextInputMethodPrivate : public QWaylandCompositorExtensionPrivate, public QtWaylandServer::qt_text_input_method_v1
34{
35 Q_DECLARE_PUBLIC(QWaylandQtTextInputMethod)
36public:
38
40 QWaylandSurface *focusedSurface = nullptr;
41 Resource *resource = nullptr;
42 QHash<Resource * , QWaylandSurface *> enabledSurfaces;
44 bool inputPanelVisible = false;
45 bool waitingForSync = false;
46
47 Qt::InputMethodQueries updatingQueries;
48 Qt::InputMethodHints hints;
52 int cursorPosition = 0;
53 int anchorPosition = 0;
54 int absolutePosition = 0;
55 int surroundingTextOffset = 0;
56
57private:
58 void text_input_method_v1_enable(Resource *resource, struct ::wl_resource *surface) override;
59 void text_input_method_v1_disable(Resource *resource, struct ::wl_resource *surface) override;
60 void text_input_method_v1_destroy(Resource *resource) override;
61 void text_input_method_v1_reset(Resource *resource) override;
62 void text_input_method_v1_commit(Resource *resource) override;
63 void text_input_method_v1_show_input_panel(Resource *resource) override;
64 void text_input_method_v1_hide_input_panel(Resource *resource) override;
65 void text_input_method_v1_update_hints(Resource *resource, int32_t hints) override;
66 void text_input_method_v1_update_surrounding_text(Resource *resource, const QString &surroundingText, int32_t surroundingTextOffset) override;
67 void text_input_method_v1_update_anchor_position(Resource *resource, int32_t anchorPosition) override;
68 void text_input_method_v1_update_cursor_position(Resource *resource, int32_t cursorPosition) override;
69 void text_input_method_v1_update_absolute_position(Resource *resource, int32_t absolutePosition) override;
70 void text_input_method_v1_invoke_action(Resource *resource, int32_t type, int32_t cursorPosition) override;
71 void text_input_method_v1_update_preferred_language(Resource *resource, const QString &preferredLanguage) override;
72 void text_input_method_v1_update_cursor_rectangle(Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) override;
73 void text_input_method_v1_start_update(Resource *resource, int32_t queries) override;
74 void text_input_method_v1_end_update(Resource *resource) override;
75 void text_input_method_v1_acknowledge_input_method(Resource *resource) override;
76};
77
79
80#endif // QWAYLANDQTTEXTINPUTMETHOD_P_H
\inmodule QtCore\reentrant
Definition qrect.h:30
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
QHash< Resource *, QWaylandSurface * > enabledSurfaces
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
Combined button and popup list for selecting options.
static QOpenGLCompositor * compositor
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLint GLsizei width
GLenum type
GLint y