muteki
Loading...
Searching...
No Matches
surface.h
Go to the documentation of this file.
1/*
2 * Copyright 2024 dogtopus
3 * SPDX-License-Identifier: MIT
4 */
5
11#ifndef __MUTEKI_UI_SURFACE_H__
12#define __MUTEKI_UI_SURFACE_H__
13
14#include <muteki/ui/common.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
26extern size_t SizeofGraphic(lcd_surface_t *surface);
27
45extern lcd_surface_t *InitGraphic(lcd_surface_t *surface, short width, short height, short depth);
46
72extern void _BitBlt(
73 lcd_surface_t *dst,
74 short xdstoffset,
75 short ydstoffset,
76 short xsize,
77 short ysize,
78 lcd_surface_t *src,
79 int xsrcoffset,
80 int ysrcoffset,
81 unsigned short flags
82);
83
92extern size_t GetImageSize(short width, short height);
93
104extern size_t GetImageSizeExt(short width, short height, short depth);
105
115extern void *ImageData(lcd_surface_t *surface);
116
129extern size_t SizeofImage(lcd_surface_t *surface);
130
140extern void FreeImage(lcd_surface_t *surface);
141#ifdef __cplusplus
142} // extern "C"
143#endif
144
145#endif // __MUTEKI_UI_SURFACE_H__
Descriptor of an LCD drawing surface or hardware framebuffer.
Definition common.h:728
size_t SizeofGraphic(lcd_surface_t *surface)
Calculate the total on-memory size of a surface (including descriptor).
void _BitBlt(lcd_surface_t *dst, short xdstoffset, short ydstoffset, short xsize, short ysize, lcd_surface_t *src, int xsrcoffset, int ysrcoffset, unsigned short flags)
Perform blit operation from src surface to dst surface.
void * ImageData(lcd_surface_t *surface)
Get the palette and bitmap buffer for an all-in-one surface.
size_t GetImageSizeExt(short width, short height, short depth)
Calculate the buffer size required for an all-in-one surface of a specific pixel format and size.
size_t GetImageSize(short width, short height)
Calculate the buffer size required for an all-in-one surface of a specific size.
void FreeImage(lcd_surface_t *surface)
Dispose an all-in-one surface.
lcd_surface_t * InitGraphic(lcd_surface_t *surface, short width, short height, short depth)
Initialize a buffer as an all-in-one surface.
size_t SizeofImage(lcd_surface_t *surface)
Get the total on-memory size of a surface, in bytes.
Common data structures and definitions for the UI subsystem.