1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_DISPLAY_CHROMEOS_X11_DISPLAY_SNAPSHOT_X11_H_
6 #define UI_DISPLAY_CHROMEOS_X11_DISPLAY_SNAPSHOT_X11_H_
8 #include "ui/display/display_export.h"
9 #include "ui/display/types/display_snapshot.h"
11 // Forward declare from Xlib and Xrandr.
12 typedef unsigned long XID
;
18 class DISPLAY_EXPORT DisplaySnapshotX11
: public DisplaySnapshot
{
20 DisplaySnapshotX11(int64_t display_id
,
21 const gfx::Point
& origin
,
22 const gfx::Size
& physical_size
,
23 DisplayConnectionType type
,
24 bool is_aspect_preserving_scaling
,
26 std::string display_name
,
27 const std::vector
<const DisplayMode
*>& modes
,
28 const DisplayMode
* current_mode
,
29 const DisplayMode
* native_mode
,
33 ~DisplaySnapshotX11() override
;
35 RROutput
output() const { return output_
; }
36 RRCrtc
crtc() const { return crtc_
; }
37 int index() const { return index_
; }
39 // DisplaySnapshot overrides:
40 std::string
ToString() const override
;
45 // CRTC that should be used for this output. Not necessarily the CRTC
46 // that XRandR reports is currently being used.
49 // This output's index in the array returned by XRandR. Stable even as
50 // outputs are connected or disconnected.
53 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshotX11
);
58 #endif // UI_DISPLAY_CHROMEOS_X11_DISPLAY_SNAPSHOT_X11_H_