Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/util/display/DisplayWindow.cpp
1693 views
1
//
2
// Copyright 2020 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
// DisplayWindow.cpp: Implementation of OSWindow for Linux Display
8
9
#include "util/display/DisplayWindow.h"
10
11
#include "common/debug.h"
12
#include "util/Timer.h"
13
#include "util/test_utils.h"
14
15
DisplayWindow::DisplayWindow()
16
{
17
mWindow.width = 0;
18
mWindow.height = 0;
19
}
20
21
DisplayWindow::~DisplayWindow() {}
22
23
bool DisplayWindow::initializeImpl(const std::string &name, int width, int height)
24
{
25
return resize(width, height);
26
}
27
28
void DisplayWindow::disableErrorMessageDialog() {}
29
30
void DisplayWindow::destroy() {}
31
32
void DisplayWindow::resetNativeWindow() {}
33
34
EGLNativeWindowType DisplayWindow::getNativeWindow() const
35
{
36
return (EGLNativeWindowType)&mWindow;
37
}
38
39
EGLNativeDisplayType DisplayWindow::getNativeDisplay() const
40
{
41
return NULL;
42
}
43
44
void DisplayWindow::messageLoop() {}
45
46
void DisplayWindow::setMousePosition(int x, int y)
47
{
48
UNIMPLEMENTED();
49
}
50
51
bool DisplayWindow::setOrientation(int width, int height)
52
{
53
UNIMPLEMENTED();
54
return true;
55
}
56
57
bool DisplayWindow::setPosition(int x, int y)
58
{
59
UNIMPLEMENTED();
60
return true;
61
}
62
63
bool DisplayWindow::resize(int width, int height)
64
{
65
mWindow.width = width;
66
mWindow.height = height;
67
return true;
68
}
69
70
void DisplayWindow::setVisible(bool isVisible) {}
71
72
void DisplayWindow::signalTestEvent()
73
{
74
Event event;
75
event.Type = Event::EVENT_TEST;
76
event.Move.X = 0;
77
event.Move.Y = 0;
78
pushEvent(event);
79
}
80
81
// static
82
#if defined(ANGLE_USE_VULKAN_DISPLAY) && defined(EGL_NO_X11)
83
OSWindow *OSWindow::New()
84
{
85
return new DisplayWindow();
86
}
87
#endif
88
89