~gerboland/qtubuntu/enable-debug-mode

« back to all changes in this revision

Viewing changes to src/ubuntumirclient/nativeinterface.h

  • Committer: Gerry Boland
  • Date: 2016-06-24 12:11:21 UTC
  • mfrom: (280.28.15 qtubuntu)
  • Revision ID: gerry.boland@canonical.com-20160624121121-086s2yy603hfsuus
Merge trunk & fix conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2014 Canonical, Ltd.
 
2
 * Copyright (C) 2014,2016 Canonical, Ltd.
3
3
 *
4
4
 * This program is free software: you can redistribute it and/or modify it under
5
5
 * the terms of the GNU Lesser General Public License version 3, as published by
19
19
 
20
20
#include <qpa/qplatformnativeinterface.h>
21
21
 
 
22
#include "integration.h"
 
23
 
 
24
class QPlatformScreen;
 
25
 
22
26
class UbuntuNativeInterface : public QPlatformNativeInterface {
 
27
    Q_OBJECT
23
28
public:
24
 
    enum ResourceType { EglDisplay, EglContext, NativeOrientation, Display, MirConnection };
 
29
    enum ResourceType { EglDisplay, EglContext, NativeOrientation, Display, MirConnection, Scale, FormFactor };
25
30
 
26
 
    UbuntuNativeInterface();
 
31
    UbuntuNativeInterface(const UbuntuClientIntegration *integration);
27
32
    ~UbuntuNativeInterface();
28
33
 
29
34
    // QPlatformNativeInterface methods.
35
40
    void* nativeResourceForScreen(const QByteArray& resourceString,
36
41
                                  QScreen* screen) override;
37
42
 
 
43
    QVariantMap windowProperties(QPlatformWindow *window) const override;
 
44
    QVariant windowProperty(QPlatformWindow *window, const QString &name) const override;
 
45
    QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const override;
 
46
 
38
47
    // New methods.
39
48
    const QByteArray& genericEventFilterType() const { return mGenericEventFilterType; }
40
 
    void setMirConnection(void *mirConnection) { mMirConnection = mirConnection; }
 
49
 
 
50
Q_SIGNALS: // New signals
 
51
    void screenPropertyChanged(QPlatformScreen *screen, const QString &propertyName);
41
52
 
42
53
private:
 
54
    const UbuntuClientIntegration *mIntegration;
43
55
    const QByteArray mGenericEventFilterType;
44
56
    Qt::ScreenOrientation* mNativeOrientation;
45
 
    void *mMirConnection;
46
57
};
47
58
 
48
59
#endif // UBUNTU_NATIVE_INTERFACE_H