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
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"
QObjectData::parent
QObject * parent
Definition
qobject.h:73
QObject
\inmodule QtCore
Definition
qobject.h:103
QWaylandDestroyListenerPrivate
Definition
qwaylanddestroylistener_p.h:27
QWaylandDestroyListenerPrivate::handler
static void handler(wl_listener *listener, void *data)
Definition
qwaylanddestroylistener.cpp:33
QWaylandDestroyListenerPrivate::listener
Listener listener
Definition
qwaylanddestroylistener_p.h:39
QWaylandDestroyListenerPrivate::QWaylandDestroyListenerPrivate
QWaylandDestroyListenerPrivate()
Definition
qwaylanddestroylistener.cpp:9
QWaylandDestroyListener
Definition
qwaylanddestroylistener.h:18
QWaylandDestroyListener::reset
void reset()
Definition
qwaylanddestroylistener.cpp:26
QWaylandDestroyListener::QWaylandDestroyListener
QWaylandDestroyListener(QObject *parent=nullptr)
Definition
qwaylanddestroylistener.cpp:16
QWaylandDestroyListener::listenForDestruction
void listenForDestruction(struct wl_resource *resource)
Definition
qwaylanddestroylistener.cpp:20
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
data
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
Definition
qopengles2ext.h:206
emit
#define emit
Definition
qtmetamacros.h:49
qwaylanddestroylistener.h
qwaylanddestroylistener_p.h
d
double d
Definition
src_corelib_text_qlocale.cpp:9
QWaylandDestroyListenerPrivate::Listener
Definition
qwaylanddestroylistener_p.h:35
QWaylandDestroyListenerPrivate::Listener::parent
QWaylandDestroyListenerPrivate * parent
Definition
qwaylanddestroylistener_p.h:37
QWaylandDestroyListenerPrivate::Listener::listener
wl_listener listener
Definition
qwaylanddestroylistener_p.h:36
qtwayland
src
compositor
compositor_api
qwaylanddestroylistener.cpp
Generated by
1.10.0