KWayland

pointergestures_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 "pointergestures_interface_p.h"
7 
8 namespace KWayland
9 {
10 namespace Server
11 {
12 
13 PointerGesturesInterface::Private::Private(PointerGesturesInterfaceVersion interfaceVersion, PointerGesturesInterface *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 PointerGesturesInterface::PointerGesturesInterface(Private *d, QObject *parent)
21  : Global(d, parent)
22 {
23 }
24 
25 PointerGesturesInterface::~PointerGesturesInterface() = default;
26 
27 PointerGesturesInterfaceVersion PointerGesturesInterface::interfaceVersion() const
28 {
29  Q_D();
30  return d->interfaceVersion;
31 }
32 
33 PointerGesturesInterface::Private *PointerGesturesInterface::d_func() const
34 {
35  return reinterpret_cast<Private*>(d.data());
36 }
37 
38 PointerSwipeGestureInterface::Private::Private(PointerSwipeGestureInterface *q, Global *c, wl_resource *parentResource, const wl_interface *interface, const void *implementation, PointerInterface *pointer)
39  : Resource::Private(q, c, parentResource, interface, implementation)
40  , pointer(pointer)
41 {
42 }
43 
44 PointerSwipeGestureInterface::Private::~Private()
45 {
46  if (resource) {
47  wl_resource_destroy(resource);
48  resource = nullptr;
49  }
50 }
51 
52 PointerSwipeGestureInterface::PointerSwipeGestureInterface(Private *p, QObject *parent)
53  : Resource(p, parent)
54 {
55 }
56 
57 PointerSwipeGestureInterface::~PointerSwipeGestureInterface() = default;
58 
59 PointerSwipeGestureInterface::Private *PointerSwipeGestureInterface::d_func() const
60 {
61  return reinterpret_cast<Private*>(d.data());
62 }
63 
64 PointerPinchGestureInterface::Private::Private(PointerPinchGestureInterface *q, Global *c, wl_resource *parentResource, const wl_interface *interface, const void *implementation, PointerInterface *pointer)
65  : Resource::Private(q, c, parentResource, interface, implementation)
66  , pointer(pointer)
67 {
68 }
69 
70 PointerPinchGestureInterface::Private::~Private()
71 {
72  if (resource) {
73  wl_resource_destroy(resource);
74  resource = nullptr;
75  }
76 }
77 
78 PointerPinchGestureInterface::PointerPinchGestureInterface(Private *p, QObject *parent)
79  : Resource(p, parent)
80 {
81 }
82 
83 PointerPinchGestureInterface::~PointerPinchGestureInterface() = default;
84 
85 PointerPinchGestureInterface::Private *PointerPinchGestureInterface::d_func() const
86 {
87  return reinterpret_cast<Private*>(d.data());
88 }
89 
90 }
91 }
PointerGesturesInterfaceVersion
Enum describing the interface versions the PointerGesturesInterface can support.
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
Resource for the wl_pointer interface.
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.