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