Files
vatrog-vm-vgpu-streamer/src/stream/win32/cursor.h
T

21 lines
750 B
C
Raw Normal View History

#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);
/* 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);
/* 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 */