2 * Copyright 2010 The WebRTC Project Authors. All rights reserved.
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.
11 #ifndef WEBRTC_BASE_LINUXWINDOWPICKER_H_
12 #define WEBRTC_BASE_LINUXWINDOWPICKER_H_
14 #include "webrtc/base/basictypes.h"
15 #include "webrtc/base/scoped_ptr.h"
16 #include "webrtc/base/windowpicker.h"
18 // Avoid include <X11/Xlib.h>.
20 typedef unsigned long Window;
24 class XWindowEnumerator;
26 class X11WindowPicker : public WindowPicker {
31 static bool IsDesktopElement(_XDisplay* display, Window window);
34 virtual bool IsVisible(const WindowId& id);
35 virtual bool MoveToFront(const WindowId& id);
36 virtual bool GetWindowList(WindowDescriptionList* descriptions);
37 virtual bool GetDesktopList(DesktopDescriptionList* descriptions);
38 virtual bool GetDesktopDimensions(const DesktopId& id, int* width,
40 uint8* GetWindowIcon(const WindowId& id, int* width, int* height);
41 uint8* GetWindowThumbnail(const WindowId& id, int width, int height);
43 uint8* GetDesktopThumbnail(const DesktopId& id, int width, int height);
46 scoped_ptr<XWindowEnumerator> enumerator_;
51 #endif // WEBRTC_BASE_LINUXWINDOWPICKER_H_