GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_cursor.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later
2/*
3 * Copyright (C) 2024 Cyril Hrubis <metan@ucw.cz>
4 */
5
10#ifndef GP_CURSOR
11#define GP_CURSOR
12
13#include <stdint.h>
14#include <core/gp_types.h>
15#include <core/gp_pixel.h>
16
18typedef struct gp_cursor {
24 int8_t x_off, y_off;
26 uint8_t w, h;
38 uint8_t *pixmap;
40
49extern gp_cursor *gp_cursors_32[];
50
62 gp_pixel fg, gp_pixel bg, uint32_t x_off, uint32_t y_off);
63
64#endif /* GP_CURSOR */
A common types.
uint32_t gp_pixel
Pixel integer value.
Definition gp_types.h:33
struct gp_cursor gp_cursor
A cursor pixmap.
gp_cursor * gp_cursors_32[]
void gp_cursor_render(gp_cursor *self, gp_pixmap *dst, gp_pixel fg, gp_pixel bg, uint32_t x_off, uint32_t y_off)
Renders a cursor into a pixmap.
A pixel description.
A cursor pixmap.
Definition gp_cursor.h:18
uint8_t w
Cursor pixmap size in pixels.
Definition gp_cursor.h:26
uint8_t * pixmap
A cursor pixmap.
Definition gp_cursor.h:38
int8_t x_off
Offset to start drawing the cursor in pixels.
Definition gp_cursor.h:24
A pixmap buffer.
Definition gp_pixmap.h:33