Documentation
¶
Overview ¶
Package xcursor is Go port of libxcursor functions required by wayland/cursor
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadTheme ¶
LoadTheme loads all the cursor images of a given theme and its inherited themes. Each cursor is loaded into []Image which is passed to the caller's load callback. If a cursor appears more than once across all the inherited themes, the load callback will be called multiple times, with possibly different []Image which have the same name.
theme: The name of theme that should be loaded size: The desired size of the cursor images loadCallback: A callback function that will be called for each cursor loaded. The first parameter is name of the cursor representing the loaded cursor and the second is []Image representing the cursor's animated frames, for static ones slice will contain single image.
Types ¶
type Image ¶
type Image struct {
Version uint32 // version of the image data
Size uint32 // nominal size for matching
Width uint32 // actual width
Height uint32 // actual height
HotspotX uint32 // hot spot x (must be inside image)
HotspotY uint32 // hot spot y (must be inside image)
Delay uint32 // animation delay to next frame (ms)
Pixels []byte // pointer to pixels
}