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
4
#
include
"qwaylanddestroylistener.h"
5
#
include
"qwaylanddestroylistener_p.h"
6
7
QT_BEGIN_NAMESPACE
8
9
QWaylandDestroyListenerPrivate::QWaylandDestroyListenerPrivate()
10
{
11
listener.parent =
this
;
12
listener.listener.notify = handler;
13
wl_list_init(&listener.listener.link);
14
}
15
16
QWaylandDestroyListener::QWaylandDestroyListener(QObject *parent)
17
: QObject(*
new
QWaylandDestroyListenerPrivate(), parent)
18
{
19
}
20
void
QWaylandDestroyListener::listenForDestruction(::wl_resource *resource)
21
{
22
Q_D(QWaylandDestroyListener);
23
wl_resource_add_destroy_listener(resource, &d->listener.listener);
24
}
25
26
void
QWaylandDestroyListener::reset()
27
{
28
Q_D(QWaylandDestroyListener);
29
wl_list_remove(&d->listener.listener.link);
30
wl_list_init(&d->listener.listener.link);
31
}
32
33
void
QWaylandDestroyListenerPrivate::handler(wl_listener *listener,
void
*data)
34
{
35
QWaylandDestroyListenerPrivate *that =
reinterpret_cast
<Listener *>(listener)->parent;
36
emit that->q_func()->fired(data);
37
}
38
39
QT_END_NAMESPACE
40
41
#
include
"moc_qwaylanddestroylistener.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
qtwayland
src
compositor
compositor_api
qwaylanddestroylistener.cpp
Generated on
for Qt by
1.14.0