1 /* 2 * Copyright (c) 2011 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_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_VIE_AUTOTEST_WINDOWS_H_ 12 #define WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_VIE_AUTOTEST_WINDOWS_H_ 13 14 #include "webrtc/engine_configurations.h" 15 #include "webrtc/video_engine/test/auto_test/interface/vie_autotest_window_manager_interface.h" 16 17 #include <windows.h> 18 #define TITLE_LENGTH 1024 19 20 // Forward declaration 21 namespace webrtc { 22 class ThreadWrapper; 23 class CriticalSectionWrapper; 24 } 25 26 class ViEAutoTestWindowManager: public ViEAutoTestWindowManagerInterface 27 { 28 public: 29 ViEAutoTestWindowManager(); 30 virtual ~ViEAutoTestWindowManager(); 31 virtual void* GetWindow1(); 32 virtual void* GetWindow2(); 33 virtual int CreateWindows(AutoTestRect window1Size, 34 AutoTestRect window2Size, void* window1Title, 35 void* window2Title); 36 virtual int TerminateWindows(); 37 virtual bool SetTopmostWindow(); 38 protected: 39 static bool EventProcess(void* obj); 40 bool EventLoop(); 41 42 private: 43 int ViECreateWindow(HWND &hwndMain, int xPos, int yPos, int width, 44 int height, TCHAR* className); 45 int ViEDestroyWindow(HWND& hwnd); 46 47 void* _window1; 48 void* _window2; 49 50 bool _terminate; 51 webrtc::ThreadWrapper& _eventThread; 52 webrtc::CriticalSectionWrapper& _crit; 53 HWND _hwndMain; 54 HWND _hwnd1; 55 HWND _hwnd2; 56 57 AutoTestRect _hwnd1Size; 58 AutoTestRect _hwnd2Size; 59 TCHAR _hwnd1Title[TITLE_LENGTH]; 60 TCHAR _hwnd2Title[TITLE_LENGTH]; 61 62 }; 63 64 #endif // WEBRTC_VIDEO_ENGINE_MAIN_TEST_AUTOTEST_INTERFACE_VIE_AUTOTEST_WINDOWS_H_ 65