2019-11-01 11:09:56 +01:00
|
|
|
/**
|
|
|
|
* @file lv_api_map.h
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LV_API_MAP_H
|
|
|
|
#define LV_API_MAP_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*********************
|
|
|
|
* INCLUDES
|
|
|
|
*********************/
|
2019-12-21 20:36:19 +01:00
|
|
|
#include "../lvgl.h"
|
2019-11-01 11:09:56 +01:00
|
|
|
|
|
|
|
/*********************
|
|
|
|
* DEFINES
|
|
|
|
*********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* TYPEDEFS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/**********************
|
|
|
|
* GLOBAL PROTOTYPES
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
/*---------------------
|
|
|
|
* V6.0 COMPATIBILITY
|
|
|
|
*--------------------*/
|
2019-11-25 12:24:17 +01:00
|
|
|
|
2020-05-01 11:17:43 +02:00
|
|
|
static inline void lv_task_once(lv_task_t * task)
|
2020-04-15 17:57:06 -04:00
|
|
|
{
|
|
|
|
lv_task_set_repeat_count(task, 1);
|
|
|
|
}
|
|
|
|
|
2020-05-02 18:36:52 -04:00
|
|
|
#if LV_USE_CHECKBOX
|
|
|
|
|
|
|
|
#define lv_checkbox_set_static_text lv_checkbox_set_text_static
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2019-11-25 12:24:17 +01:00
|
|
|
#if LV_USE_CHART
|
|
|
|
|
2019-11-04 16:56:57 +01:00
|
|
|
#define lv_chart_get_point_cnt lv_chart_get_point_count
|
2019-11-01 11:09:56 +01:00
|
|
|
|
2019-11-25 12:24:17 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2020-02-14 12:36:44 +01:00
|
|
|
#if LV_USE_DROPDOWN
|
2019-11-25 12:24:17 +01:00
|
|
|
|
2020-02-14 12:36:44 +01:00
|
|
|
static inline void lv_dropdown_set_draw_arrow(lv_obj_t * ddlist, bool en)
|
2019-11-20 16:18:56 +01:00
|
|
|
{
|
2020-02-14 12:36:44 +01:00
|
|
|
if(en) lv_dropdown_set_symbol(ddlist, LV_SYMBOL_DOWN);
|
|
|
|
else lv_dropdown_set_symbol(ddlist, NULL);
|
2019-11-20 16:18:56 +01:00
|
|
|
}
|
|
|
|
|
2020-02-14 12:36:44 +01:00
|
|
|
static inline bool lv_dropdown_get_draw_arrow(lv_obj_t * ddlist)
|
2019-11-20 16:18:56 +01:00
|
|
|
{
|
2020-02-14 12:36:44 +01:00
|
|
|
if(lv_dropdown_get_symbol(ddlist)) return true;
|
2019-11-20 16:18:56 +01:00
|
|
|
else return false;
|
|
|
|
}
|
2019-11-01 11:09:56 +01:00
|
|
|
|
2020-05-02 18:36:52 -04:00
|
|
|
#define lv_dropdown_set_static_options lv_dropdown_set_options_static
|
|
|
|
|
2019-11-25 12:24:17 +01:00
|
|
|
#endif
|
|
|
|
|
2019-12-02 16:09:35 +01:00
|
|
|
#if LV_USE_BAR
|
2019-12-02 07:37:33 -05:00
|
|
|
|
|
|
|
/**
|
2019-12-02 16:09:35 +01:00
|
|
|
* Make the bar symmetric to zero. The indicator will grow from zero instead of the minimum
|
2019-12-02 07:37:33 -05:00
|
|
|
* position.
|
2019-12-02 16:09:35 +01:00
|
|
|
* @param bar pointer to a bar object
|
2019-12-02 07:37:33 -05:00
|
|
|
* @param en true: enable disable symmetric behavior; false: disable
|
2019-12-02 16:09:35 +01:00
|
|
|
* @deprecated As of v7.0, you should use `lv_bar_set_type` instead.
|
2019-12-02 07:37:33 -05:00
|
|
|
*/
|
2019-12-02 16:09:35 +01:00
|
|
|
static inline void lv_bar_set_sym(lv_obj_t * bar, bool en)
|
2019-12-02 07:37:33 -05:00
|
|
|
{
|
2019-12-02 16:09:35 +01:00
|
|
|
if(en)
|
2020-03-04 16:29:21 +01:00
|
|
|
lv_bar_set_type(bar, LV_BAR_TYPE_SYMMETRICAL);
|
2019-12-02 16:09:35 +01:00
|
|
|
else
|
|
|
|
lv_bar_set_type(bar, LV_BAR_TYPE_NORMAL);
|
2019-12-02 07:37:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-12-02 16:09:35 +01:00
|
|
|
* Get whether the bar is symmetric or not.
|
|
|
|
* @param bar pointer to a bar object
|
2019-12-02 07:37:33 -05:00
|
|
|
* @return true: symmetric is enabled; false: disable
|
2019-12-02 16:09:35 +01:00
|
|
|
* @deprecated As of v7.0, you should use `lv_bar_get_type` instead.
|
2019-12-02 07:37:33 -05:00
|
|
|
*/
|
2020-02-26 19:48:27 +01:00
|
|
|
static inline bool lv_bar_get_sym(lv_obj_t * bar)
|
|
|
|
{
|
2020-03-04 16:29:21 +01:00
|
|
|
return lv_bar_get_type(bar) == LV_BAR_TYPE_SYMMETRICAL;
|
2019-12-02 07:37:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2020-05-02 18:36:52 -04:00
|
|
|
#if LV_USE_LABEL
|
|
|
|
|
|
|
|
#define lv_label_set_static_text lv_label_set_text_static
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2019-12-02 16:09:35 +01:00
|
|
|
#if LV_USE_SLIDER
|
2019-12-02 07:37:33 -05:00
|
|
|
|
|
|
|
/**
|
2019-12-02 16:09:35 +01:00
|
|
|
* Make the slider symmetric to zero. The indicator will grow from zero instead of the minimum
|
2019-12-02 07:37:33 -05:00
|
|
|
* position.
|
2019-12-02 16:09:35 +01:00
|
|
|
* @param slider pointer to a bar object
|
2019-12-02 07:37:33 -05:00
|
|
|
* @param en true: enable disable symmetric behavior; false: disable
|
2019-12-02 16:09:35 +01:00
|
|
|
* @deprecated As of v7.0, you should use `lv_slider_set_type` instead.
|
2019-12-02 07:37:33 -05:00
|
|
|
*/
|
2019-12-02 16:09:35 +01:00
|
|
|
static inline void lv_slider_set_sym(lv_obj_t * slider, bool en)
|
2019-12-02 07:37:33 -05:00
|
|
|
{
|
2020-02-26 19:48:27 +01:00
|
|
|
lv_bar_set_sym(slider, en);
|
2019-12-02 07:37:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-12-02 16:09:35 +01:00
|
|
|
* Get whether the slider is symmetric or not.
|
|
|
|
* @param slider pointer to a slider object
|
2019-12-02 07:37:33 -05:00
|
|
|
* @return true: symmetric is enabled; false: disable
|
2019-12-02 16:09:35 +01:00
|
|
|
* @deprecated As of v7.0, you should use `lv_slider_get_type` instead.
|
2019-12-02 07:37:33 -05:00
|
|
|
*/
|
2020-02-26 19:48:27 +01:00
|
|
|
static inline bool lv_slider_get_sym(lv_obj_t * slider)
|
|
|
|
{
|
|
|
|
return lv_bar_get_sym(slider);
|
2019-12-02 07:37:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2019-11-01 11:09:56 +01:00
|
|
|
/**********************
|
|
|
|
* MACROS
|
|
|
|
**********************/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /*LV_API_MAP_H*/
|