summaryrefslogtreecommitdiffstats
path: root/src/compositor/global
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2013-04-18 16:37:19 +0200
committerSamuel Rødal <samuel.rodal@digia.com>2013-04-23 14:18:36 +0200
commit755fac09a8656545c272528e531ba4732154ae3c (patch)
tree735744938d7149b9c1d799bfcd7d0ca03759d8a6 /src/compositor/global
parentc2d41eee09a1c88641c6f866528c661728a0bf2f (diff)
Adapted Surface and Region to use the qtwaylandscanner.
This requires some slight additions to the qtwaylandscanner to handle the pattern of the wl_resource not being owned by the generated class. Change-Id: Ia49c8129cee3a203ca9a727e83fafd3dfc653e75 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/compositor/global')
-rw-r--r--src/compositor/global/qwaylandobject.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/compositor/global/qwaylandobject.h b/src/compositor/global/qwaylandobject.h
index 6d93297a1..9b3450397 100644
--- a/src/compositor/global/qwaylandobject.h
+++ b/src/compositor/global/qwaylandobject.h
@@ -60,38 +60,8 @@ public:
const T *base() const { return this; }
T *base() { return this; }
-
- template <typename Implementation>
- void addClientResource(wl_client *client,
- wl_resource *resource,
- int id, const struct wl_interface *interface,
- Implementation implementation,
- void (*destroy)(struct wl_resource *resource))
- {
- resource->object.id = id;
- resource->object.interface = interface;
- resource->object.implementation = (void (**)(void))implementation;
- resource->data = this;
- resource->destroy = destroy;
-
- wl_client_add_resource(client, resource);
- }
};
-template <typename T>
-T *resolve(wl_resource *from)
-{
- Object<typename T::Base> *object = reinterpret_cast<Object<typename T::Base> *>(from->data);
- return static_cast<T *>(object);
-}
-
-template <typename T>
-T *wayland_cast(typename T::Base *from)
-{
- Object<typename T::Base> *object = reinterpret_cast<Object<typename T::Base> *>(from);
- return static_cast<T *>(object);
-}
-
}
QT_END_NAMESPACE