mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
72 lines
1.3 KiB
C
72 lines
1.3 KiB
C
/**
|
|
* @file lv_rect.h
|
|
*
|
|
*/
|
|
|
|
#ifndef LV_LABEL_H
|
|
#define LV_LABEL_H
|
|
|
|
/*********************
|
|
* INCLUDES
|
|
*********************/
|
|
#include "lv_conf.h"
|
|
#if USE_LV_LABEL != 0
|
|
|
|
#include "../lv_obj/lv_obj.h"
|
|
#include "../lv_misc/font.h"
|
|
|
|
/*********************
|
|
* DEFINES
|
|
*********************/
|
|
|
|
/**********************
|
|
* TYPEDEFS
|
|
**********************/
|
|
|
|
typedef struct
|
|
{
|
|
font_types_t font;
|
|
color_t color;
|
|
uint16_t letter_space;
|
|
uint16_t line_space;
|
|
uint8_t mid :1;
|
|
}lv_labels_t;
|
|
|
|
typedef struct
|
|
{
|
|
char * txt_dp;
|
|
uint8_t fixw :1;
|
|
}lv_label_ext_t;
|
|
|
|
typedef enum
|
|
{
|
|
LV_LABELS_DEF,
|
|
LV_LABELS_BTN,
|
|
LV_LABELS_TXT,
|
|
LV_LABELS_TITLE,
|
|
}lv_labels_builtin_t;
|
|
|
|
/**********************
|
|
* GLOBAL PROTOTYPES
|
|
**********************/
|
|
/*Create function*/
|
|
lv_obj_t* lv_label_create(lv_obj_t* par_dp, lv_obj_t * ori_dp);
|
|
|
|
bool lv_label_signal(lv_obj_t* obj_dp, lv_signal_t sign, void * param);
|
|
|
|
|
|
void lv_label_set_text(lv_obj_t* obj_dp, const char * text);
|
|
void lv_label_set_fixw(lv_obj_t * obj_dp, bool fixw);
|
|
const char * lv_label_get_text(lv_obj_t* obj_dp);
|
|
bool lv_label_get_fixw(lv_obj_t * obj_dp);
|
|
|
|
lv_labels_t * lv_labels_get(lv_labels_builtin_t style, lv_labels_t * copy_p);
|
|
|
|
/**********************
|
|
* MACROS
|
|
**********************/
|
|
|
|
#endif
|
|
|
|
#endif
|