/** * @file lv_sw.h * */ #ifndef LV_SWITCH_H #define LV_SWITCH_H #ifdef __cplusplus extern "C" { #endif /********************* * INCLUDES *********************/ #include "../lv_conf_internal.h" #if LV_USE_SWITCH != 0 /*Testing of dependencies*/ #if LV_USE_SLIDER == 0 #error "lv_switch: lv_slider is required. Enable it in lv_conf.h (LV_USE_SLIDER 1)" #endif #include "../core/lv_obj.h" /********************* * DEFINES *********************/ /********************** * TYPEDEFS **********************/ typedef struct { lv_obj_t obj; }_lv_switch_t; /*Trick to no expose the fields of the struct in the MicroPython binding*/ typedef _lv_switch_t lv_switch_t; extern const lv_obj_class_t lv_switch_class; /********************** * GLOBAL PROTOTYPES **********************/ /** * Create a switch objects * @param parent pointer to an object, it will be the parent of the new switch * @return pointer to the created switch */ lv_obj_t * lv_switch_create(lv_obj_t * parent); /********************** * MACROS **********************/ #endif /*LV_USE_SWITCH*/ #ifdef __cplusplus } /*extern "C"*/ #endif #endif /*LV_SWITCH_H*/