mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
Merge pull request #1217 from amirgon/dev-6.1
use "export" macro to export interesting defines to binding
This commit is contained in:
commit
92b9141788
@ -196,6 +196,12 @@ typedef void * lv_img_decoder_user_data_t;
|
||||
* font's bitmaps */
|
||||
#define LV_ATTRIBUTE_LARGE_CONST
|
||||
|
||||
/* Export integer constant to binding.
|
||||
* This macro is used with constants in the form of LV_<CONST> that
|
||||
* should also appear on lvgl binding API such as Micropython
|
||||
*/
|
||||
#define LV_EXPORT_CONST_INT(int_value)
|
||||
|
||||
/*===================
|
||||
* HAL settings
|
||||
*==================*/
|
||||
|
@ -25,6 +25,8 @@ extern "C" {
|
||||
#define LV_RADIUS_CIRCLE (LV_COORD_MAX) /**< A very big radius to always draw as circle*/
|
||||
#define LV_STYLE_DEGUG_SENTINEL_VALUE 0x12345678
|
||||
|
||||
LV_EXPORT_CONST_INT(LV_RADIUS_CIRCLE);
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
@ -29,6 +29,9 @@ extern "C" {
|
||||
#define LV_COORD_MAX ((lv_coord_t)((uint32_t)((uint32_t)1 << (8 * sizeof(lv_coord_t) - 1)) - 1000))
|
||||
#define LV_COORD_MIN (-LV_COORD_MAX)
|
||||
|
||||
LV_EXPORT_CONST_INT(LV_COORD_MAX);
|
||||
LV_EXPORT_CONST_INT(LV_COORD_MIN);
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
@ -26,13 +26,14 @@ extern "C" {
|
||||
|
||||
/*Possible log level. For compatibility declare it independently from `LV_USE_LOG`*/
|
||||
|
||||
#define LV_LOG_LEVEL_TRACE 0 /**< A lot of logs to give detailed information*/
|
||||
#define LV_LOG_LEVEL_INFO 1 /**< Log important events*/
|
||||
#define LV_LOG_LEVEL_WARN 2 /**< Log if something unwanted happened but didn't caused problem*/
|
||||
#define LV_LOG_LEVEL_ERROR 3 /**< Only critical issue, when the system may fail*/
|
||||
#define LV_LOG_LEVEL_NONE 4 /**< Do not log anything*/
|
||||
#define _LV_LOG_LEVEL_NUM 5 /**< Number of log levels */
|
||||
|
||||
enum {
|
||||
LV_LOG_LEVEL_TRACE = 0, /**< A lot of logs to give detailed information*/
|
||||
LV_LOG_LEVEL_INFO = 1, /**< Log important events*/
|
||||
LV_LOG_LEVEL_WARN = 2, /**< Log if something unwanted happened but didn't caused problem*/
|
||||
LV_LOG_LEVEL_ERROR = 3, /**< Only critical issue, when the system may fail*/
|
||||
LV_LOG_LEVEL_NONE = 4, /**< Do not log anything*/
|
||||
_LV_LOG_LEVEL_NUM = 5 /**< Number of log levels */
|
||||
};
|
||||
typedef int8_t lv_log_level_t;
|
||||
|
||||
#if LV_USE_LOG
|
||||
|
@ -43,6 +43,11 @@ extern "C" {
|
||||
/** log2(LV_BAR_ANIM_STATE_END) used to normalize data*/
|
||||
#define LV_BAR_ANIM_STATE_NORM 8
|
||||
|
||||
LV_EXPORT_CONST_INT(LV_BAR_ANIM_STATE_START);
|
||||
LV_EXPORT_CONST_INT(LV_BAR_ANIM_STATE_END);
|
||||
LV_EXPORT_CONST_INT(LV_BAR_ANIM_STATE_INV);
|
||||
LV_EXPORT_CONST_INT(LV_BAR_ANIM_STATE_NORM);
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
@ -31,6 +31,8 @@ extern "C" {
|
||||
#define LV_BTNM_WIDTH_MASK 0x0007
|
||||
#define LV_BTNM_BTN_NONE 0xFFFF
|
||||
|
||||
LV_EXPORT_CONST_INT(LV_BTNM_BTN_NONE);
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
@ -34,6 +34,9 @@ extern "C" {
|
||||
/**Automatically calculate the tick length*/
|
||||
#define LV_CHART_TICK_LENGTH_AUTO 255
|
||||
|
||||
LV_EXPORT_CONST_INT(LV_CHART_POINT_DEF);
|
||||
LV_EXPORT_CONST_INT(LV_CHART_TICK_LENGTH_AUTO);
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
@ -35,6 +35,10 @@ extern "C" {
|
||||
#define LV_LABEL_POS_LAST 0xFFFF
|
||||
#define LV_LABEL_TEXT_SEL_OFF 0xFFFF
|
||||
|
||||
LV_EXPORT_CONST_INT(LV_LABEL_DOT_NUM);
|
||||
LV_EXPORT_CONST_INT(LV_LABEL_POS_LAST);
|
||||
LV_EXPORT_CONST_INT(LV_LABEL_TEXT_SEL_OFF);
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
@ -39,6 +39,8 @@ extern "C" {
|
||||
*********************/
|
||||
#define LV_TA_CURSOR_LAST (0x7FFF) /*Put the cursor after the last character*/
|
||||
|
||||
LV_EXPORT_CONST_INT(LV_TA_CURSOR_LAST);
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user