1
0
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:
Gabor Kiss-Vamosi 2019-10-04 12:25:23 +02:00 committed by GitHub
commit 92b9141788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 7 deletions

View File

@ -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
*==================*/

View File

@ -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
**********************/

View File

@ -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
**********************/

View File

@ -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

View File

@ -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
**********************/

View File

@ -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
**********************/

View File

@ -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
**********************/

View File

@ -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
**********************/

View File

@ -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
**********************/