1 /* 2 * Copyright (c) 2014 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_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_ 13 14 #include "webrtc/modules/desktop_capture/screen_capturer.h" 15 16 namespace webrtc { 17 18 // Output the list of active screens into |screens|. Returns true if succeeded, 19 // or false if it fails to enumerate the display devices. 20 bool GetScreenList(ScreenCapturer::ScreenList* screens); 21 22 // Returns true if |screen| is a valid screen. The screen device key is 23 // returned through |device_key| if the screen is valid. The device key can be 24 // used in GetScreenRect to verify the screen matches the previously obtained 25 // id. 26 bool IsScreenValid(ScreenId screen, std::wstring* device_key); 27 28 // Get the rect of the screen identified by |screen|, relative to the primary 29 // display's top-left. If the screen device key does not match |device_key|, or 30 // the screen does not exist, or any error happens, an empty rect is returned. 31 DesktopRect GetScreenRect(ScreenId screen, const std::wstring& device_key); 32 33 } // namespace webrtc 34 35 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURE_UTILS_H_ 36