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
qwaylandbuffer.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// Copyright (C) 2017 Giulio Camuffo.
3
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
// Qt-Security score:significant reason:default
5
6
#
include
"qwaylandbuffer_p.h"
7
8
#
include
<
QDebug
>
9
10
QT_BEGIN_NAMESPACE
11
12
namespace
QtWaylandClient
{
13
14
QWaylandBuffer
::
QWaylandBuffer
()
15
{
16
}
17
18
QWaylandBuffer
::~
QWaylandBuffer
()
19
{
20
if
(
mBuffer
)
21
wl_buffer_destroy
(
mBuffer
);
22
}
23
24
void
QWaylandBuffer
::
init
(
wl_buffer
*
buf
)
25
{
26
mBuffer
=
buf
;
27
wl_buffer_add_listener
(
buf
, &
listener
,
this
);
28
}
29
30
void
QWaylandBuffer
::
release
(
void
*
data
,
wl_buffer
*)
31
{
32
QWaylandBuffer
*
self
=
static_cast
<
QWaylandBuffer
*>(
data
);
33
self
->
mBusy
=
false
;
34
self
->
mCommitted
=
false
;
35
if
(
self
->
mDeleteOnRelease
)
36
delete
self
;
37
}
38
39
void
QWaylandBuffer
::
setDeleteOnRelease
(
bool
deleteOnRelease
)
40
{
41
mDeleteOnRelease
=
deleteOnRelease
;
42
}
43
44
const
wl_buffer_listener
QWaylandBuffer
::
listener
= {
45
QWaylandBuffer
::
release
46
};
47
48
}
49
50
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
QtWaylandClient
Definition
qwaylandclientextension.h:16
qtbase
src
plugins
platforms
wayland
qwaylandbuffer.cpp
Generated on
for Qt by
1.16.1