KWayland

relativepointer_interface.cpp
1 /*
2  SPDX-FileCopyrightText: 2016 Martin Gräßlin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #include "relativepointer_interface_p.h"
7 
8 namespace KWayland
9 {
10 namespace Server
11 {
12 RelativePointerManagerInterface::Private::Private(RelativePointerInterfaceVersion interfaceVersion,
13  RelativePointerManagerInterface *q,
14  Display *d,
15  const wl_interface *interface,
16  quint32 version)
17  : Global::Private(d, interface, version)
18  , interfaceVersion(interfaceVersion)
19  , q(q)
20 {
21 }
22 
23 RelativePointerManagerInterface::RelativePointerManagerInterface(Private *d, QObject *parent)
24  : Global(d, parent)
25 {
26 }
27 
28 RelativePointerManagerInterface::~RelativePointerManagerInterface() = default;
29 
30 RelativePointerInterfaceVersion RelativePointerManagerInterface::interfaceVersion() const
31 {
32  Q_D();
33  return d->interfaceVersion;
34 }
35 
36 RelativePointerManagerInterface::Private *RelativePointerManagerInterface::d_func() const
37 {
38  return reinterpret_cast<Private *>(d.data());
39 }
40 
41 RelativePointerInterface::Private::Private(RelativePointerInterface *q,
42  Global *c,
43  wl_resource *parentResource,
44  const wl_interface *interface,
45  const void *implementation)
46  : Resource::Private(q, c, parentResource, interface, implementation)
47 {
48 }
49 
50 RelativePointerInterface::Private::~Private()
51 {
52  if (resource) {
53  wl_resource_destroy(resource);
54  resource = nullptr;
55  }
56 }
57 
58 RelativePointerInterface::RelativePointerInterface(Private *p, QObject *parent)
59  : Resource(p, parent)
60 {
61 }
62 
63 RelativePointerInterface::~RelativePointerInterface() = default;
64 
65 void RelativePointerInterface::relativeMotion(const QSizeF &delta, const QSizeF &deltaNonAccelerated, quint64 microseconds)
66 {
67  Q_D();
68  d->relativeMotion(delta, deltaNonAccelerated, microseconds);
69 }
70 
71 RelativePointerInterface::Private *RelativePointerInterface::d_func() const
72 {
73  return reinterpret_cast<Private *>(d.data());
74 }
75 
76 }
77 }
unsigned int version()
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 03:56:22 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.