1*8975f5c5SAndroid Build Coastguard Worker // 2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2014 The ANGLE Project Authors. All rights reserved. 3*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 4*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file. 5*8975f5c5SAndroid Build Coastguard Worker // 6*8975f5c5SAndroid Build Coastguard Worker 7*8975f5c5SAndroid Build Coastguard Worker // Win32Window.h: Definition of the implementation of OSWindow for Win32 (Windows) 8*8975f5c5SAndroid Build Coastguard Worker 9*8975f5c5SAndroid Build Coastguard Worker #ifndef UTIL_WIN32_WINDOW_H 10*8975f5c5SAndroid Build Coastguard Worker #define UTIL_WIN32_WINDOW_H 11*8975f5c5SAndroid Build Coastguard Worker 12*8975f5c5SAndroid Build Coastguard Worker #include <windows.h> 13*8975f5c5SAndroid Build Coastguard Worker #include <string> 14*8975f5c5SAndroid Build Coastguard Worker 15*8975f5c5SAndroid Build Coastguard Worker #include "util/OSWindow.h" 16*8975f5c5SAndroid Build Coastguard Worker #include "util/Timer.h" 17*8975f5c5SAndroid Build Coastguard Worker 18*8975f5c5SAndroid Build Coastguard Worker class Win32Window : public OSWindow 19*8975f5c5SAndroid Build Coastguard Worker { 20*8975f5c5SAndroid Build Coastguard Worker public: 21*8975f5c5SAndroid Build Coastguard Worker Win32Window(); 22*8975f5c5SAndroid Build Coastguard Worker ~Win32Window() override; 23*8975f5c5SAndroid Build Coastguard Worker 24*8975f5c5SAndroid Build Coastguard Worker void destroy() override; 25*8975f5c5SAndroid Build Coastguard Worker void disableErrorMessageDialog() override; 26*8975f5c5SAndroid Build Coastguard Worker 27*8975f5c5SAndroid Build Coastguard Worker bool takeScreenshot(uint8_t *pixelData) override; 28*8975f5c5SAndroid Build Coastguard Worker 29*8975f5c5SAndroid Build Coastguard Worker void resetNativeWindow() override; 30*8975f5c5SAndroid Build Coastguard Worker EGLNativeWindowType getNativeWindow() const override; 31*8975f5c5SAndroid Build Coastguard Worker EGLNativeDisplayType getNativeDisplay() const override; 32*8975f5c5SAndroid Build Coastguard Worker 33*8975f5c5SAndroid Build Coastguard Worker void messageLoop() override; 34*8975f5c5SAndroid Build Coastguard Worker 35*8975f5c5SAndroid Build Coastguard Worker void pushEvent(Event event) override; 36*8975f5c5SAndroid Build Coastguard Worker 37*8975f5c5SAndroid Build Coastguard Worker void setMousePosition(int x, int y) override; 38*8975f5c5SAndroid Build Coastguard Worker bool setOrientation(int width, int height) override; 39*8975f5c5SAndroid Build Coastguard Worker bool setPosition(int x, int y) override; 40*8975f5c5SAndroid Build Coastguard Worker bool resize(int width, int height) override; 41*8975f5c5SAndroid Build Coastguard Worker void setVisible(bool isVisible) override; 42*8975f5c5SAndroid Build Coastguard Worker 43*8975f5c5SAndroid Build Coastguard Worker void signalTestEvent() override; 44*8975f5c5SAndroid Build Coastguard Worker 45*8975f5c5SAndroid Build Coastguard Worker private: 46*8975f5c5SAndroid Build Coastguard Worker bool initializeImpl(const std::string &name, int width, int height) override; 47*8975f5c5SAndroid Build Coastguard Worker static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); 48*8975f5c5SAndroid Build Coastguard Worker 49*8975f5c5SAndroid Build Coastguard Worker std::string mParentClassName; 50*8975f5c5SAndroid Build Coastguard Worker std::string mChildClassName; 51*8975f5c5SAndroid Build Coastguard Worker 52*8975f5c5SAndroid Build Coastguard Worker bool mIsVisible; 53*8975f5c5SAndroid Build Coastguard Worker Timer mSetVisibleTimer; 54*8975f5c5SAndroid Build Coastguard Worker 55*8975f5c5SAndroid Build Coastguard Worker bool mIsMouseInWindow; 56*8975f5c5SAndroid Build Coastguard Worker 57*8975f5c5SAndroid Build Coastguard Worker EGLNativeWindowType mNativeWindow; 58*8975f5c5SAndroid Build Coastguard Worker EGLNativeWindowType mParentWindow; 59*8975f5c5SAndroid Build Coastguard Worker EGLNativeDisplayType mNativeDisplay; 60*8975f5c5SAndroid Build Coastguard Worker }; 61*8975f5c5SAndroid Build Coastguard Worker 62*8975f5c5SAndroid Build Coastguard Worker #endif // UTIL_WIN32_WINDOW_H 63