2022-03-17 18:25:16 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "../events/Events.hpp"
|
|
|
|
|
#include "../defines.hpp"
|
2024-03-20 01:44:51 +00:00
|
|
|
#include "../desktop/Window.hpp"
|
2024-02-29 13:03:38 +00:00
|
|
|
#include "../desktop/Subsurface.hpp"
|
2024-02-29 14:26:02 +00:00
|
|
|
#include "../desktop/Popup.hpp"
|
2022-05-14 17:23:46 +02:00
|
|
|
#include "AnimatedVariable.hpp"
|
2024-02-29 13:03:38 +00:00
|
|
|
#include "../desktop/WLSurface.hpp"
|
2024-06-11 17:17:45 +02:00
|
|
|
#include "signal/Signal.hpp"
|
2024-06-19 16:20:06 +02:00
|
|
|
#include "math/Math.hpp"
|
2022-03-17 18:25:16 +01:00
|
|
|
|
2023-01-20 19:44:30 +01:00
|
|
|
class CMonitor;
|
2024-05-03 22:34:10 +01:00
|
|
|
class IPointer;
|
|
|
|
|
class IKeyboard;
|
2024-06-08 10:07:59 +02:00
|
|
|
class CWLSurfaceResource;
|
2023-01-20 19:44:30 +01:00
|
|
|
|
2024-07-21 13:09:54 +02:00
|
|
|
AQUAMARINE_FORWARD(ISwitch);
|
|
|
|
|
|
2022-03-17 20:22:29 +01:00
|
|
|
struct SRenderData {
|
2023-01-25 15:34:13 +00:00
|
|
|
CMonitor* pMonitor;
|
|
|
|
|
timespec* when;
|
2023-11-04 17:03:05 +00:00
|
|
|
double x, y;
|
2022-03-21 16:13:43 +01:00
|
|
|
|
|
|
|
|
// for iters
|
2024-06-08 10:07:59 +02:00
|
|
|
void* data = nullptr;
|
|
|
|
|
SP<CWLSurfaceResource> surface = nullptr;
|
|
|
|
|
double w, h;
|
2022-04-05 18:32:06 +02:00
|
|
|
|
|
|
|
|
// for rounding
|
|
|
|
|
bool dontRound = true;
|
2022-04-05 19:28:10 +02:00
|
|
|
|
|
|
|
|
// for fade
|
2023-01-05 19:25:45 +01:00
|
|
|
float fadeAlpha = 1.f;
|
2022-04-18 18:23:10 +02:00
|
|
|
|
|
|
|
|
// for alpha settings
|
2022-04-18 18:33:50 +02:00
|
|
|
float alpha = 1.f;
|
2022-05-17 13:16:37 +02:00
|
|
|
|
|
|
|
|
// for decorations (border)
|
|
|
|
|
bool decorate = false;
|
2022-05-28 17:48:01 +02:00
|
|
|
|
|
|
|
|
// for custom round values
|
|
|
|
|
int rounding = -1; // -1 means not set
|
2022-07-06 22:12:03 +02:00
|
|
|
|
|
|
|
|
// for blurring
|
2022-12-16 17:17:31 +00:00
|
|
|
bool blur = false;
|
2022-12-04 22:57:41 +02:00
|
|
|
bool blockBlurOptimization = false;
|
2022-07-11 23:38:10 +02:00
|
|
|
|
2022-07-15 19:07:06 +02:00
|
|
|
// only for windows, not popups
|
|
|
|
|
bool squishOversized = true;
|
2022-08-28 10:14:43 +02:00
|
|
|
|
|
|
|
|
// for calculating UV
|
2024-04-27 12:43:12 +01:00
|
|
|
PHLWINDOW pWindow;
|
2023-12-25 18:04:00 +01:00
|
|
|
|
2024-04-27 12:43:12 +01:00
|
|
|
bool popup = false;
|
2024-06-17 12:42:32 +02:00
|
|
|
|
|
|
|
|
// counts how many surfaces this pass has rendered
|
|
|
|
|
int surfaceCounter = 0;
|
2022-03-17 20:22:29 +01:00
|
|
|
};
|
2022-03-17 20:55:04 +01:00
|
|
|
|
2022-07-07 11:52:12 +02:00
|
|
|
struct SSwipeGesture {
|
2024-04-02 20:32:39 +01:00
|
|
|
PHLWORKSPACE pWorkspaceBegin = nullptr;
|
2022-07-07 11:52:12 +02:00
|
|
|
|
2024-04-02 20:32:39 +01:00
|
|
|
double delta = 0;
|
2022-07-07 11:52:12 +02:00
|
|
|
|
2024-04-02 20:32:39 +01:00
|
|
|
int initialDirection = 0;
|
|
|
|
|
float avgSpeed = 0;
|
|
|
|
|
int speedPoints = 0;
|
|
|
|
|
int touch_id = 0;
|
2022-07-07 11:52:12 +02:00
|
|
|
|
2024-04-02 20:32:39 +01:00
|
|
|
CMonitor* pMonitor = nullptr;
|
2022-08-05 13:03:37 +02:00
|
|
|
};
|
|
|
|
|
|
2022-10-04 20:07:21 +01:00
|
|
|
struct SSwitchDevice {
|
2024-07-21 13:09:54 +02:00
|
|
|
WP<Aquamarine::ISwitch> pDevice;
|
2023-03-16 16:30:22 +00:00
|
|
|
|
2024-07-21 13:09:54 +02:00
|
|
|
struct {
|
|
|
|
|
CHyprSignalListener destroy;
|
|
|
|
|
CHyprSignalListener fire;
|
|
|
|
|
} listeners;
|
2022-10-04 20:07:21 +01:00
|
|
|
|
2023-01-31 00:03:23 +00:00
|
|
|
bool operator==(const SSwitchDevice& other) const {
|
2024-07-21 13:09:54 +02:00
|
|
|
return pDevice == other.pDevice;
|
2022-10-04 20:07:21 +01:00
|
|
|
}
|
|
|
|
|
};
|