1 /** 2 * @file lv_qrcode 3 * 4 */ 5 6 #ifndef LV_QRCODE_H 7 #define LV_QRCODE_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include "../../../lvgl.h" 17 #if LV_USE_QRCODE 18 19 /********************* 20 * DEFINES 21 *********************/ 22 23 extern const lv_obj_class_t lv_qrcode_class; 24 25 /********************** 26 * TYPEDEFS 27 **********************/ 28 29 /********************** 30 * GLOBAL PROTOTYPES 31 **********************/ 32 33 /** 34 * Create an empty QR code (an `lv_canvas`) object. 35 * @param parent point to an object where to create the QR code 36 * @param size width and height of the QR code 37 * @param dark_color dark color of the QR code 38 * @param light_color light color of the QR code 39 * @return pointer to the created QR code object 40 */ 41 lv_obj_t * lv_qrcode_create(lv_obj_t * parent, lv_coord_t size, lv_color_t dark_color, lv_color_t light_color); 42 43 /** 44 * Set the data of a QR code object 45 * @param qrcode pointer to aQ code object 46 * @param data data to display 47 * @param data_len length of data in bytes 48 * @return LV_RES_OK: if no error; LV_RES_INV: on error 49 */ 50 lv_res_t lv_qrcode_update(lv_obj_t * qrcode, const void * data, uint32_t data_len); 51 52 /** 53 * DEPRECATED: Use normal lv_obj_del instead 54 * Delete a QR code object 55 * @param qrcode pointer to a QR code object 56 */ 57 void lv_qrcode_delete(lv_obj_t * qrcode); 58 59 /********************** 60 * MACROS 61 **********************/ 62 63 #endif /*LV_USE_QRCODE*/ 64 65 #ifdef __cplusplus 66 } /* extern "C" */ 67 #endif 68 69 #endif /*LV_QRCODE_H*/ 70