Qt 6.x
The Qt SDK
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
5#include "qwaylandbuffer_p.h"
6
7#include <QDebug>
8
10
11namespace QtWaylandClient {
12
14{
15}
16
18{
19 if (mBuffer)
20 wl_buffer_destroy(mBuffer);
21}
22
23void QWaylandBuffer::init(wl_buffer *buf)
24{
25 mBuffer = buf;
26 wl_buffer_add_listener(buf, &listener, this);
27}
28
29void QWaylandBuffer::release(void *data, wl_buffer *)
30{
31 QWaylandBuffer *self = static_cast<QWaylandBuffer *>(data);
32 self->mBusy = false;
33 self->mCommitted = false;
34}
35
36const wl_buffer_listener QWaylandBuffer::listener = {
37 QWaylandBuffer::release
38};
39
40}
41
Combined button and popup list for selecting options.
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data