BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvgl
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
lvgl
Commits
b95f9128
Commit
b95f9128
authored
Dec 17, 2016
by
Kiss-Vamosi Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_btn_action_t bugfix
parent
ad786859
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
lv_btn.c
lv_objx/lv_btn.c
+4
-4
lv_btn.h
lv_objx/lv_btn.h
+9
-9
No files found.
lv_objx/lv_btn.c
View file @
b95f9128
...
...
@@ -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
);
...
...
lv_objx/lv_btn.h
View file @
b95f9128
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment