summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@digia.com>2013-05-22 12:42:08 +0200
committerJørgen Lind <jorgen.lind@digia.com>2013-05-22 14:39:02 +0200
commitf7dfdc6b82da1900c485510768c8eb8376183349 (patch)
tree259bd9c9f690733fecda150afe8c847326808919 /src/compositor/wayland_wrapper
parentd01fb8d48f7caf524fa6958984f57b780ff1aa73 (diff)
Namespace Qt extensions qt_ instead of wl_
Change-Id: I6882f1747fa42b11e795252cba169f65e2fe08e5 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/compositor/wayland_wrapper')
-rw-r--r--src/compositor/wayland_wrapper/qwlextendedoutput.cpp26
-rw-r--r--src/compositor/wayland_wrapper/qwlextendedoutput_p.h10
-rw-r--r--src/compositor/wayland_wrapper/qwlextendedsurface.cpp22
-rw-r--r--src/compositor/wayland_wrapper/qwlextendedsurface_p.h4
-rw-r--r--src/compositor/wayland_wrapper/qwlqtkey.cpp2
-rw-r--r--src/compositor/wayland_wrapper/qwlqtkey_p.h2
-rw-r--r--src/compositor/wayland_wrapper/qwlsubsurface.cpp10
-rw-r--r--src/compositor/wayland_wrapper/qwlsubsurface_p.h4
-rw-r--r--src/compositor/wayland_wrapper/qwltouch.cpp10
-rw-r--r--src/compositor/wayland_wrapper/qwltouch_p.h2
10 files changed, 46 insertions, 46 deletions
diff --git a/src/compositor/wayland_wrapper/qwlextendedoutput.cpp b/src/compositor/wayland_wrapper/qwlextendedoutput.cpp
index 6c53afe0d..e376e0b48 100644
--- a/src/compositor/wayland_wrapper/qwlextendedoutput.cpp
+++ b/src/compositor/wayland_wrapper/qwlextendedoutput.cpp
@@ -49,17 +49,17 @@ QT_BEGIN_NAMESPACE
namespace QtWayland {
OutputExtensionGlobal::OutputExtensionGlobal(Compositor *compositor)
- : QtWaylandServer::wl_output_extension(compositor->wl_display())
+ : QtWaylandServer::qt_output_extension(compositor->wl_display())
, m_compositor(compositor)
{
}
-void OutputExtensionGlobal::output_extension_get_extended_output(wl_output_extension::Resource *resource, uint32_t id, wl_resource *output_resource)
+void OutputExtensionGlobal::output_extension_get_extended_output(qt_output_extension::Resource *resource, uint32_t id, wl_resource *output_resource)
{
Output *output = static_cast<Output *>(OutputGlobal::Resource::fromResource(output_resource));
Q_ASSERT(output->extendedOutput == 0);
- ExtendedOutput *extendedOutput = static_cast<ExtendedOutput *>(wl_extended_output::add(resource->client(), id));
+ ExtendedOutput *extendedOutput = static_cast<ExtendedOutput *>(qt_extended_output::add(resource->client(), id));
Q_ASSERT(!output->extendedOutput);
output->extendedOutput = extendedOutput;
@@ -68,19 +68,19 @@ void OutputExtensionGlobal::output_extension_get_extended_output(wl_output_exten
extendedOutput->sendOutputOrientation(m_compositor->screenOrientation());
}
-void OutputExtensionGlobal::extended_output_set_orientation_update_mask(wl_extended_output::Resource *resource,
+void OutputExtensionGlobal::extended_output_set_orientation_update_mask(qt_extended_output::Resource *resource,
int32_t orientation_update_mask)
{
ExtendedOutput *output = static_cast<ExtendedOutput *>(resource);
Qt::ScreenOrientations mask = 0;
- if (orientation_update_mask & WL_EXTENDED_OUTPUT_ROTATION_PORTRAITORIENTATION)
+ if (orientation_update_mask & QT_EXTENDED_OUTPUT_ROTATION_PORTRAITORIENTATION)
mask |= Qt::PortraitOrientation;
- if (orientation_update_mask & WL_EXTENDED_OUTPUT_ROTATION_LANDSCAPEORIENTATION)
+ if (orientation_update_mask & QT_EXTENDED_OUTPUT_ROTATION_LANDSCAPEORIENTATION)
mask |= Qt::LandscapeOrientation;
- if (orientation_update_mask & WL_EXTENDED_OUTPUT_ROTATION_INVERTEDPORTRAITORIENTATION)
+ if (orientation_update_mask & QT_EXTENDED_OUTPUT_ROTATION_INVERTEDPORTRAITORIENTATION)
mask |= Qt::InvertedPortraitOrientation;
- if (orientation_update_mask & WL_EXTENDED_OUTPUT_ROTATION_INVERTEDLANDSCAPEORIENTATION)
+ if (orientation_update_mask & QT_EXTENDED_OUTPUT_ROTATION_INVERTEDLANDSCAPEORIENTATION)
mask |= Qt::InvertedLandscapeOrientation;
Qt::ScreenOrientations oldMask = output->orientationUpdateMask;
@@ -100,19 +100,19 @@ void ExtendedOutput::sendOutputOrientation(Qt::ScreenOrientation orientation)
int sendOperation;
switch (orientation) {
case Qt::PortraitOrientation:
- sendOperation = WL_EXTENDED_OUTPUT_ROTATION_PORTRAITORIENTATION;
+ sendOperation = QT_EXTENDED_OUTPUT_ROTATION_PORTRAITORIENTATION;
break;
case Qt::LandscapeOrientation:
- sendOperation = WL_EXTENDED_OUTPUT_ROTATION_LANDSCAPEORIENTATION;
+ sendOperation = QT_EXTENDED_OUTPUT_ROTATION_LANDSCAPEORIENTATION;
break;
case Qt::InvertedPortraitOrientation:
- sendOperation = WL_EXTENDED_OUTPUT_ROTATION_INVERTEDPORTRAITORIENTATION;
+ sendOperation = QT_EXTENDED_OUTPUT_ROTATION_INVERTEDPORTRAITORIENTATION;
break;
case Qt::InvertedLandscapeOrientation:
- sendOperation = WL_EXTENDED_OUTPUT_ROTATION_INVERTEDLANDSCAPEORIENTATION;
+ sendOperation = QT_EXTENDED_OUTPUT_ROTATION_INVERTEDLANDSCAPEORIENTATION;
break;
default:
- sendOperation = WL_EXTENDED_OUTPUT_ROTATION_PORTRAITORIENTATION;
+ sendOperation = QT_EXTENDED_OUTPUT_ROTATION_PORTRAITORIENTATION;
}
extended_output->send_set_screen_rotation(handle, sendOperation);
diff --git a/src/compositor/wayland_wrapper/qwlextendedoutput_p.h b/src/compositor/wayland_wrapper/qwlextendedoutput_p.h
index 3bc418e90..d1704b8c5 100644
--- a/src/compositor/wayland_wrapper/qwlextendedoutput_p.h
+++ b/src/compositor/wayland_wrapper/qwlextendedoutput_p.h
@@ -56,7 +56,7 @@ namespace QtWayland {
class Compositor;
class Output;
-class ExtendedOutput : public QtWaylandServer::wl_extended_output::Resource
+class ExtendedOutput : public QtWaylandServer::qt_extended_output::Resource
{
public:
ExtendedOutput() : output(0) {}
@@ -67,7 +67,7 @@ public:
Qt::ScreenOrientations orientationUpdateMask;
};
-class OutputExtensionGlobal : public QtWaylandServer::wl_output_extension, public QtWaylandServer::wl_extended_output
+class OutputExtensionGlobal : public QtWaylandServer::qt_output_extension, public QtWaylandServer::qt_extended_output
{
public:
OutputExtensionGlobal(Compositor *compositor);
@@ -75,12 +75,12 @@ public:
private:
Compositor *m_compositor;
- wl_extended_output::Resource *extended_output_allocate() Q_DECL_OVERRIDE { return new ExtendedOutput; }
+ qt_extended_output::Resource *extended_output_allocate() Q_DECL_OVERRIDE { return new ExtendedOutput; }
- void extended_output_set_orientation_update_mask(wl_extended_output::Resource *resource,
+ void extended_output_set_orientation_update_mask(qt_extended_output::Resource *resource,
int32_t orientation_update_mask) Q_DECL_OVERRIDE;
- void output_extension_get_extended_output(wl_output_extension::Resource *resource,
+ void output_extension_get_extended_output(qt_output_extension::Resource *resource,
uint32_t id,
struct wl_resource *output_resource) Q_DECL_OVERRIDE;
};
diff --git a/src/compositor/wayland_wrapper/qwlextendedsurface.cpp b/src/compositor/wayland_wrapper/qwlextendedsurface.cpp
index 9f2260fce..19df7eb25 100644
--- a/src/compositor/wayland_wrapper/qwlextendedsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlextendedsurface.cpp
@@ -51,7 +51,7 @@ SurfaceExtensionGlobal::SurfaceExtensionGlobal(Compositor *compositor)
: m_compositor(compositor)
{
wl_display_add_global(m_compositor->wl_display(),
- &wl_surface_extension_interface,
+ &qt_surface_extension_interface,
this,
SurfaceExtensionGlobal::bind_func);
}
@@ -60,10 +60,10 @@ void SurfaceExtensionGlobal::bind_func(struct wl_client *client, void *data,
uint32_t version, uint32_t id)
{
Q_UNUSED(version);
- wl_client_add_object(client, &wl_surface_extension_interface,&surface_extension_interface,id,data);
+ wl_client_add_object(client, &qt_surface_extension_interface,&surface_extension_interface,id,data);
}
-const struct wl_surface_extension_interface SurfaceExtensionGlobal::surface_extension_interface = {
+const struct qt_surface_extension_interface SurfaceExtensionGlobal::surface_extension_interface = {
SurfaceExtensionGlobal::get_extended_surface
};
@@ -84,7 +84,7 @@ ExtendedSurface::ExtendedSurface(struct wl_client *client, uint32_t id, Surface
{
Q_ASSERT(surface->extendedSurface() == 0);
m_extended_surface_resource = wl_client_add_object(client,
- &wl_extended_surface_interface,
+ &qt_extended_surface_interface,
&extended_surface_interface,
id,
this);
@@ -105,14 +105,14 @@ void ExtendedSurface::sendGenericProperty(const QString &name, const QVariant &v
data.size = byteValue.size();
data.data = (void*) byteValue.constData();
data.alloc = 0;
- wl_extended_surface_send_set_generic_property(m_extended_surface_resource, qPrintable(name), &data);
+ qt_extended_surface_send_set_generic_property(m_extended_surface_resource, qPrintable(name), &data);
}
void ExtendedSurface::sendOnScreenVisibility(bool visible)
{
int32_t visibleInt = visible;
- wl_extended_surface_send_onscreen_visibility(m_extended_surface_resource, visibleInt);
+ qt_extended_surface_send_onscreen_visibility(m_extended_surface_resource, visibleInt);
}
@@ -131,10 +131,10 @@ void ExtendedSurface::update_generic_property(wl_client *client, wl_resource *ex
static Qt::ScreenOrientation screenOrientationFromWaylandOrientation(int32_t orientation)
{
switch (orientation) {
- case WL_EXTENDED_SURFACE_ORIENTATION_PORTRAITORIENTATION: return Qt::PortraitOrientation;
- case WL_EXTENDED_SURFACE_ORIENTATION_INVERTEDPORTRAITORIENTATION: return Qt::InvertedPortraitOrientation;
- case WL_EXTENDED_SURFACE_ORIENTATION_LANDSCAPEORIENTATION: return Qt::LandscapeOrientation;
- case WL_EXTENDED_SURFACE_ORIENTATION_INVERTEDLANDSCAPEORIENTATION: return Qt::InvertedLandscapeOrientation;
+ case QT_EXTENDED_SURFACE_ORIENTATION_PORTRAITORIENTATION: return Qt::PortraitOrientation;
+ case QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDPORTRAITORIENTATION: return Qt::InvertedPortraitOrientation;
+ case QT_EXTENDED_SURFACE_ORIENTATION_LANDSCAPEORIENTATION: return Qt::LandscapeOrientation;
+ case QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDLANDSCAPEORIENTATION: return Qt::InvertedLandscapeOrientation;
default: return Qt::PrimaryOrientation;
}
}
@@ -191,7 +191,7 @@ void ExtendedSurface::set_window_flags(wl_client *client, wl_resource *resource,
extended_surface->setWindowFlags(QWaylandSurface::WindowFlags(flags));
}
-const struct wl_extended_surface_interface ExtendedSurface::extended_surface_interface = {
+const struct qt_extended_surface_interface ExtendedSurface::extended_surface_interface = {
ExtendedSurface::update_generic_property,
ExtendedSurface::set_content_orientation,
ExtendedSurface::set_window_flags
diff --git a/src/compositor/wayland_wrapper/qwlextendedsurface_p.h b/src/compositor/wayland_wrapper/qwlextendedsurface_p.h
index 6dc60efb0..db9a2e8a4 100644
--- a/src/compositor/wayland_wrapper/qwlextendedsurface_p.h
+++ b/src/compositor/wayland_wrapper/qwlextendedsurface_p.h
@@ -72,7 +72,7 @@ private:
struct wl_resource *resource,
uint32_t id,
struct wl_resource *surface);
- static const struct wl_surface_extension_interface surface_extension_interface;
+ static const struct qt_surface_extension_interface surface_extension_interface;
};
@@ -128,7 +128,7 @@ private:
int32_t flags);
void setWindowFlags(QWaylandSurface::WindowFlags flags);
- static const struct wl_extended_surface_interface extended_surface_interface;
+ static const struct qt_extended_surface_interface extended_surface_interface;
};
}
diff --git a/src/compositor/wayland_wrapper/qwlqtkey.cpp b/src/compositor/wayland_wrapper/qwlqtkey.cpp
index 7a9e8586e..6ced27881 100644
--- a/src/compositor/wayland_wrapper/qwlqtkey.cpp
+++ b/src/compositor/wayland_wrapper/qwlqtkey.cpp
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
namespace QtWayland {
QtKeyExtensionGlobal::QtKeyExtensionGlobal(Compositor *compositor)
- : QtWaylandServer::wl_qtkey_extension(compositor->wl_display())
+ : QtWaylandServer::qt_key_extension(compositor->wl_display())
, m_compositor(compositor)
{
}
diff --git a/src/compositor/wayland_wrapper/qwlqtkey_p.h b/src/compositor/wayland_wrapper/qwlqtkey_p.h
index c9226c0ff..012ef3888 100644
--- a/src/compositor/wayland_wrapper/qwlqtkey_p.h
+++ b/src/compositor/wayland_wrapper/qwlqtkey_p.h
@@ -55,7 +55,7 @@ class QKeyEvent;
namespace QtWayland {
-class QtKeyExtensionGlobal : public QtWaylandServer::wl_qtkey_extension
+class QtKeyExtensionGlobal : public QtWaylandServer::qt_key_extension
{
public:
QtKeyExtensionGlobal(Compositor *compositor);
diff --git a/src/compositor/wayland_wrapper/qwlsubsurface.cpp b/src/compositor/wayland_wrapper/qwlsubsurface.cpp
index 060a7f0e5..145f86ab8 100644
--- a/src/compositor/wayland_wrapper/qwlsubsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlsubsurface.cpp
@@ -51,7 +51,7 @@ SubSurfaceExtensionGlobal::SubSurfaceExtensionGlobal(Compositor *compositor)
: m_compositor(compositor)
{
wl_display_add_global(m_compositor->wl_display(),
- &wl_sub_surface_extension_interface,
+ &qt_sub_surface_extension_interface,
this,
SubSurfaceExtensionGlobal::bind_func);
}
@@ -59,7 +59,7 @@ SubSurfaceExtensionGlobal::SubSurfaceExtensionGlobal(Compositor *compositor)
void SubSurfaceExtensionGlobal::bind_func(wl_client *client, void *data, uint32_t version, uint32_t id)
{
Q_UNUSED(version);
- wl_client_add_object(client, &wl_sub_surface_extension_interface,&sub_surface_extension_interface,id,data);
+ wl_client_add_object(client, &qt_sub_surface_extension_interface,&sub_surface_extension_interface,id,data);
}
void SubSurfaceExtensionGlobal::get_sub_surface_aware_surface(wl_client *client, wl_resource *sub_surface_extension_resource, uint32_t id, wl_resource *surface_resource)
@@ -69,7 +69,7 @@ void SubSurfaceExtensionGlobal::get_sub_surface_aware_surface(wl_client *client,
new SubSurface(client,id,surface);
}
-const struct wl_sub_surface_extension_interface SubSurfaceExtensionGlobal::sub_surface_extension_interface = {
+const struct qt_sub_surface_extension_interface SubSurfaceExtensionGlobal::sub_surface_extension_interface = {
SubSurfaceExtensionGlobal::get_sub_surface_aware_surface
};
@@ -79,7 +79,7 @@ SubSurface::SubSurface(wl_client *client, uint32_t id, Surface *surface)
{
surface->setSubSurface(this);
m_sub_surface_resource = wl_client_add_object(client,
- &wl_sub_surface_interface,
+ &qt_sub_surface_interface,
&sub_surface_interface,
id,
this);
@@ -178,7 +178,7 @@ void SubSurface::lower(wl_client *client, wl_resource *sub_surface_parent_resour
Q_UNUSED(sub_surface_child_resource);
}
-const struct wl_sub_surface_interface SubSurface::sub_surface_interface = {
+const struct qt_sub_surface_interface SubSurface::sub_surface_interface = {
SubSurface::attach_sub_surface,
SubSurface::move_sub_surface,
SubSurface::raise,
diff --git a/src/compositor/wayland_wrapper/qwlsubsurface_p.h b/src/compositor/wayland_wrapper/qwlsubsurface_p.h
index 4fb80d611..6f6ad1202 100644
--- a/src/compositor/wayland_wrapper/qwlsubsurface_p.h
+++ b/src/compositor/wayland_wrapper/qwlsubsurface_p.h
@@ -69,7 +69,7 @@ private:
uint32_t id,
struct wl_resource *surface_resource);
- static const struct wl_sub_surface_extension_interface sub_surface_extension_interface;
+ static const struct qt_sub_surface_extension_interface sub_surface_extension_interface;
};
class SubSurface
@@ -113,7 +113,7 @@ private:
static void lower(struct wl_client *client,
struct wl_resource *sub_surface_parent_resource,
struct wl_resource *sub_surface_child_resource);
- static const struct wl_sub_surface_interface sub_surface_interface;
+ static const struct qt_sub_surface_interface sub_surface_interface;
};
inline Surface *SubSurface::surface() const
diff --git a/src/compositor/wayland_wrapper/qwltouch.cpp b/src/compositor/wayland_wrapper/qwltouch.cpp
index 47886890f..7142c985e 100644
--- a/src/compositor/wayland_wrapper/qwltouch.cpp
+++ b/src/compositor/wayland_wrapper/qwltouch.cpp
@@ -51,7 +51,7 @@ static void dummy(wl_client *, wl_resource *)
{
}
-const struct wl_touch_extension_interface TouchExtensionGlobal::touch_interface = {
+const struct qt_touch_extension_interface TouchExtensionGlobal::touch_interface = {
dummy
};
@@ -65,7 +65,7 @@ TouchExtensionGlobal::TouchExtensionGlobal(Compositor *compositor)
m_rawdata_ptr = static_cast<float *>(wl_array_add(&m_rawdata_array, maxRawPos * sizeof(float) * 2));
wl_display_add_global(compositor->wl_display(),
- &wl_touch_extension_interface,
+ &qt_touch_extension_interface,
this,
TouchExtensionGlobal::bind_func);
}
@@ -85,11 +85,11 @@ void TouchExtensionGlobal::destroy_resource(wl_resource *resource)
void TouchExtensionGlobal::bind_func(wl_client *client, void *data, uint32_t version, uint32_t id)
{
Q_UNUSED(version);
- wl_resource *resource = wl_client_add_object(client, &wl_touch_extension_interface, &touch_interface, id, data);
+ wl_resource *resource = wl_client_add_object(client, &qt_touch_extension_interface, &touch_interface, id, data);
resource->destroy = destroy_resource;
TouchExtensionGlobal *self = static_cast<TouchExtensionGlobal *>(resource->data);
self->m_resources.append(resource);
- wl_touch_extension_send_configure(resource, self->m_flags);
+ qt_touch_extension_send_configure(resource, self->m_flags);
}
static inline int toFixed(qreal f)
@@ -162,7 +162,7 @@ bool TouchExtensionGlobal::postTouchEvent(QTouchEvent *event, Surface *surface)
}
}
- wl_touch_extension_send_touch(target,
+ qt_touch_extension_send_touch(target,
time, id, state,
x, y, nx, ny, w, h,
pressure, vx, vy,
diff --git a/src/compositor/wayland_wrapper/qwltouch_p.h b/src/compositor/wayland_wrapper/qwltouch_p.h
index 09c9a0898..955aa5f8a 100644
--- a/src/compositor/wayland_wrapper/qwltouch_p.h
+++ b/src/compositor/wayland_wrapper/qwltouch_p.h
@@ -69,7 +69,7 @@ private:
static void destroy_resource(wl_resource *resource);
- static const struct wl_touch_extension_interface touch_interface;
+ static const struct qt_touch_extension_interface touch_interface;
Compositor *m_compositor;
int m_flags;