53class Q_WAYLANDCOMPOSITOR_EXPORT
QWaylandTextInputPrivate :
public QWaylandCompositorExtensionPrivate,
public QtWaylandServer::zwp_text_input_v2
55 Q_DECLARE_PUBLIC(QWaylandTextInput)
57 explicit QWaylandTextInputPrivate(QWaylandCompositor *compositor);
59 void sendInputMethodEvent(QInputMethodEvent *event);
60 void sendKeyEvent(QKeyEvent *event);
61 void sendInputPanelState();
62 void sendTextDirection();
64 void sendModifiersMap(
const QByteArray &modifiersMap);
66 QVariant inputMethodQuery(Qt::InputMethodQuery property, QVariant argument)
const;
68 void setFocus(QWaylandSurface *surface);
70 QWaylandCompositor *compositor =
nullptr;
72 QWaylandSurface *focus =
nullptr;
73 Resource *focusResource =
nullptr;
74 QWaylandDestroyListener focusDestroyListener;
76 bool inputPanelVisible =
false;
78 std::unique_ptr<QWaylandTextInputClientState> currentState;
79 std::unique_ptr<QWaylandTextInputClientState> pendingState;
83 QHash<Resource *, QWaylandSurface*> enabledSurfaces;
86 void zwp_text_input_v2_bind_resource(Resource *resource) override;
87 void zwp_text_input_v2_destroy_resource(Resource *resource) override;
89 void zwp_text_input_v2_destroy(Resource *resource) override;
90 void zwp_text_input_v2_enable(Resource *resource, wl_resource *surface) override;
91 void zwp_text_input_v2_disable(Resource *resource, wl_resource *surface) override;
92 void zwp_text_input_v2_show_input_panel(Resource *resource) override;
93 void zwp_text_input_v2_hide_input_panel(Resource *resource) override;
94 void zwp_text_input_v2_set_surrounding_text(Resource *resource,
const QString &text, int32_t cursor, int32_t anchor) override;
95 void zwp_text_input_v2_set_content_type(Resource *resource, uint32_t hint, uint32_t purpose) override;
96 void zwp_text_input_v2_set_cursor_rectangle(Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) override;
97 void zwp_text_input_v2_set_preferred_language(Resource *resource,
const QString &language) override;
98 void zwp_text_input_v2_update_state(Resource *resource, uint32_t serial, uint32_t flags) override;
101 quint32 shiftModifierMask = 1;
102 quint32 controlModifierMask = 2;
103 quint32 altModifierMask = 4;
104 quint32 metaModifierMask = 8;