| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2010 The WebRTC Project Authors. All rights reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_BASE_LINUXWINDOWPICKER_H_ | |
| 12 #define WEBRTC_BASE_LINUXWINDOWPICKER_H_ | |
| 13 | |
| 14 #include <memory> | |
| 15 | |
| 16 #include "webrtc/base/basictypes.h" | |
| 17 #include "webrtc/base/windowpicker.h" | |
| 18 | |
| 19 // Avoid include <X11/Xlib.h>. | |
| 20 struct _XDisplay; | |
| 21 typedef unsigned long Window; | |
| 22 | |
| 23 namespace rtc { | |
| 24 | |
| 25 class XWindowEnumerator; | |
| 26 | |
| 27 class X11WindowPicker : public WindowPicker { | |
| 28 public: | |
| 29 X11WindowPicker(); | |
| 30 ~X11WindowPicker() override; | |
| 31 | |
| 32 static bool IsDesktopElement(_XDisplay* display, Window window); | |
| 33 | |
| 34 bool Init() override; | |
| 35 bool IsVisible(const WindowId& id) override; | |
| 36 bool MoveToFront(const WindowId& id) override; | |
| 37 bool GetWindowList(WindowDescriptionList* descriptions) override; | |
| 38 bool GetDesktopList(DesktopDescriptionList* descriptions) override; | |
| 39 bool GetDesktopDimensions(const DesktopId& id, | |
| 40 int* width, | |
| 41 int* height) override; | |
| 42 uint8_t* GetWindowIcon(const WindowId& id, int* width, int* height); | |
| 43 uint8_t* GetWindowThumbnail(const WindowId& id, int width, int height); | |
| 44 int GetNumDesktops(); | |
| 45 uint8_t* GetDesktopThumbnail(const DesktopId& id, int width, int height); | |
| 46 | |
| 47 private: | |
| 48 std::unique_ptr<XWindowEnumerator> enumerator_; | |
| 49 }; | |
| 50 | |
| 51 } // namespace rtc | |
| 52 | |
| 53 #endif // WEBRTC_BASE_LINUXWINDOWPICKER_H_ | |
| OLD | NEW |