Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/util/ozone/OzoneWindow.cpp
1693 views
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
15
OzoneWindow::OzoneWindow() {}
16
17
OzoneWindow::~OzoneWindow() {}
18
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
32
void OzoneWindow::disableErrorMessageDialog() {}
33
34
void OzoneWindow::destroy() {}
35
36
void OzoneWindow::resetNativeWindow() {}
37
38
EGLNativeWindowType OzoneWindow::getNativeWindow() const
39
{
40
return reinterpret_cast<EGLNativeWindowType>(&mNative);
41
}
42
43
EGLNativeDisplayType OzoneWindow::getNativeDisplay() const
44
{
45
return EGL_DEFAULT_DISPLAY;
46
}
47
48
void OzoneWindow::messageLoop() {}
49
50
void OzoneWindow::setMousePosition(int x, int y) {}
51
52
bool OzoneWindow::setOrientation(int width, int height)
53
{
54
UNIMPLEMENTED();
55
return false;
56
}
57
58
bool OzoneWindow::setPosition(int x, int y)
59
{
60
mNative.x = mX = x;
61
mNative.y = mY = y;
62
return true;
63
}
64
65
bool OzoneWindow::resize(int width, int height)
66
{
67
mNative.width = mWidth = width;
68
mNative.height = mHeight = height;
69
return true;
70
}
71
72
void OzoneWindow::setVisible(bool isVisible)
73
{
74
mNative.visible = isVisible;
75
}
76
77
void OzoneWindow::signalTestEvent() {}
78
79
// static
80
OSWindow *OSWindow::New()
81
{
82
return new OzoneWindow();
83
}
84
85