~dandrader/qtmir/surfaceDrawn

« back to all changes in this revision

Viewing changes to src/platforms/mirserver/nativeinterface.h

  • Committer: CI Train Bot
  • Author(s): Gerry Boland, Michał Sawicz, Nick Dedekind
  • Date: 2016-04-29 20:04:51 UTC
  • mfrom: (434.5.64 set-display-config)
  • Revision ID: ci-train-bot@canonical.com-20160429200451-v0bjc4pcypynt83b
Enhance ScreenController & the DisplayConfigurationPolicy to implement dynamic grid units.

- Rename ScreenController to ScreenModel, as it just reflects current screen state, does not offer means to configure it
- ScreenController can update state of existing Screens, based on Mir DisplayConfiguration changes.
- Expand Screen to include scale & form factor properties, with getter/notifier in NativeInterface. This enables the dynamic grid units in the shell
- Add a Unity.Screens qml module to give QML better information about connected screens, and allow basic reconfiguring.
- Implement a basic display configuration policy to set suitable scale and form factor on an external display (needed for dynamic grid units) Fixes: #1573532
Approved by: Unity8 CI Bot, Daniel d'Andrada

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2013-2015 Canonical, Ltd.
 
2
 * Copyright (C) 2013-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
22
22
#include <qpa/qplatformnativeinterface.h>
23
23
 
24
24
// local
25
 
#include "mirserver.h"
 
25
#include "qmirserver.h"
26
26
 
27
27
class NativeInterface : public QPlatformNativeInterface
28
28
{
29
29
public:
30
 
    NativeInterface(const QWeakPointer<MirServer> &);
 
30
    NativeInterface(QMirServer *);
31
31
 
32
32
    virtual void *nativeResourceForIntegration(const QByteArray &resource);
33
33
 
34
 
    QWeakPointer<MirServer> m_mirServer;
 
34
    QVariantMap windowProperties(QPlatformWindow *window) const override;
 
35
    QVariant windowProperty(QPlatformWindow *window, const QString &name) const override;
 
36
    QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const override;
 
37
 
 
38
    QWeakPointer<MirServer> mirServer() { return m_qMirServer->mirServer(); }
 
39
 
 
40
private:
 
41
    QMirServer *m_qMirServer;
35
42
};
36
43
 
37
44
#endif // NATIVEINTEGRATION_H