2013-08-09 15:04:52 +02:00
|
|
|
/*
|
|
|
|
* \brief QNitpickerIntegration
|
|
|
|
* \author Christian Prochaska
|
|
|
|
* \date 2013-05-08
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2013-2017 Genode Labs GmbH
|
2013-08-09 15:04:52 +02:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 13:23:52 +01:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2013-08-09 15:04:52 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _QNITPICKERINTEGRATION_H_
|
|
|
|
#define _QNITPICKERINTEGRATION_H_
|
|
|
|
|
2013-11-25 19:02:52 +01:00
|
|
|
#include <QOpenGLContext>
|
|
|
|
|
2013-08-09 15:04:52 +02:00
|
|
|
#include <qpa/qplatformintegration.h>
|
|
|
|
#include <qpa/qplatformscreen.h>
|
2017-08-14 11:14:43 +02:00
|
|
|
#include <qpa/qplatforminputcontext.h>
|
2013-08-09 15:04:52 +02:00
|
|
|
|
|
|
|
#include "qnitpickerscreen.h"
|
2015-09-21 15:07:36 +02:00
|
|
|
#include "qsignalhandlerthread.h"
|
2013-08-09 15:04:52 +02:00
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
|
|
|
class QNitpickerIntegration : public QPlatformIntegration
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
2017-05-23 14:39:08 +02:00
|
|
|
Genode::Env &_env;
|
|
|
|
|
2015-09-21 15:07:36 +02:00
|
|
|
QSignalHandlerThread _signal_handler_thread;
|
|
|
|
|
2013-08-09 15:04:52 +02:00
|
|
|
QNitpickerScreen *_nitpicker_screen;
|
|
|
|
|
2015-09-21 15:07:36 +02:00
|
|
|
/*
|
|
|
|
* A reference to the signal receiver gets passed to newly created
|
|
|
|
* objects, for example in 'createPlatformWindow()'. Since this is
|
|
|
|
* a const member function, the signal receiver cannot be a member
|
|
|
|
* variable of QNitpickerIntegration.
|
|
|
|
*/
|
|
|
|
static Genode::Signal_receiver &_signal_receiver();
|
2017-08-14 11:14:43 +02:00
|
|
|
QScopedPointer<QPlatformInputContext> m_inputContext;
|
2015-09-21 15:07:36 +02:00
|
|
|
|
2013-08-09 15:04:52 +02:00
|
|
|
public:
|
|
|
|
|
2017-05-23 14:39:08 +02:00
|
|
|
QNitpickerIntegration(Genode::Env &env);
|
2013-08-09 15:04:52 +02:00
|
|
|
|
2017-05-22 14:50:09 +02:00
|
|
|
void initialize() Q_DECL_OVERRIDE;
|
|
|
|
bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE;
|
2013-08-09 15:04:52 +02:00
|
|
|
|
2017-05-22 14:50:09 +02:00
|
|
|
QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE;
|
|
|
|
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE;
|
2013-08-09 15:04:52 +02:00
|
|
|
|
2017-05-22 14:50:09 +02:00
|
|
|
QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE;
|
|
|
|
|
|
|
|
QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
|
2013-11-25 19:02:52 +01:00
|
|
|
|
2015-10-28 16:14:12 +01:00
|
|
|
#ifndef QT_NO_CLIPBOARD
|
2017-05-22 14:50:09 +02:00
|
|
|
QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE;
|
2015-10-28 16:14:12 +01:00
|
|
|
#endif
|
2017-05-22 14:50:09 +02:00
|
|
|
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
|
2017-08-14 11:14:43 +02:00
|
|
|
|
|
|
|
QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE;
|
2013-08-09 15:04:52 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
#endif /* _QNITPICKERINTEGRATION_H_ */
|