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
qwaylandsubsurface_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 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 QWAYLANDSUBSURFACE_H
5#define QWAYLANDSUBSURFACE_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/private/qglobal_p.h>
19#include <QtCore/qmutex.h>
20
21#include <QtWaylandClient/qtwaylandclientglobal.h>
22#include <QtWaylandClient/private/qwayland-wayland.h>
23
25
26namespace QtWaylandClient {
27
28class QWaylandDisplay;
29class QWaylandWindow;
30
31class Q_WAYLANDCLIENT_EXPORT QWaylandSubSurface : public QtWayland::wl_subsurface
32{
33public:
36
37 QWaylandWindow *window() const { return m_window; }
38 QWaylandWindow *parent() const { return m_parent; }
39
40 void setSync();
41 void setDeSync();
42 bool isSync() const { return m_synchronized; }
43 QMutex *syncMutex() { return &m_syncLock; }
44
45private:
46
47 // Intentionally hide public methods from ::wl_subsurface
48 // to keep track of the sync state
49 void set_sync();
50 void set_desync();
51 QWaylandWindow *m_window = nullptr;
52 QWaylandWindow *m_parent = nullptr;
53 bool m_synchronized = false;
55
56};
57
59
60}
61
62#endif // QWAYLANDSUBSURFACE_H
static int indexFromWayland(const QString &text, int length, int base=0)
void addPreeditStyling(uint32_t index, uint32_t length, uint32_t style)
QInputMethodEvent * buildCommit(const QString &text)
QInputMethodEvent * buildPreedit(const QString &text)
void setDeleteSurroundingText(uint32_t beforeLength, uint32_t afterLength)
void setCursorPosition(int32_t index, int32_t anchor)
static int trimmedIndexFromWayland(const QString &text, int length, int base=0)
static int indexToWayland(const QString &text, int length, int base=0)
void hideInputPanel() override
Request to hide input panel.
QRectF keyboardRect() const override
This function can be reimplemented to return virtual keyboard rectangle in currently active window co...
void reset() override
Method to be called when input method needs to be reset.
void showInputPanel() override
Request to show input panel.
Qt::LayoutDirection inputDirection() const override
void invokeAction(QInputMethod::Action, int cursorPosition) override
Called when the word currently being composed in the input item is tapped by the user.
void setFocusObject(QObject *object) override
This virtual method gets called to notify updated focus to object.
bool isValid() const override
Returns input context validity.
bool isInputPanelVisible() const override
Returns input panel visibility status.
void update(Qt::InputMethodQueries) override
Notification on editor updates.
void update(Qt::InputMethodQueries) override
Notification on editor updates.
Qt::LayoutDirection inputDirection() const override
bool isInputPanelVisible() const override
Returns input panel visibility status.
void reset() override
Method to be called when input method needs to be reset.
void setFocusObject(QObject *object) override
This virtual method gets called to notify updated focus to object.
void hideInputPanel() override
Request to hide input panel.
QRectF keyboardRect() const override
This function can be reimplemented to return virtual keyboard rectangle in currently active window co...
void showInputPanel() override
Request to show input panel.
bool isValid() const override
Returns input context validity.
void invokeAction(QInputMethod::Action, int cursorPosition) override
Called when the word currently being composed in the input item is tapped by the user.
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 text_input_method_v1_start_input_method_event(uint32_t serial, int32_t surrounding_text_offset) override
void text_input_method_v1_key(int32_t type, int32_t key, int32_t modifiers, int32_t autoRepeat, int32_t count, int32_t nativeScanCode, int32_t nativeVirtualKey, int32_t nativeModifiers, const QString &text) override
void text_input_method_v1_input_method_event_attribute(uint32_t serial, int32_t type, int32_t start, int32_t length, const QString &value) override
void text_input_method_v1_end_input_method_event(uint32_t serial, const QString &commitString, const QString &preeditString, int32_t replacementStart, int32_t replacementLength) override
void sendInputState(QInputMethodQueryEvent *state, Qt::InputMethodQueries queries=Qt::ImQueryInput)
void text_input_method_v1_keyboard_rectangle_changed(wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height) override
void text_input_method_v1_input_direction_changed(int32_t inputDirection) override
void text_input_method_v1_locale_changed(const QString &localeName) override
void text_input_method_v1_visible_changed(int32_t visible) override
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
void zwp_text_input_v2_keysym(uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) override
void zwp_text_input_v2_preedit_styling(uint32_t index, uint32_t length, uint32_t style) override
void updateState(Qt::InputMethodQueries queries, uint32_t flags) override
void enableSurface(::wl_surface *surface) override
void zwp_text_input_v2_delete_surrounding_text(uint32_t before_length, uint32_t after_length) override
void setCursorInsidePreedit(int cursor) override
void disableSurface(::wl_surface *surface) override
void zwp_text_input_v2_preedit_string(const QString &text, const QString &commit) override
void zwp_text_input_v2_input_method_changed(uint32_t serial, uint32_t flags) override
void zwp_text_input_v2_language(const QString &language) override
Qt::LayoutDirection inputDirection() const override
void zwp_text_input_v2_enter(uint32_t serial, struct ::wl_surface *surface) override
void zwp_text_input_v2_text_direction(uint32_t direction) override
void zwp_text_input_v2_modifiers_map(wl_array *map) override
void zwp_text_input_v2_commit_string(const QString &text) override
void zwp_text_input_v2_cursor_position(int32_t index, int32_t anchor) override
void zwp_text_input_v2_input_panel_state(uint32_t state, int32_t x, int32_t y, int32_t width, int32_t height) override
void zwp_text_input_v2_preedit_cursor(int32_t index) override
void zwp_text_input_v2_leave(uint32_t serial, struct ::wl_surface *surface) override
void disableSurface(::wl_surface *) override
void zwp_text_input_v3_commit_string(const QString &text) override
Qt::LayoutDirection inputDirection() const override
void updateState(Qt::InputMethodQueries queries, uint32_t flags) override
void zwp_text_input_v3_enter(struct ::wl_surface *surface) override
void zwp_text_input_v3_preedit_string(const QString &text, int32_t cursor_begin, int32_t cursor_end) override
void zwp_text_input_v3_delete_surrounding_text(uint32_t before_length, uint32_t after_length) override
void zwp_text_input_v3_leave(struct ::wl_surface *surface) override
void enableSurface(::wl_surface *) override
void setCursorInsidePreedit(int cursor) override
void zwp_text_input_v3_done(uint32_t serial) override
Combined button and popup list for selecting options.
Q_LOGGING_CATEGORY(lcQpaWayland, "qt.qpa.wayland")
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcher)
static QWaylandInputMethodContentType convert(Qt::InputMethodHints hints)
static QWaylandInputMethodContentType convertV3(Qt::InputMethodHints hints)