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
qwaylanddestroylistener.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
"qwaylanddestroylistener.h"
6
#
include
"qwaylanddestroylistener_p.h"
7
8
QT_BEGIN_NAMESPACE
9
10
QWaylandDestroyListenerPrivate::QWaylandDestroyListenerPrivate()
11
{
12
listener.parent =
this
;
13
listener.listener.notify = handler;
14
wl_list_init(&listener.listener.link);
15
}
16
17
QWaylandDestroyListener::QWaylandDestroyListener(QObject *parent)
18
: QObject(*
new
QWaylandDestroyListenerPrivate(), parent)
19
{
20
}
21
void
QWaylandDestroyListener::listenForDestruction(::wl_resource *resource)
22
{
23
Q_D(QWaylandDestroyListener);
24
wl_resource_add_destroy_listener(resource, &d->listener.listener);
25
}
26
27
void
QWaylandDestroyListener::reset()
28
{
29
Q_D(QWaylandDestroyListener);
30
wl_list_remove(&d->listener.listener.link);
31
wl_list_init(&d->listener.listener.link);
32
}
33
34
void
QWaylandDestroyListenerPrivate::handler(wl_listener *listener,
void
*data)
35
{
36
QWaylandDestroyListenerPrivate *that =
reinterpret_cast
<Listener *>(listener)->parent;
37
emit that->q_func()->fired(data);
38
}
39
40
QT_END_NAMESPACE
41
42
#
include
"moc_qwaylanddestroylistener.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtwayland
src
compositor
compositor_api
qwaylanddestroylistener.cpp
Generated on
for Qt by
1.16.1