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
qwaylandqttextinputmethodmanager.cpp
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
6
7#include <QtWaylandCompositor/QWaylandCompositor>
8#include <QtWaylandCompositor/QWaylandSeat>
9
11
13
17
18void QWaylandQtTextInputMethodManagerPrivate::text_input_method_manager_v1_get_text_input_method(Resource *resource, uint32_t id, struct ::wl_resource *seatResource)
19{
21 QWaylandCompositor *compositor = static_cast<QWaylandCompositor *>(q->extensionContainer());
22 QWaylandSeat *seat = QWaylandSeat::fromSeatResource(seatResource);
24 if (textInput == nullptr)
25 textInput = new QWaylandQtTextInputMethod(seat, compositor);
26 textInput->add(resource->client(), id, wl_resource_get_version(resource->handle));
27 QWaylandClient *client = QWaylandClient::fromWlClient(compositor, resource->client());
28 QWaylandClient::TextInputProtocols p = client->textInputProtocols();
30
31 if (!textInput->isInitialized())
32 textInput->initialize();
33}
34
70
75
77{
79
82 if (compositor == nullptr) {
83 qWarning() << "Failed to find QWaylandCompositor when initializing QWaylandQtTextInputMethodManager";
84 return;
85 }
86
87 d->init(compositor->display(), 1);
88}
89
91{
92 return QWaylandQtTextInputMethodManagerPrivate::interface();
93}
94
96{
97 return QWaylandQtTextInputMethodManagerPrivate::interfaceName();
98}
99
101
102#include "moc_qwaylandqttextinputmethodmanager.cpp"
\inmodule QtCore
Definition qbytearray.h:57
\qmltype WaylandClient \instantiates QWaylandClient \inqmlmodule QtWayland.Compositor
void setTextInputProtocols(TextInputProtocols p)
TextInputProtocols textInputProtocols() const
static QWaylandClient * fromWlClient(QWaylandCompositor *compositor, wl_client *wlClient)
Returns the QWaylandClient corresponding to the Wayland client wlClient and compositor.
static QWaylandQtTextInputMethod * findIn(QWaylandObject *container)
If any instance of the interface has been registered with container, this is returned.
virtual void initialize()
Initializes the QWaylandCompositorExtension.
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
void text_input_method_manager_v1_get_text_input_method(Resource *resource, uint32_t id, struct ::wl_resource *seat) override
\qmltype QtTextInputMethodManager \instantiates QWaylandQtTextInputMethodManager \inqmlmodule QtWayla...
static const struct wl_interface * interface()
void initialize() override
Initializes the QWaylandCompositorExtension.
void add(::wl_client *client, uint32_t id, int version)
\qmltype WaylandSeat \instantiates QWaylandSeat \inqmlmodule QtWayland.Compositor
static QWaylandSeat * fromSeatResource(struct ::wl_resource *resource)
Returns the QWaylandSeat corresponding to the resource.
Combined button and popup list for selecting options.
#define qWarning
Definition qlogging.h:166
static QOpenGLCompositor * compositor
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
GLfloat GLfloat p
[1]