mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-19 16:13:21 +02:00
parent
1ae25556a1
commit
438daf1dfb
9 changed files with 268 additions and 13 deletions
|
@ -1,15 +1,18 @@
|
|||
#include "globals.hpp"
|
||||
#include <memory>
|
||||
|
||||
#define private public
|
||||
#include <hyprland/src/managers/PointerManager.hpp>
|
||||
#undef private
|
||||
#include <hyprutils/math/Vector2D.hpp>
|
||||
#include <hyprland/src/managers/eventLoop/EventLoopManager.hpp>
|
||||
#include <hyprcursor/hyprcursor.hpp>
|
||||
|
||||
#include "mode/ModeRotate.hpp"
|
||||
#include "mode/ModeTilt.hpp"
|
||||
#include "mode/ModeStretch.hpp"
|
||||
#include "other/Shake.hpp"
|
||||
#include "highres.hpp"
|
||||
|
||||
class CDynamicCursors {
|
||||
public:
|
||||
|
@ -34,6 +37,8 @@ class CDynamicCursors {
|
|||
void setShape(const std::string& name);
|
||||
/* hook on setCursorSoftware */
|
||||
void unsetShape();
|
||||
/* hook on updateTheme */
|
||||
void updateTheme();
|
||||
|
||||
/* hook on move, indicate that next onCursorMoved is actual move */
|
||||
void setMove();
|
||||
|
@ -41,6 +46,9 @@ class CDynamicCursors {
|
|||
private:
|
||||
SP<CEventLoopTimer> tick;
|
||||
|
||||
/* hyprcursor handler for highres images */
|
||||
CHighresHandler highres;
|
||||
|
||||
// current state of the cursor
|
||||
SModeResult resultMode;
|
||||
double resultShake;
|
||||
|
@ -70,4 +78,4 @@ class CDynamicCursors {
|
|||
void calculate(EModeUpdate type);
|
||||
};
|
||||
|
||||
inline std::unique_ptr<CDynamicCursors> g_pDynamicCursors;
|
||||
inline UP<CDynamicCursors> g_pDynamicCursors;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue