diff --git a/include/hyprcursor/hyprcursor.hpp b/include/hyprcursor/hyprcursor.hpp index c5dd939..e543a8c 100644 --- a/include/hyprcursor/hyprcursor.hpp +++ b/include/hyprcursor/hyprcursor.hpp @@ -47,6 +47,20 @@ namespace Hyprcursor { eHyprcursorDataType type = HC_DATA_PNG; }; + /*! + struct for cursor manager options + */ + struct SManagerOptions { + /*! + The function used for logging by the cursor manager + */ + PHYPRCURSORLOGFUNC logFn = nullptr; + /*! + Allow fallback to env and first theme found + */ + bool allowDefaultFallback = true; + }; + /*! Basic Hyprcursor manager. @@ -68,7 +82,7 @@ namespace Hyprcursor { \since 0.1.6 */ CHyprcursorManager(const char* themeName, PHYPRCURSORLOGFUNC fn); - CHyprcursorManager(const char* themeName, PHYPRCURSORLOGFUNC fn, bool allowDefaultFallback); + CHyprcursorManager(const char* themeName, SManagerOptions options); ~CHyprcursorManager(); /*! diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp index 5983ac9..e20d3f2 100644 --- a/libhyprcursor/hyprcursor.cpp +++ b/libhyprcursor/hyprcursor.cpp @@ -210,9 +210,9 @@ CHyprcursorManager::CHyprcursorManager(const char* themeName_, PHYPRCURSORLOGFUN init(themeName_); } -CHyprcursorManager::CHyprcursorManager(const char* themeName_, PHYPRCURSORLOGFUNC fn, bool allowDefaultFallback_) { - allowDefaultFallback = allowDefaultFallback_; - logFn = fn; +CHyprcursorManager::CHyprcursorManager(const char* themeName_, SManagerOptions options) { + logFn = options.logFn; + allowDefaultFallback = options.allowDefaultFallback; init(themeName_); }