| 1234567891011121314151617181920212223242526272829 |
- /* Mouse-cursor images: the NBCUR1 bundle from /ramfs/cursors (see
- * include/cursor_abi.h), with a built-in 16x16 arrow as the fallback. */
- #ifndef CURSOR_H
- #define CURSOR_H
- #include "cursor_abi.h"
- struct cursor_image {
- const unsigned int *px; /* premultiplied ARGB8888, w*h */
- unsigned int w, h;
- unsigned int hot_x, hot_y;
- unsigned int frames; /* >= 1 */
- unsigned int delay_ms; /* per frame when frames > 1 */
- };
- /* (Re)load the bundle from the ramfs into page-allocated memory. Called
- * after ramfs_init() and from ramfs_replace(); the mouse is told to pick up
- * the new images. A missing or invalid bundle keeps the previous one (or
- * the built-in arrow). */
- void cursor_load(void);
- /* Fill *out with frame `frame` (mod the frame count) of `shape`. An
- * unknown shape, or one the bundle lacks, gives the default arrow. */
- void cursor_get(int shape, unsigned int frame, struct cursor_image *out);
- /* 1 when the bundle is loaded (0 = built-in arrow only). */
- int cursor_bundle_loaded(void);
- #endif
|