-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmultiwindow_unity.hpp
More file actions
81 lines (65 loc) · 1.82 KB
/
multiwindow_unity.hpp
File metadata and controls
81 lines (65 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
class CustomWindow : public QWidget {
public:
int customId;
int targetX;
int targetY;
int targetWidth;
int targetHeight;
float targetOpacity;
bool targetDecorations = true;
QString targetTitle;
// QLabel* testLabel;
bool isVisible = true;
bool isClosing = false;
bool hyprReady = false;
bool _lastDecorations = true;
int cutoffX = 0;
int cutoffY = 0;
#ifdef WITH_WINE
ID3D11Resource* resource = nullptr;
ID3D11Texture2D* texture = nullptr;
D3D11_TEXTURE2D_DESC desc;
ID3D11Texture2D* stagingTexture = nullptr;
D3D11_TEXTURE2D_DESC stagingDesc;
D3D11_MAPPED_SUBRESOURCE mapped;
#else
GLuint glTextureId = -1;
void* tempTexture = nullptr;
#endif
QImage* qtImage = nullptr;
QPixmap iconPixmap;
QIcon* iconIcon = nullptr;
CustomWindow();
#ifdef WITH_WINE
void setTexture(ID3D11Resource* resource);
#else
void setTexture(GLuint textureId);
void setTextureSize(int w, int h);
#endif
bool copyTexture();
void _setX11Decorations(bool hasDecorations);
void setTargetMove(int x, int y);
void setTargetSize(int w, int h);
void updateThings();
void paintEvent(QPaintEvent* paintEvent) override;
void setIcon(QImage* image);
void closeEvent(QCloseEvent* closeEvent) override;
~CustomWindow();
};
class ScreenSizeWindow : public QWidget {
public:
QScreen* actualScreen;
void doTheStuff(QScreen* screen);
int resizeCount = 0;
void resizeEvent(QResizeEvent* event) override;
};
class Hyprctl {
public:
std::string socketPath;
Hyprctl();
void sendMessage(std::string message);
bool sendMessageSync(std::string message);
bool setProp(std::string window, std::string effect, std::string argument);
void moveWindow(std::string window, int x, int y);
};