mikroSDK Reference Manual
lv_draw_sdl.h
Go to the documentation of this file.
1
6#ifndef LV_DRAW_SDL_H
7#define LV_DRAW_SDL_H
8
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14/*********************
15 * INCLUDES
16 *********************/
18
19#if LV_USE_GPU_SDL
20
21#include LV_GPU_SDL_INCLUDE_PATH
22
23#include "../lv_draw.h"
24#include "../../core/lv_disp.h"
25
26/*********************
27 * DEFINES
28 *********************/
29
30#if SDL_BYTEORDER == SDL_BIG_ENDIAN
31#define LV_DRAW_SDL_TEXTURE_FORMAT SDL_PIXELFORMAT_ARGB8888
32#else
33#define LV_DRAW_SDL_TEXTURE_FORMAT SDL_PIXELFORMAT_RGBA8888
34#endif
35
36/**********************
37 * TYPEDEFS
38 **********************/
39
40struct lv_draw_sdl_context_internals_t;
41
42typedef struct {
46 SDL_Renderer * renderer;
47 void * user_data;
48} lv_draw_sdl_drv_param_t;
49
50typedef struct {
51 lv_draw_ctx_t base_draw;
52 SDL_Renderer * renderer;
53 struct lv_draw_sdl_context_internals_t * internals;
54} lv_draw_sdl_ctx_t;
55
56/**********************
57 * GLOBAL PROTOTYPES
58 **********************/
59
60void lv_draw_sdl_init_ctx(lv_disp_drv_t * disp_drv, lv_draw_ctx_t * draw_ctx);
61
66void lv_draw_sdl_deinit_ctx(lv_disp_drv_t * disp_drv, lv_draw_ctx_t * draw_ctx);
67
68SDL_Texture * lv_draw_sdl_create_screen_texture(SDL_Renderer * renderer, lv_coord_t hor, lv_coord_t ver);
69
70/*======================
71 * Add/remove functions
72 *=====================*/
73
74/*=====================
75 * Setter functions
76 *====================*/
77
78/*=====================
79 * Getter functions
80 *====================*/
81
82/*=====================
83 * Other functions
84 *====================*/
85
86/**********************
87 * MACROS
88 **********************/
89
90#endif /*LV_USE_GPU_SDL*/
91
92#ifdef __cplusplus
93} /*extern "C"*/
94#endif
95
96#endif /*LV_DRAW_SDL_H*/
Definition lv_hal_disp.h:77
Definition lv_draw.h:59