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.cpp: Implementation of OSWindow for Ozone
8
9 #include "util/ozone/OzoneWindow.h"
10
11 #include "common/debug.h"
12
13 int OzoneWindow::sLastDepth = 0;
14
OzoneWindow()15 OzoneWindow::OzoneWindow() {}
16
~OzoneWindow()17 OzoneWindow::~OzoneWindow() {}
18
initializeImpl(const std::string & name,int width,int height)19 bool OzoneWindow::initializeImpl(const std::string &name, int width, int height)
20 {
21 mNative.x = mX = 0;
22 mNative.y = mY = 0;
23 mNative.width = mWidth = width;
24 mNative.height = mHeight = height;
25 mNative.borderWidth = 5;
26 mNative.borderHeight = 5;
27 mNative.visible = 0;
28 mNative.depth = sLastDepth++;
29 return true;
30 }
31
disableErrorMessageDialog()32 void OzoneWindow::disableErrorMessageDialog() {}
33
destroy()34 void OzoneWindow::destroy() {}
35
resetNativeWindow()36 void OzoneWindow::resetNativeWindow() {}
37
getNativeWindow() const38 EGLNativeWindowType OzoneWindow::getNativeWindow() const
39 {
40 return reinterpret_cast<EGLNativeWindowType>(&mNative);
41 }
42
getNativeDisplay() const43 EGLNativeDisplayType OzoneWindow::getNativeDisplay() const
44 {
45 return EGL_DEFAULT_DISPLAY;
46 }
47
messageLoop()48 void OzoneWindow::messageLoop() {}
49
setMousePosition(int x,int y)50 void OzoneWindow::setMousePosition(int x, int y) {}
51
setOrientation(int width,int height)52 bool OzoneWindow::setOrientation(int width, int height)
53 {
54 UNIMPLEMENTED();
55 return false;
56 }
57
setPosition(int x,int y)58 bool OzoneWindow::setPosition(int x, int y)
59 {
60 mNative.x = mX = x;
61 mNative.y = mY = y;
62 return true;
63 }
64
resize(int width,int height)65 bool OzoneWindow::resize(int width, int height)
66 {
67 mNative.width = mWidth = width;
68 mNative.height = mHeight = height;
69 return true;
70 }
71
setVisible(bool isVisible)72 void OzoneWindow::setVisible(bool isVisible)
73 {
74 mNative.visible = isVisible;
75 }
76
signalTestEvent()77 void OzoneWindow::signalTestEvent() {}
78
79 // static
New()80 OSWindow *OSWindow::New()
81 {
82 return new OzoneWindow();
83 }
84