Muteki
EABI code execution on Besta® RTOS devices.
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
10
11#ifndef __MUTEKI_DRAW_TYPES_SURFACE_H__
12#define __MUTEKI_DRAW_TYPES_SURFACE_H__
13
14#include "../../common.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
68
107
121
126typedef struct lcd_surface_s {
131 char magic[2]; // 0:2
135 short width; // 2:4
139 short height; // 4:6
144 short depth; // 6:8
149 short xsize; // 8:10
154 short encoding; // 10:12
159 int *palette; // 12:16
164 void *buffer; // 16:20
165} lcd_surface_t; // 20 bytes
166
167#ifdef __cplusplus
168} // extern "C"
169#endif
170
171#endif // __MUTEKI_DRAW_TYPES_SURFACE_H__
Common include file for all muteki-shims headers.
Descriptor of an LCD drawing surface or hardware framebuffer.
Definition surface.h:126
int * palette
Palette used to pack RGBA color into pixels.
Definition surface.h:159
short xsize
Pixel row size in bytes (aka. pitch if you know SDL).
Definition surface.h:149
char magic[2]
Header magic.
Definition surface.h:131
short height
Height of the framebuffer.
Definition surface.h:139
short depth
Depth of the color in bits.
Definition surface.h:144
short encoding
Pixel buffer encoding.
Definition surface.h:154
short width
Width of the framebuffer.
Definition surface.h:135
void * buffer
The actual framebuffer/surface pixel buffer region.
Definition surface.h:164
lcd_surface_pixfmt_e
Valid pixel formats for LCD surfaces.
Definition surface.h:73
@ LCD_SURFACE_PIXFMT_L4
4-bit index color.
Definition surface.h:81
@ LCD_SURFACE_PIXFMT_L1
1-bit index color.
Definition surface.h:77
@ LCD_SURFACE_PIXFMT_RGB444
12-bit RGB444.
Definition surface.h:89
@ LCD_SURFACE_PIXFMT_RGB565
16-bit RGB565.
Definition surface.h:93
@ LCD_SURFACE_PIXFMT_L8
8-bit index color.
Definition surface.h:85
@ LCD_SURFACE_PIXFMT_RGB
24-bit RGB.
Definition surface.h:97
@ LCD_SURFACE_PIXFMT_XRGB
32-bit XRGB.
Definition surface.h:101
@ LCD_SURFACE_PIXFMT_ARGB
32-bit ARGB (alias of LCD_SURFACE_PIXFMT_XRGB).
Definition surface.h:105
struct lcd_surface_s lcd_surface_t
Descriptor of an LCD drawing surface or hardware framebuffer.
lcd_surface_blit_flag_e
Process flags for blit operations.
Definition surface.h:27
@ LCD_SURFACE_BLIT_ALPHA_BLENDING_FAST
Perform alpha blending (when supported).
Definition surface.h:66
@ LCD_SURFACE_BLIT_TRANSPARENT
Honor transparent color settings on the current LCD canvas.
Definition surface.h:54
@ LCD_SURFACE_BLIT_ALPHA_BLENDING
Perform alpha blending (when supported).
Definition surface.h:59
@ LCD_SURFACE_BLIT_NONE
Nothing.
Definition surface.h:32
@ LCD_SURFACE_BLIT_XOR
Perform XOR operation between source line and destination line.
Definition surface.h:48
@ LCD_SURFACE_BLIT_OR
Perform OR operation between source line and destination line.
Definition surface.h:43
@ LCD_SURFACE_BLIT_AND
Perform AND operation between source line and destination line.
Definition surface.h:37
lcd_surface_encoding_e
Valid pixel buffer encoding for LCD surfaces.
Definition surface.h:111
@ LCD_SURFACE_ENCODING_RAW
Pixel buffer is in raw format.
Definition surface.h:119
@ LCD_SURFACE_ENCODING_HCA
Pixel buffer is contained in HCA container.
Definition surface.h:115