Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/util/windows/win32/Win32Window.h
1693 views
1
//
2
// Copyright 2014 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
// Win32Window.h: Definition of the implementation of OSWindow for Win32 (Windows)
8
9
#ifndef UTIL_WIN32_WINDOW_H
10
#define UTIL_WIN32_WINDOW_H
11
12
#include <windows.h>
13
#include <string>
14
15
#include "util/OSWindow.h"
16
#include "util/Timer.h"
17
18
class Win32Window : public OSWindow
19
{
20
public:
21
Win32Window();
22
~Win32Window() override;
23
24
void destroy() override;
25
void disableErrorMessageDialog() override;
26
27
bool takeScreenshot(uint8_t *pixelData) override;
28
29
void resetNativeWindow() override;
30
EGLNativeWindowType getNativeWindow() const override;
31
EGLNativeDisplayType getNativeDisplay() const override;
32
33
void messageLoop() override;
34
35
void pushEvent(Event event) override;
36
37
void setMousePosition(int x, int y) override;
38
bool setOrientation(int width, int height) override;
39
bool setPosition(int x, int y) override;
40
bool resize(int width, int height) override;
41
void setVisible(bool isVisible) override;
42
43
void signalTestEvent() override;
44
45
private:
46
bool initializeImpl(const std::string &name, int width, int height) override;
47
static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
48
49
std::string mParentClassName;
50
std::string mChildClassName;
51
52
bool mIsVisible;
53
Timer mSetVisibleTimer;
54
55
bool mIsMouseInWindow;
56
57
EGLNativeWindowType mNativeWindow;
58
EGLNativeWindowType mParentWindow;
59
EGLNativeDisplayType mNativeDisplay;
60
};
61
62
#endif // UTIL_WIN32_WINDOW_H
63
64