mirror of
https://github.com/hyprwm/hyprcursor.git
synced 2024-11-17 02:35:57 +01:00
17 lines
464 B
C++
17 lines
464 B
C++
|
#include <iostream>
|
||
|
#include <hyprcursor.hpp>
|
||
|
#include <cairo/cairo.h>
|
||
|
|
||
|
int main(int argc, char** argv) {
|
||
|
Hyprcursor::CHyprcursorManager mgr(nullptr);
|
||
|
|
||
|
// get cursor for arrow
|
||
|
const auto ARROW = mgr.getSurfaceFor("arrow", Hyprcursor::SCursorSurfaceInfo{.size = 64});
|
||
|
|
||
|
// save to disk
|
||
|
const auto RET = cairo_surface_write_to_png(ARROW, "/tmp/arrow.png");
|
||
|
|
||
|
std::cout << "Cairo returned for write: " << RET << "\n";
|
||
|
|
||
|
return !mgr.valid();
|
||
|
}
|