1 /** 2 * @file lv_sdl2.h 3 * 4 */ 5 6 #ifndef LV_SDL2_H 7 #define LV_SDL2_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #if LV_USE_OS == LV_OS_SDL2 17 #include <SDL2/SDL.h> 18 #include <stdbool.h> 19 20 /********************* 21 * DEFINES 22 *********************/ 23 24 /********************** 25 * TYPEDEFS 26 **********************/ 27 typedef struct { 28 SDL_Thread * thread; 29 void (*callback)(void *); 30 void * user_data; 31 } lv_thread_t; 32 33 typedef SDL_mutex * lv_mutex_t; 34 35 typedef struct { 36 SDL_mutex * mutex; 37 SDL_cond * cond; 38 bool v; 39 } lv_thread_sync_t; 40 41 /********************** 42 * GLOBAL PROTOTYPES 43 **********************/ 44 45 /********************** 46 * MACROS 47 **********************/ 48 49 #endif /*LV_USE_OS == LV_OS_SDL2*/ 50 51 #ifdef __cplusplus 52 } /*extern "C"*/ 53 #endif 54 55 #endif /*LV_SDL2_H*/ 56