BigW Consortium Gitlab

Commit b95f9128 by Kiss-Vamosi Gabor

lv_btn_action_t bugfix

parent ad786859
......@@ -231,7 +231,7 @@ void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state)
* @param btn pointer to a button object
* @param pr_action pointer to function
*/
void lv_btn_set_pr_action(lv_obj_t * btn, lv_action_res_t (*pr_action)(lv_obj_t *, lv_dispi_t *))
void lv_btn_set_pr_action(lv_obj_t * btn, lv_btn_action_t pr_action)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
......@@ -243,7 +243,7 @@ void lv_btn_set_pr_action(lv_obj_t * btn, lv_action_res_t (*pr_action)(lv_obj_t
* @param btn pointer to a button object
* @param rel_action pointer to functionREL
*/
void lv_btn_set_rel_action(lv_obj_t * btn, lv_action_res_t (*rel_action)(lv_obj_t *, lv_dispi_t *))
void lv_btn_set_rel_action(lv_obj_t * btn, lv_btn_action_t rel_action)
{
lv_btn_ext_t * btn_p = lv_obj_get_ext(btn);
......@@ -255,7 +255,7 @@ void lv_btn_set_rel_action(lv_obj_t * btn, lv_action_res_t (*rel_action)(lv_obj_
* @param btn pointer to a button object
* @param lpr_action pointer to function
*/
void lv_btn_set_lpr_action(lv_obj_t * btn, lv_action_res_t (*lpr_action)(lv_obj_t *, lv_dispi_t *))
void lv_btn_set_lpr_action(lv_obj_t * btn, lv_btn_action_t lpr_action)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
......@@ -267,7 +267,7 @@ void lv_btn_set_lpr_action(lv_obj_t * btn, lv_action_res_t (*lpr_action)(lv_obj_
* @param btn pointer to a button object
* @param lpr_rep_action pointer to function
*/
void lv_btn_set_lpr_rep_action(lv_obj_t * btn, lv_action_res_t (*lpr_rep_action)(lv_obj_t *, lv_dispi_t *))
void lv_btn_set_lpr_rep_action(lv_obj_t * btn, lv_btn_action_t lpr_rep_action)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
......
......@@ -39,7 +39,7 @@ typedef enum
LV_ACTION_RES_INV = 0,
}lv_action_res_t;
typedef lv_action_res_t (lv_btn_action_t) (lv_obj_t*, lv_dispi_t *);
typedef lv_action_res_t (*lv_btn_action_t) (lv_obj_t*, lv_dispi_t *);
typedef struct
{
......@@ -73,10 +73,10 @@ typedef struct
{
lv_rect_ext_t rect_ext; /*Ext. of ancestor*/
/*New data for this type */
lv_action_res_t (*pr_action)(lv_obj_t *, lv_dispi_t *);
lv_action_res_t (*rel_action)(lv_obj_t *, lv_dispi_t *);
lv_action_res_t (*lpr_action)(lv_obj_t *, lv_dispi_t *);
lv_action_res_t (*lpr_rep_action)(lv_obj_t *, lv_dispi_t *);
lv_btn_action_t pr_action;
lv_btn_action_t rel_action;
lv_btn_action_t lpr_action;
lv_btn_action_t lpr_rep_action;
lv_btn_state_t state;
uint8_t tgl :1; /*1: Toggle enabled*/
......@@ -94,10 +94,10 @@ lv_btns_t * lv_btns_get(lv_btns_builtin_t style, lv_btns_t * copy);
void lv_btn_set_tgl(lv_obj_t * btn, bool tgl);
void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state);
void lv_btn_set_pr_action(lv_obj_t * btn, lv_action_res_t (*pr_action)(lv_obj_t *, lv_dispi_t *));
void lv_btn_set_rel_action(lv_obj_t * btn, lv_action_res_t (*rel_action)(lv_obj_t *, lv_dispi_t *));
void lv_btn_set_lpr_action(lv_obj_t * btn, lv_action_res_t (*lpr_action)(lv_obj_t *, lv_dispi_t *));
void lv_btn_set_lpr_rep_action(lv_obj_t * btn, lv_action_res_t (*lpr_rep_action)(lv_obj_t *, lv_dispi_t *));
void lv_btn_set_pr_action(lv_obj_t * btn, lv_btn_action_t pr_action);
void lv_btn_set_rel_action(lv_obj_t * btn, lv_btn_action_t rel_action);
void lv_btn_set_lpr_action(lv_obj_t * btn, lv_btn_action_t lpr_action);
void lv_btn_set_lpr_rep_action(lv_obj_t * btn, lv_btn_action_t lpr_rep_action);
bool lv_btn_get_tgl(lv_obj_t * btn);
lv_btn_state_t lv_btn_get_state(lv_obj_t * btn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment