OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2010 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/base/x11windowpicker.h" | 11 #include "webrtc/base/x11windowpicker.h" |
12 | 12 |
13 #include <math.h> | 13 #include <math.h> |
14 #include <string.h> | 14 #include <string.h> |
15 | 15 |
16 #include <algorithm> | 16 #include <algorithm> |
17 #include <string> | 17 #include <string> |
18 | 18 |
19 #include <X11/Xatom.h> | 19 #include <X11/Xatom.h> |
20 #include <X11/extensions/Xcomposite.h> | 20 #include <X11/extensions/Xcomposite.h> |
21 #include <X11/extensions/Xrender.h> | 21 #include <X11/extensions/Xrender.h> |
22 #include <X11/Xutil.h> | 22 #include <X11/Xutil.h> |
23 | 23 |
| 24 #include "webrtc/base/constructormagic.h" |
24 #include "webrtc/base/logging.h" | 25 #include "webrtc/base/logging.h" |
25 | 26 |
26 namespace rtc { | 27 namespace rtc { |
27 | 28 |
28 // Convenience wrapper for XGetWindowProperty results. | 29 // Convenience wrapper for XGetWindowProperty results. |
29 template <class PropertyType> | 30 template <class PropertyType> |
30 class XWindowProperty { | 31 class XWindowProperty { |
31 public: | 32 public: |
32 XWindowProperty(Display* display, Window window, Atom property) | 33 XWindowProperty(Display* display, Window window, Atom property) |
33 : data_(NULL) { | 34 : data_(NULL) { |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 int height) { | 807 int height) { |
807 return enumerator_->GetDesktopThumbnail(id, width, height); | 808 return enumerator_->GetDesktopThumbnail(id, width, height); |
808 } | 809 } |
809 | 810 |
810 bool X11WindowPicker::GetDesktopDimensions(const DesktopId& id, int* width, | 811 bool X11WindowPicker::GetDesktopDimensions(const DesktopId& id, int* width, |
811 int* height) { | 812 int* height) { |
812 return enumerator_->GetDesktopDimensions(id, width, height); | 813 return enumerator_->GetDesktopDimensions(id, width, height); |
813 } | 814 } |
814 | 815 |
815 } // namespace rtc | 816 } // namespace rtc |
OLD | NEW |