summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandextendedoutput.h
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-12-19 10:51:12 +0100
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-12-20 13:58:55 +0100
commit317d72460806e86cacdb46ebe9c0b034b06a1cf4 (patch)
treef2aea2381a46c30276acaf67f358f5969f26f52c /src/plugins/platforms/wayland/qwaylandextendedoutput.h
parenta318254dfb7c15ed92d38c5d5cf94d9de893dfb4 (diff)
Added surface_extension and output_extension
This is an atempt on removing WindowManagerIntegration and create more specialised extensions. Hopefully it will reduce tha "map lookups" we have all because of the windowmanagerintegration is way to generic, and hopefully it will make it easier to ready and understand the code Change-Id: I126c430e87909e4520f6d241c0a6023214cb509a Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandextendedoutput.h')
-rw-r--r--src/plugins/platforms/wayland/qwaylandextendedoutput.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandextendedoutput.h b/src/plugins/platforms/wayland/qwaylandextendedoutput.h
new file mode 100644
index 000000000..e6288a6c3
--- /dev/null
+++ b/src/plugins/platforms/wayland/qwaylandextendedoutput.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDEXTENDEDOUTPUT_H
+#define QWAYLANDEXTENDEDOUTPUT_H
+
+#include "qwaylanddisplay.h"
+
+class QWaylandExtendedOutput;
+
+class QWaylandOutputExtension
+{
+public:
+ QWaylandOutputExtension(QWaylandDisplay *display, uint32_t id);
+
+ QWaylandExtendedOutput* getExtendedOutput(QWaylandScreen *screen);
+private:
+ struct wl_output_extension *m_output_extension;
+};
+
+class QWaylandExtendedOutput
+{
+public:
+ QWaylandExtendedOutput(QWaylandScreen *screen, struct wl_extended_output *extended_output);
+
+ Qt::ScreenOrientation currentOrientation() const;
+private:
+ struct wl_extended_output *m_extended_output;
+ QWaylandScreen *m_screen;
+ Qt::ScreenOrientation m_orientation;
+
+ static void set_screen_rotation(void *data,
+ struct wl_extended_output *wl_extended_output,
+ int32_t rotation);
+ static const struct wl_extended_output_listener extended_output_listener;
+};
+
+
+#endif // QWAYLANDEXTENDEDOUTPUT_H