Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandtextinputinterface_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 QWAYLANDTEXTINPUTINTERFACE_P_H
5#define QWAYLANDTEXTINPUTINTERFACE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qlocale.h>
19#include <QtCore/qrect.h>
20#include <QtCore/private/qglobal_p.h>
21
22struct wl_surface;
23
24QT_BEGIN_NAMESPACE
25
26namespace QtWaylandClient {
27
29{
30public:
32 virtual void reset() = 0;
33 virtual void commit() = 0;
34 virtual void disableSurface(::wl_surface *surface) = 0;
35 virtual void enableSurface(::wl_surface *surface) = 0;
36 virtual void updateState(Qt::InputMethodQueries queries, uint32_t flags) = 0;
37 virtual void showInputPanel() {}
38 virtual void hideInputPanel() {}
39 virtual bool isInputPanelVisible() const = 0;
40 virtual QRectF keyboardRect() const = 0;
41 virtual QLocale locale() const = 0;
42 virtual Qt::LayoutDirection inputDirection() const = 0;
43 virtual void setCursorInsidePreedit(int cursor) = 0;
44
45 // This enum should be compatible with update_state of text-input-unstable-v2.
46 // Higher versions of text-input-* protocol may not use it directly
47 // but QtWaylandClient can determine clients' states based on the values
49 update_state_change = 0, // updated state because it changed
50 update_state_full = 1, // full state after enter or input_method_changed event
51 update_state_reset = 2, // full state after reset
52 update_state_enter = 3, // full state after switching focus to a different widget on client side
53 };
54};
55
56}
57
58QT_END_NAMESPACE
59
60#endif // QWAYLANDTEXTINPUTINTERFACE_P_H
virtual void enableSurface(::wl_surface *surface)=0
virtual bool isInputPanelVisible() const =0
virtual QRectF keyboardRect() const =0
virtual void setCursorInsidePreedit(int cursor)=0
virtual void disableSurface(::wl_surface *surface)=0
virtual Qt::LayoutDirection inputDirection() const =0
virtual void updateState(Qt::InputMethodQueries queries, uint32_t flags)=0
void zwp_text_input_v1_language(uint32_t serial, const QString &language) override
void zwp_text_input_v1_keysym(uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) override
void zwp_text_input_v1_enter(struct ::wl_surface *surface) override
void zwp_text_input_v1_input_panel_state(uint32_t state) override
Qt::LayoutDirection inputDirection() const override
void disableSurface(::wl_surface *surface) override
void zwp_text_input_v1_cursor_position(int32_t index, int32_t anchor) override
void zwp_text_input_v1_modifiers_map(wl_array *map) override
void zwp_text_input_v1_preedit_string(uint32_t serial, const QString &text, const QString &commit) override
void enableSurface(::wl_surface *surface) override
void zwp_text_input_v1_commit_string(uint32_t serial, const QString &text) override
void zwp_text_input_v1_delete_surrounding_text(int32_t before_length, uint32_t after_length) override
void updateState(Qt::InputMethodQueries queries, uint32_t flags) override
void zwp_text_input_v1_preedit_cursor(int32_t index) override
void zwp_text_input_v1_text_direction(uint32_t serial, uint32_t direction) override
void zwp_text_input_v1_preedit_styling(uint32_t index, uint32_t length, uint32_t style) override
void setCursorInsidePreedit(int cursor) override
Combined button and popup list for selecting options.
Q_LOGGING_CATEGORY(lcQpaWayland, "qt.qpa.wayland")