refacter(conf): use defines for standard includes (#5767)
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com> Co-authored-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "../../lv_examples.h"
|
||||
#if LV_USE_QRCODE && LV_BUILD_EXAMPLES
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* Create a QR Code
|
||||
|
||||
@@ -59,7 +59,7 @@ static lv_subject_t auth_state_subject;
|
||||
static void textarea_event_cb(lv_event_t * e)
|
||||
{
|
||||
lv_obj_t * ta = lv_event_get_target(e);
|
||||
if(strcmp(lv_textarea_get_text(ta), "hello") == 0) {
|
||||
if(lv_strcmp(lv_textarea_get_text(ta), "hello") == 0) {
|
||||
lv_subject_set_int(&auth_state_subject, LOGGED_IN);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -14,8 +14,8 @@ static void btnm_event_handler(lv_event_t * e)
|
||||
lv_obj_t * ta = lv_event_get_user_data(e);
|
||||
const char * txt = lv_buttonmatrix_get_button_text(obj, lv_buttonmatrix_get_selected_button(obj));
|
||||
|
||||
if(strcmp(txt, LV_SYMBOL_BACKSPACE) == 0) lv_textarea_delete_char(ta);
|
||||
else if(strcmp(txt, LV_SYMBOL_NEW_LINE) == 0) lv_obj_send_event(ta, LV_EVENT_READY, NULL);
|
||||
if(lv_strcmp(txt, LV_SYMBOL_BACKSPACE) == 0) lv_textarea_delete_char(ta);
|
||||
else if(lv_strcmp(txt, LV_SYMBOL_NEW_LINE) == 0) lv_obj_send_event(ta, LV_EVENT_READY, NULL);
|
||||
else lv_textarea_add_text(ta, txt);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user