1 // 2 // Copyright 2020 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 // DisplayWindow.h: Definition of the implementation of OSWindow for Linux Display 8 9 #ifndef UTIL_DISPLAY_WINDOW_H_ 10 #define UTIL_DISPLAY_WINDOW_H_ 11 12 #include <string> 13 #include "util/OSWindow.h" 14 #include "util/util_export.h" 15 16 struct SimpleDisplayWindow 17 { 18 uint16_t width; 19 uint16_t height; 20 }; 21 22 class ANGLE_UTIL_EXPORT DisplayWindow : public OSWindow 23 { 24 public: 25 DisplayWindow(); 26 DisplayWindow(int visualId); 27 ~DisplayWindow() override; 28 29 void disableErrorMessageDialog() override; 30 void destroy() override; 31 32 void resetNativeWindow() override; 33 EGLNativeWindowType getNativeWindow() const override; 34 EGLNativeDisplayType getNativeDisplay() const override; 35 36 void messageLoop() override; 37 38 void setMousePosition(int x, int y) override; 39 bool setOrientation(int width, int height) override; 40 bool setPosition(int x, int y) override; 41 bool resize(int width, int height) override; 42 void setVisible(bool isVisible) override; 43 44 void signalTestEvent() override; 45 46 private: 47 bool initializeImpl(const std::string &name, int width, int height) override; 48 SimpleDisplayWindow mWindow; 49 }; 50 51 #endif // UTIL_DISPLAY_WINDOW_H_ 52