~ubuntu-branches/ubuntu/trusty/compiz/trusty

« back to all changes in this revision

Viewing changes to src/outputdevices.h

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2013-08-22 06:58:07 UTC
  • mto: This revision was merged to the branch mainline in revision 3352.
  • Revision ID: package-import@ubuntu.com-20130822065807-17nlzez0d30y09so
Tags: upstream-0.9.10+13.10.20130822
ImportĀ upstreamĀ versionĀ 0.9.10+13.10.20130822

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
class OutputDevices
41
41
{
42
42
public:
43
 
    OutputDevices();
44
 
 
45
 
    void setCurrentOutput(unsigned int outputNum);
46
 
 
47
 
    CompOutput& getCurrentOutputDev() { return outputDevs[currentOutputDev]; }
48
 
 
49
 
    bool hasOverlappingOutputs() const { return overlappingOutputs; }
50
 
 
51
 
    void computeWorkAreas(CompRect& workArea, bool& workAreaChanged,
52
 
            CompRegion& allWorkArea, const CompWindowList& windows);
53
 
 
54
 
    const CompOutput& getOutputDev(unsigned int outputNum) const
55
 
    { return outputDevs[outputNum]; }
 
43
 
 
44
    OutputDevices ();
 
45
 
 
46
    void setCurrentOutput (unsigned int outputNum);
 
47
 
 
48
    CompOutput& getCurrentOutputDev ()
 
49
    {
 
50
        return outputDevs[currentOutputDev];
 
51
    }
 
52
 
 
53
    bool hasOverlappingOutputs () const
 
54
    {
 
55
        return overlappingOutputs;
 
56
    }
 
57
 
 
58
    void computeWorkAreas (CompRect             &workArea,
 
59
                           bool                 &workAreaChanged,
 
60
                           CompRegion           &allWorkArea,
 
61
                           const CompWindowList &windows);
 
62
 
 
63
    const CompOutput &getOutputDev (unsigned int outputNum) const
 
64
    {
 
65
        return outputDevs[outputNum];
 
66
    }
56
67
 
57
68
    // TODO breaks encapsulation horribly ought to be const at least
58
69
    // Even better, use begin() and end() return const_iterators
59
70
    // BUT this is exported directly through API - which makes changing
60
71
    // it a PITA.
61
 
    CompOutput::vector& getOutputDevs() { return outputDevs; }
62
 
 
63
 
    int outputDeviceForGeometry(const CompWindow::Geometry& gm, int strategy,
64
 
            CompSize* screen) const;
65
 
    void updateOutputDevices(CoreOptions& coreOptions, CompSize* screen);
66
 
 
67
 
    void setGeometryOnDevice(unsigned int nOutput, int x, int y,
68
 
            const int width, const int height);
69
 
    void adoptDevices(unsigned int nOutput, CompSize* screen);
 
72
    CompOutput::vector &getOutputDevs ()
 
73
    {
 
74
        return outputDevs;
 
75
    }
 
76
 
 
77
    int outputDeviceForGeometry (const CompWindow::Geometry &gm,
 
78
                                 int                        strategy,
 
79
                                 CompSize                   *screen) const;
 
80
 
 
81
    void updateOutputDevices (CoreOptions &coreOptions,
 
82
                              CompSize    *screen);
 
83
 
 
84
    void setGeometryOnDevice (unsigned int nOutput,
 
85
                              int          x,
 
86
                              int          y,
 
87
                              const int    width,
 
88
                              const int    height);
 
89
 
 
90
    void adoptDevices (unsigned int nOutput,
 
91
                       CompSize     *screen);
70
92
 
71
93
private:
72
 
    static CompRect computeWorkareaForBox(const CompRect& box,
73
 
            const CompWindowList& windows);
 
94
 
 
95
    static CompRect computeWorkareaForBox (const CompRect       &box,
 
96
                                           const CompWindowList &windows);
74
97
 
75
98
    CompOutput::vector outputDevs;
76
99
    bool               overlappingOutputs;
77
 
    int            currentOutputDev;
 
100
    int                currentOutputDev;
78
101
};
79
102
 
80
103
} // namespace core