/** * @file lv_sw.h * */ /*Search an replace: switch -> object normal name with lower case (e.g. button, label etc.) * sw -> object short name with lower case(e.g. btn, label etc) * SW -> object short name with upper case (e.g. BTN, LABEL etc.) * */ #ifndef LV_SW_H #define LV_SW_H #ifdef __cplusplus extern "C" { #endif /********************* * INCLUDES *********************/ #include "lv_conf.h" #if USE_LV_SW != 0 #include "../lv_obj/lv_obj.h" /********************* * DEFINES *********************/ /********************** * TYPEDEFS **********************/ /*Data of switch*/ typedef struct { /*Ext. of ancestor*/ /*New data for this type */ }lv_sw_ext_t; /********************** * GLOBAL PROTOTYPES **********************/ /** * Create a switch objects * @param par pointer to an object, it will be the parent of the new switch * @param copy pointer to a switch object, if not NULL then the new object will be copied from it * @return pointer to the created switch */ lv_obj_t * lv_sw_create(lv_obj_t * par, lv_obj_t * copy); /** * Signal function of the switch * @param sw pointer to a switch object * @param sign a signal type from lv_signal_t enum * @param param pointer to a signal specific variable * @return true: the object is still valid (not deleted), false: the object become invalid */ bool lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param); /********************** * MACROS **********************/ #endif /*USE_LV_SW*/ #ifdef __cplusplus } /* extern "C" */ #endif #endif /*LV_SW_H*/