xref: /aosp_15_r20/external/angle/util/android/AndroidWindow.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1  //
2  // Copyright 2016 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  // AndroidWindow.h: Definition of the implementation of OSWindow for Android
8  
9  #ifndef UTIL_ANDROID_WINDOW_H_
10  #define UTIL_ANDROID_WINDOW_H_
11  
12  #include "util/OSWindow.h"
13  
14  class AndroidWindow : public OSWindow
15  {
16    public:
17      AndroidWindow();
18      ~AndroidWindow() override;
19  
20      void disableErrorMessageDialog() override;
21      void destroy() override;
22  
23      void resetNativeWindow() override;
24      EGLNativeWindowType getNativeWindow() const override;
25      EGLNativeDisplayType getNativeDisplay() const override;
26  
27      void messageLoop() override;
28  
29      void setMousePosition(int x, int y) override;
30      bool setOrientation(int width, int height) override;
31      bool setPosition(int x, int y) override;
32      bool resize(int width, int height) override;
33      void setVisible(bool isVisible) override;
34  
35      void signalTestEvent() override;
36  
37      ANGLE_UTIL_EXPORT static std::string GetExternalStorageDirectory();
38      ANGLE_UTIL_EXPORT static std::string GetApplicationDirectory();
39  
40    private:
41      bool initializeImpl(const std::string &name, int width, int height) override;
42  };
43  
44  #endif /* UTIL_ANDROID_WINDOW_H_ */
45