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 
13 RelativePointerManagerInterface::Private::Private(RelativePointerInterfaceVersion interfaceVersion, RelativePointerManagerInterface *q, Display *d, const wl_interface *interface, quint32 version)
14  : Global::Private(d, interface, version)
15  , interfaceVersion(interfaceVersion)
16  , q(q)
17 {
18 }
19 
20 RelativePointerManagerInterface::RelativePointerManagerInterface(Private *d, QObject *parent)
21  : Global(d, parent)
22 {
23 }
24 
25 RelativePointerManagerInterface::~RelativePointerManagerInterface() = default;
26 
27 RelativePointerInterfaceVersion RelativePointerManagerInterface::interfaceVersion() const
28 {
29  Q_D();
30  return d->interfaceVersion;
31 }
32 
33 RelativePointerManagerInterface::Private *RelativePointerManagerInterface::d_func() const
34 {
35  return reinterpret_cast<Private*>(d.data());
36 }
37 
38 RelativePointerInterface::Private::Private(RelativePointerInterface *q, Global *c, wl_resource *parentResource, const wl_interface *interface, const void *implementation)
39  : Resource::Private(q, c, parentResource, interface, implementation)
40 {
41 }
42 
43 RelativePointerInterface::Private::~Private()
44 {
45  if (resource) {
46  wl_resource_destroy(resource);
47  resource = nullptr;
48  }
49 }
50 
51 RelativePointerInterface::RelativePointerInterface(Private *p, QObject *parent)
52  : Resource(p, parent)
53 {
54 }
55 
56 RelativePointerInterface::~RelativePointerInterface() = default;
57 
58 void RelativePointerInterface::relativeMotion(const QSizeF &delta, const QSizeF &deltaNonAccelerated, quint64 microseconds)
59 {
60  Q_D();
61  d->relativeMotion(delta, deltaNonAccelerated, microseconds);
62 }
63 
64 RelativePointerInterface::Private *RelativePointerInterface::d_func() const
65 {
66  return reinterpret_cast<Private*>(d.data());
67 }
68 
69 }
70 }
T * data() const const
Base class for all Globals.
Definition: global.h:46
Represents a bound Resource.
Definition: resource.h:32
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:48:19 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.