• 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     bool initialize(const std::string &name, int width, int height) 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 setPosition(int x, int y) override;
33     bool resize(int width, int height) override;
34     void setVisible(bool isVisible) override;
35 
36     void signalTestEvent() override;
37 
38   private:
39     struct Native
40     {
41         int32_t x;
42         int32_t y;
43         int32_t width;
44         int32_t height;
45         int32_t borderWidth;
46         int32_t borderHeight;
47         int32_t visible;
48         int32_t depth;
49     };
50 
51     Native mNative;
52     static int sLastDepth;
53 };
54 
55 #endif  // UTIL_OZONE_WINDOW_H
56