Documentation for <wlr/types/wlr_xcursor_manager.h>

Back to index

Table of contents

struct wlr_xcursor_manager

struct wlr_xcursor_manager {
	char *name;
	uint32_t size;
	struct wl_list scaled_themes; // wlr_xcursor_manager_theme.link
};

struct wlr_xcursor_manager dynamically loads xcursor themes at sizes necessary for use on outputs at arbitrary scale factors. You should call wlr_xcursor_manager_load() for each output you will show your cursor on, with the scale factor parameter set to that output's scale factor.

wlr_xcursor_manager_create()

struct wlr_xcursor_manager *wlr_xcursor_manager_create(​const char *name, uint32_t size);

Creates a new XCursor manager with the given xcursor theme name and base size (for use when scale=1).

wlr_xcursor_manager_destroy()

void wlr_xcursor_manager_destroy(​struct wlr_xcursor_manager *manager);

wlr_xcursor_manager_get_xcursor()

struct wlr_xcursor *wlr_xcursor_manager_get_xcursor(​struct wlr_xcursor_manager *manager, const char *name, float scale);

Retrieves a wlr_xcursor reference for the given cursor name at the given scale factor, or NULL if this struct wlr_xcursor_manager has not loaded a cursor theme at the requested scale.

wlr_xcursor_manager_load()

bool wlr_xcursor_manager_load(​struct wlr_xcursor_manager *manager, float scale);

struct wlr_xcursor_manager_theme

struct wlr_xcursor_manager_theme {
	float scale;
	struct wlr_xcursor_theme *theme;
	struct wl_list link;
};

An XCursor theme at a particular scale factor of the base size.