diff options
author | Paul Olav Tvete <paul.tvete@digia.com> | 2013-03-04 10:16:42 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-05 08:31:23 +0100 |
commit | 97fcf3bc987a18f32233fea550eb4a5a22e2b822 (patch) | |
tree | 31d75557fdc4a525af8f5053db514066c63bd1bd /src/plugins/platforms/android/src/opengl/qandroidopenglplatformwindow.h | |
parent | 1b582d64eb6d13e60a02ebc40956302a4864eb6c (diff) |
Introducing the Qt Android port
Based on the Necessitas project by Bogdan Vatra.
Contributors to the Qt5 project:
BogDan Vatra <bogdan@kde.org>
Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
hjk <hjk121@nokiamail.com>
Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Paul Olav Tvete <paul.tvete@digia.com>
Robin Burchell <robin+qt@viroteck.net>
Samuel Rødal <samuel.rodal@digia.com>
Yoann Lopes <yoann.lopes@digia.com>
The full history of the Qt5 port can be found in refs/old-heads/android,
SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d
Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/plugins/platforms/android/src/opengl/qandroidopenglplatformwindow.h')
-rw-r--r-- | src/plugins/platforms/android/src/opengl/qandroidopenglplatformwindow.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/src/opengl/qandroidopenglplatformwindow.h b/src/plugins/platforms/android/src/opengl/qandroidopenglplatformwindow.h new file mode 100644 index 0000000000..b835cb3246 --- /dev/null +++ b/src/plugins/platforms/android/src/opengl/qandroidopenglplatformwindow.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QANDROIDOPENGLPLATFORMWINDOW_H +#define QANDROIDOPENGLPLATFORMWINDOW_H + +#include "qeglfswindow.h" +#include <QtCore/qmutex.h> + +QT_BEGIN_NAMESPACE + +class QAndroidOpenGLPlatformWindow : public QEglFSWindow +{ +public: + QAndroidOpenGLPlatformWindow(QWindow *window); + + QSize scheduledResize() const { return m_scheduledResize; } + void scheduleResize(const QSize &size) { m_scheduledResize = size; } + + void lock() { m_lock.lock(); } + void unlock() { m_lock.unlock(); } + + bool isExposed() const; + + void invalidateSurface(); + void resetSurface(); + +private: + QSize m_scheduledResize; + QMutex m_lock; +}; + +QT_END_NAMESPACE + +#endif // QANDROIDOPENGLPLATFORMWINDOW_H |