1 /** 2 * MIT License 3 * 4 * ----------------------------------------------------------------------------- 5 * Copyright (c) 2008-24 Think Silicon Single Member PC 6 * ----------------------------------------------------------------------------- 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * of this software and associated documentation files (the "Software"), to deal 10 * in the Software without restriction, including without limitation the rights to 11 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 12 * the Software, and to permit persons to whom the Software is furnished to do so, 13 * subject to the following conditions: 14 * 15 * The above copyright notice and this permission notice (including the next paragraph) 16 * shall be included in all copies or substantial portions of the Software. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 19 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 22 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 23 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 * 25 */ 26 27 /** 28 * @file lv_draw_nema_gfx.h 29 * 30 */ 31 32 #ifndef LV_DRAW_NEMA_GFX_H 33 #define LV_DRAW_NEMA_GFX_H 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 /********************* 40 * INCLUDES 41 *********************/ 42 #include "../../lv_conf_internal.h" 43 44 #if LV_USE_NEMA_GFX 45 46 #include "lv_draw_nema_gfx_utils.h" 47 48 #include "../lv_draw_private.h" 49 #include "../lv_draw_buf_private.h" 50 #include "../lv_draw_image_private.h" 51 #include "../lv_image_decoder_private.h" 52 #include "../lv_draw_label_private.h" 53 #include "../lv_draw_mask_private.h" 54 #include "../lv_draw_rect_private.h" 55 #include "../lv_draw_triangle_private.h" 56 #include "../lv_draw_vector_private.h" 57 58 #include "../../misc/lv_area_private.h" 59 60 /********************** 61 * TYPEDEFS 62 **********************/ 63 typedef struct { 64 lv_draw_unit_t base_unit; 65 lv_draw_task_t * task_act; 66 #if LV_USE_OS 67 lv_thread_sync_t sync; 68 lv_thread_t thread; 69 volatile bool inited; 70 volatile bool exit_status; 71 #endif 72 uint32_t idx; 73 nema_cmdlist_t cl; 74 #if LV_USE_NEMA_VG 75 NEMA_VG_PAINT_HANDLE paint; 76 NEMA_VG_GRAD_HANDLE gradient; 77 NEMA_VG_PATH_HANDLE path; 78 #endif 79 } lv_draw_nema_gfx_unit_t; 80 81 /********************** 82 * GLOBAL PROTOTYPES 83 **********************/ 84 85 void lv_draw_nema_gfx_init(void); 86 87 void lv_draw_nema_gfx_deinit(void); 88 89 void lv_draw_nema_gfx_fill(lv_draw_unit_t * draw_unit, 90 const lv_draw_fill_dsc_t * dsc, const lv_area_t * coords); 91 92 void lv_draw_nema_gfx_triangle(lv_draw_unit_t * draw_unit, const lv_draw_triangle_dsc_t * dsc); 93 94 void lv_draw_nema_gfx_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * dsc, 95 const lv_area_t * coords); 96 97 void lv_draw_nema_gfx_label(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * dsc, 98 const lv_area_t * coords); 99 100 void lv_draw_nema_gfx_label_init(lv_draw_unit_t * draw_unit); 101 102 void lv_draw_nema_gfx_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, 103 const lv_area_t * coords); 104 105 void lv_draw_nema_gfx_line(lv_draw_unit_t * draw_unit, const lv_draw_line_dsc_t * dsc); 106 107 void lv_draw_nema_gfx_border(lv_draw_unit_t * draw_unit, const lv_draw_border_dsc_t * dsc, 108 const lv_area_t * coords); 109 110 void lv_draw_nema_gfx_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * dsc, 111 const lv_area_t * coords); 112 113 114 /********************** 115 * MACROS 116 **********************/ 117 118 #endif /*LV_USE_NEMA_GFX*/ 119 120 #ifdef __cplusplus 121 } /*extern "C"*/ 122 #endif 123 124 #endif /*LV_DRAW_NEMA_GFX_H*/ 125