1 // 2 // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 7 #ifndef SAMPLE_UTIL_WIN32_WINDOW_H 8 #define SAMPLE_UTIL_WIN32_WINDOW_H 9 10 #include "OSWindow.h" 11 #include <string> 12 #include <windows.h> 13 14 class Win32Window : public OSWindow 15 { 16 public: 17 Win32Window(); 18 ~Win32Window(); 19 20 bool initialize(const std::string &name, size_t width, size_t height); 21 void destroy(); 22 23 EGLNativeWindowType getNativeWindow() const; 24 EGLNativeDisplayType getNativeDisplay() const; 25 26 void messageLoop(); 27 28 virtual void pushEvent(Event event); 29 30 void setMousePosition(int x, int y); 31 bool resize(int width, int height); 32 bool setVisible(bool isVisible); 33 34 private: 35 std::string mParentClassName; 36 std::string mChildClassName; 37 38 EGLNativeWindowType mNativeWindow; 39 EGLNativeWindowType mParentWindow; 40 EGLNativeDisplayType mNativeDisplay; 41 }; 42 43 #endif // SAMPLE_UTIL_WINDOW_H 44