-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
180 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "BarPassElement.hpp" | ||
#include <hyprland/src/render/OpenGL.hpp> | ||
#include "barDeco.hpp" | ||
|
||
CBarPassElement::CBarPassElement(const CBarPassElement::SBarData& data_) : data(data_) { | ||
; | ||
} | ||
|
||
void CBarPassElement::draw(const CRegion& damage) { | ||
data.deco->renderPass(g_pHyprOpenGL->m_RenderData.pMonitor.lock(), data.a); | ||
} | ||
|
||
bool CBarPassElement::needsLiveBlur() { | ||
return false; | ||
} | ||
|
||
bool CBarPassElement::needsPrecomputeBlur() { | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
#include <hyprland/src/render/pass/PassElement.hpp> | ||
|
||
class CHyprBar; | ||
|
||
class CBarPassElement : public IPassElement { | ||
public: | ||
struct SBarData { | ||
CHyprBar* deco = nullptr; | ||
float a = 1.F; | ||
}; | ||
|
||
CBarPassElement(const SBarData& data_); | ||
virtual ~CBarPassElement() = default; | ||
|
||
virtual void draw(const CRegion& damage); | ||
virtual bool needsLiveBlur(); | ||
virtual bool needsPrecomputeBlur(); | ||
|
||
virtual const char* passName() { | ||
return "CBarPassElement"; | ||
} | ||
|
||
private: | ||
SBarData data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
all: | ||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp overview.cpp -o hyprexpo.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -Wno-narrowing | ||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp overview.cpp OverviewPassElement.cpp -o hyprexpo.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -Wno-narrowing | ||
clean: | ||
rm ./hyprexpo.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "OverviewPassElement.hpp" | ||
#include <hyprland/src/render/OpenGL.hpp> | ||
#include "overview.hpp" | ||
|
||
COverviewPassElement::COverviewPassElement() { | ||
; | ||
} | ||
|
||
void COverviewPassElement::draw(const CRegion& damage) { | ||
g_pOverview->fullRender(); | ||
} | ||
|
||
bool COverviewPassElement::needsLiveBlur() { | ||
return false; | ||
} | ||
|
||
bool COverviewPassElement::needsPrecomputeBlur() { | ||
return false; | ||
} | ||
|
||
std::optional<CBox> COverviewPassElement::boundingBox() { | ||
if (!g_pOverview->pMonitor) | ||
return std::nullopt; | ||
|
||
return CBox{{}, g_pOverview->pMonitor->vecSize}; | ||
} | ||
|
||
CRegion COverviewPassElement::opaqueRegion() { | ||
if (!g_pOverview->pMonitor) | ||
return CRegion{}; | ||
|
||
return CBox{{}, g_pOverview->pMonitor->vecSize}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
#include <hyprland/src/render/pass/PassElement.hpp> | ||
|
||
class COverview; | ||
|
||
class COverviewPassElement : public IPassElement { | ||
public: | ||
COverviewPassElement(); | ||
virtual ~COverviewPassElement() = default; | ||
|
||
virtual void draw(const CRegion& damage); | ||
virtual bool needsLiveBlur(); | ||
virtual bool needsPrecomputeBlur(); | ||
virtual std::optional<CBox> boundingBox(); | ||
virtual CRegion opaqueRegion(); | ||
|
||
virtual const char* passName() { | ||
return "COverviewPassElement"; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
all: | ||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp trail.cpp -o hyprtrails.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2 | ||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp trail.cpp TrailPassElement.cpp -o hyprtrails.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2 | ||
clean: | ||
rm ./hyprtrails.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "TrailPassElement.hpp" | ||
#include <hyprland/src/render/OpenGL.hpp> | ||
#include "trail.hpp" | ||
|
||
CTrailPassElement::CTrailPassElement(const CTrailPassElement::STrailData& data_) : data(data_) { | ||
; | ||
} | ||
|
||
void CTrailPassElement::draw(const CRegion& damage) { | ||
data.deco->renderPass(g_pHyprOpenGL->m_RenderData.pMonitor.lock(), data.a); | ||
} | ||
|
||
bool CTrailPassElement::needsLiveBlur() { | ||
return false; | ||
} | ||
|
||
bool CTrailPassElement::needsPrecomputeBlur() { | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
#include <hyprland/src/render/pass/PassElement.hpp> | ||
|
||
class CTrail; | ||
|
||
class CTrailPassElement : public IPassElement { | ||
public: | ||
struct STrailData { | ||
CTrail* deco = nullptr; | ||
float a = 1.F; | ||
}; | ||
|
||
CTrailPassElement(const STrailData& data_); | ||
virtual ~CTrailPassElement() = default; | ||
|
||
virtual void draw(const CRegion& damage); | ||
virtual bool needsLiveBlur(); | ||
virtual bool needsPrecomputeBlur(); | ||
|
||
virtual const char* passName() { | ||
return "CTrailPassElement"; | ||
} | ||
|
||
private: | ||
STrailData data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters