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