acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
lv_draw_sdl.h (1792B)
1 /** 2 * @file lv_draw_sdl.h 3 * 4 */ 5 6 #ifndef LV_DRAW_SDL_H 7 #define LV_DRAW_SDL_H 8 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 /********************* 15 * INCLUDES 16 *********************/ 17 #include "../../lv_conf_internal.h" 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 40 struct lv_draw_sdl_context_internals_t; 41 42 typedef struct { 43 /** 44 * Render for display driver 45 */ 46 SDL_Renderer * renderer; 47 void * user_data; 48 } lv_draw_sdl_drv_param_t; 49 50 typedef 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 60 void lv_draw_sdl_init_ctx(lv_disp_drv_t * disp_drv, lv_draw_ctx_t * draw_ctx); 61 62 /** 63 * @brief Free caches 64 * 65 */ 66 void lv_draw_sdl_deinit_ctx(lv_disp_drv_t * disp_drv, lv_draw_ctx_t * draw_ctx); 67 68 SDL_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*/