rename a lot of functions in lv_misc

This commit is contained in:
Gabor Kiss-Vamosi
2017-11-23 21:28:36 +01:00
parent c3471fd04e
commit 1fcda8092e
175 changed files with 2257 additions and 2289 deletions

View File

@@ -50,7 +50,7 @@ lv_disp_t * lv_disp_register(lv_disp_drv_t *driver)
{
lv_disp_t *node;
node = dm_alloc(sizeof(lv_disp_t));
node = lv_mem_alloc(sizeof(lv_disp_t));
if (!node) return NULL;
memcpy(&node->driver,driver, sizeof(lv_disp_drv_t));
@@ -109,7 +109,7 @@ lv_disp_t * lv_disp_next(lv_disp_t * disp)
* @param y2 bottom coordinate of the rectangle
* @param color fill color
*/
void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, color_t color)
void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color)
{
if(active == NULL) return;
if(active->driver.fill != NULL) active->driver.fill(x1, y1, x2, y2, color);
@@ -123,7 +123,7 @@ void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, color_t color)
* @param y2 bottom coordinate of the rectangle
* @param color_map pointer to an array of colors
*/
void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const color_t * color_map)
void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_map)
{
if(active == NULL) return;
if(active->driver.map != NULL) active->driver.map(x1, y1, x2, y2, color_map);
@@ -136,9 +136,9 @@ void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const color_t *
* @param dest a memory address. Copy 'src' here.
* @param src pointer to pixel map. Copy it to 'dest'.
* @param length number of pixels in 'src'
* @param opa opacity (0, OPA_TRANSP: transparent ... 255, OPA_COVER, fully cover)
* @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover)
*/
void lv_disp_copy(color_t * dest, const color_t * src, uint32_t length, opa_t opa)
void lv_disp_copy(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa)
{
if(active == NULL) return;
if(active->driver.copy != NULL) active->driver.copy(dest, src, length, opa);

View File

@@ -32,9 +32,9 @@ extern "C" {
* Display Driver structure to be registered by HAL
*/
typedef struct _disp_drv_t {
void (*fill)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, color_t color);
void (*map)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const color_t * color_p);
void (*copy)(color_t * dest, const color_t * src, uint32_t length, opa_t opa);
void (*fill)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color);
void (*map)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p);
void (*copy)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
} lv_disp_drv_t;
typedef struct _disp_t {
@@ -82,7 +82,7 @@ lv_disp_t * lv_disp_next(lv_disp_t * disp);
* @param y2 bottom coordinate of the rectangle
* @param color fill color
*/
void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, color_t color);
void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color);
/**
* Put a color map to a rectangular area on the active display
@@ -92,7 +92,7 @@ void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, color_t color)
* @param y2 bottom coordinate of the rectangle
* @param color_map pointer to an array of colors
*/
void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const color_t * color_map);
void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_map);
/**
* Copy pixels to a destination memory applying opacity
@@ -100,9 +100,9 @@ void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const color_t *
* @param dest a memory address. Copy 'src' here.
* @param src pointer to pixel map. Copy it to 'dest'.
* @param length number of pixels in 'src'
* @param opa opacity (0, OPA_TRANSP: transparent ... 255, OPA_COVER, fully cover)
* @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover)
*/
void lv_disp_copy(color_t * dest, const color_t * src, uint32_t length, opa_t opa);
void lv_disp_copy(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
/**
* Shows if 'copy' is supported or not

View File

@@ -45,7 +45,7 @@ lv_indev_t * lv_indev_register(lv_indev_drv_t *driver)
{
lv_indev_t *node;
node = dm_alloc(sizeof(lv_indev_t));
node = lv_mem_alloc(sizeof(lv_indev_t));
if (!node) return NULL;
memcpy(&node->driver, driver, sizeof(lv_indev_drv_t));

View File

@@ -45,7 +45,7 @@ typedef enum {
/*Data type when an input device is read */
typedef struct {
union {
point_t point; /*For INDEV_TYPE_TOUCHPAD, INDEV_TYPE_POINTER, LV_INDEV_TYPE_BUTTON*/
lv_point_t point; /*For INDEV_TYPE_TOUCHPAD, INDEV_TYPE_POINTER, LV_INDEV_TYPE_BUTTON*/
uint32_t key; /*For INDEV_TYPE_KEYPAD*/
};
lv_indev_event_t state; /*LV_INDEV_EVENT_REL or LV_INDEV_EVENT_PR*/
@@ -63,10 +63,10 @@ typedef struct _lv_indev_state_t {
lv_indev_event_t event;
union {
struct {
point_t act_point;
point_t last_point;
point_t vect;
point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DRAG_LIMIT*/
lv_point_t act_point;
lv_point_t last_point;
lv_point_t vect;
lv_point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DRAG_LIMIT*/
struct _lv_obj_t * act_obj;
struct _lv_obj_t * last_obj;