• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // OzoneWindow.h: Definition of the implementation of OSWindow for Ozone
8 
9 #ifndef UTIL_OZONE_WINDOW_H
10 #define UTIL_OZONE_WINDOW_H
11 
12 #include <string>
13 
14 #include "util/OSWindow.h"
15 
16 class OzoneWindow : public OSWindow
17 {
18   public:
19     OzoneWindow();
20     ~OzoneWindow() override;
21 
22     void disableErrorMessageDialog() override;
23     void destroy() override;
24 
25     void resetNativeWindow() override;
26     EGLNativeWindowType getNativeWindow() const override;
27     EGLNativeDisplayType getNativeDisplay() const override;
28 
29     void messageLoop() override;
30 
31     void setMousePosition(int x, int y) override;
32     bool setOrientation(int width, int height) override;
33     bool setPosition(int x, int y) override;
34     bool resize(int width, int height) override;
35     void setVisible(bool isVisible) override;
36 
37     void signalTestEvent() override;
38 
39   private:
40     bool initializeImpl(const std::string &name, int width, int height) override;
41 
42     struct Native
43     {
44         int32_t x;
45         int32_t y;
46         int32_t width;
47         int32_t height;
48         int32_t borderWidth;
49         int32_t borderHeight;
50         int32_t visible;
51         int32_t depth;
52     };
53 
54     Native mNative;
55     static int sLastDepth;
56 };
57 
58 #endif  // UTIL_OZONE_WINDOW_H
59