mirror of
https://github.com/hyprwm/hyprcursor.git
synced 2026-01-04 11:30:11 +01:00
use SManagerOptions
This commit is contained in:
parent
685037d34b
commit
001b294f59
2 changed files with 18 additions and 4 deletions
|
|
@ -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();
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -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_);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue