2026-06-17 12:55:19 +03:00
|
|
|
#ifndef VGPU_CURSOR_H
|
|
|
|
|
#define VGPU_CURSOR_H
|
|
|
|
|
|
|
|
|
|
/* cursor.h — win32 GDI cursor sample/compose onto a tight BGRA frame. */
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include "ctx.h" /* win32 vgpu_ctx (cursor state) */
|
|
|
|
|
|
|
|
|
|
/* Sample the current cursor (position/shape) into ctx->cursor.
|
|
|
|
|
* Returns 1 if anything changed since last sample, else 0. */
|
|
|
|
|
int cursor_sample(vgpu_ctx* ctx);
|
|
|
|
|
|
2026-06-18 22:06:55 +03:00
|
|
|
/* Sample only cursor position/visibility (no shape extract). Updates
|
|
|
|
|
* ctx->cursor.{visible,x,y}. Cheap (one GetCursorInfo); safe to call every pump tick. */
|
|
|
|
|
void cursor_sample_pos(vgpu_ctx* ctx);
|
|
|
|
|
|
2026-06-17 12:55:19 +03:00
|
|
|
/* Alpha/AND-XOR compose the sampled cursor onto a tight BGRA frame. */
|
|
|
|
|
void cursor_draw(vgpu_ctx* ctx, uint8_t* bgra, uint32_t width, uint32_t height);
|
|
|
|
|
|
|
|
|
|
#endif /* VGPU_CURSOR_H */
|