~gerboland/qtubuntu/enable-debug-mode

« back to all changes in this revision

Viewing changes to src/ubuntumirclient/screen.h

  • Committer: Gerry Boland
  • Date: 2016-04-12 13:10:43 UTC
  • mfrom: (280.2.34 enable-debug-mode)
  • Revision ID: gerry.boland@canonical.com-20160412131043-t14zmcbheuxclmhr
Merge lp:~dandrader/qtubuntu/enable-debug-mode, he kindly fixed merging this with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2014 Canonical, Ltd.
 
2
 * Copyright (C) 2014-2015 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
21
21
#include <QSurfaceFormat>
22
22
#include <EGL/egl.h>
23
23
 
 
24
#include "cursor.h"
 
25
 
24
26
struct MirConnection;
25
27
 
26
28
class UbuntuScreen : public QObject, public QPlatformScreen
35
37
    int depth() const override { return mDepth; }
36
38
    QRect geometry() const override { return mGeometry; }
37
39
    QRect availableGeometry() const override { return mGeometry; }
 
40
    QSizeF physicalSize() const override { return mPhysicalSize; }
38
41
    Qt::ScreenOrientation nativeOrientation() const override { return mNativeOrientation; }
39
42
    Qt::ScreenOrientation orientation() const override { return mNativeOrientation; }
 
43
    QPlatformCursor *cursor() const override { return const_cast<UbuntuCursor*>(&mCursor); }
40
44
 
41
45
    // New methods.
42
46
    QSurfaceFormat surfaceFormat() const { return mSurfaceFormat; }
47
51
    uint32_t mirOutputId() const { return mOutputId; }
48
52
 
49
53
    // QObject methods.
50
 
    void customEvent(QEvent* event);
 
54
    void customEvent(QEvent* event) override;
51
55
 
52
56
private:
53
57
    QRect mGeometry;
 
58
    QSizeF mPhysicalSize;
54
59
    Qt::ScreenOrientation mNativeOrientation;
55
60
    Qt::ScreenOrientation mCurrentOrientation;
56
61
    QImage::Format mFormat;
60
65
    EGLDisplay mEglDisplay;
61
66
    EGLConfig mEglConfig;
62
67
    EGLNativeDisplayType mEglNativeDisplay;
 
68
    UbuntuCursor mCursor;
63
69
};
64
70
 
65
71
#endif // UBUNTU_SCREEN_H