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
922d0ab1
Commit
922d0ab1
authored
Aug 24, 2017
by
Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_btnm_set_styles support trel, tpr and ina styles (API change)
parent
0ef1fa06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
lv_btnm.c
lv_objx/lv_btnm.c
+10
-3
lv_btnm.h
lv_objx/lv_btnm.h
+12
-6
No files found.
lv_objx/lv_btnm.c
View file @
922d0ab1
...
...
@@ -353,14 +353,21 @@ void lv_btnm_set_tgl(lv_obj_t * btnm, bool en, uint16_t id)
/**
* Set the styles of the buttons of the button matrix
* @param btnm pointer to a button matrix object
* @param state style in this state (LV_BTN_STATE_PR or LV_BTN_STATE_REL)
* @param style pointer to style
* @param rel pointer to a style for releases state
* @param pr pointer to a style for pressed state
* @param trel pointer to a style for toggled releases state
* @param tpr pointer to a style for toggled pressed state
* @param ina pointer to a style for inactive state
*/
void
lv_btnm_set_styles_btn
(
lv_obj_t
*
btnm
,
lv_style_t
*
rel
,
lv_style_t
*
pr
)
void
lv_btnm_set_styles_btn
(
lv_obj_t
*
btnm
,
lv_style_t
*
rel
,
lv_style_t
*
pr
,
lv_style_t
*
trel
,
lv_style_t
*
tpr
,
lv_style_t
*
ina
)
{
lv_btnm_ext_t
*
ext
=
lv_obj_get_ext
(
btnm
);
ext
->
style_btn_rel
=
rel
;
ext
->
style_btn_pr
=
pr
;
ext
->
style_btn_trel
=
trel
;
ext
->
style_btn_tpr
=
tpr
;
ext
->
style_btn_ina
=
ina
;
lv_obj_inv
(
btnm
);
...
...
lv_objx/lv_btnm.h
View file @
922d0ab1
...
...
@@ -47,8 +47,9 @@ typedef struct
lv_btnm_callback_t
cb
;
/*A function to call when a button is releases*/
lv_style_t
*
style_btn_rel
;
/*Style of the released buttons*/
lv_style_t
*
style_btn_pr
;
/*Style of the pressed buttons*/
lv_style_t
*
style_btn_trel
;
/*Style of the released buttons*/
lv_style_t
*
style_btn_tpr
;
/*Style of the pressed buttons*/
lv_style_t
*
style_btn_trel
;
/*Style of the toggled released buttons*/
lv_style_t
*
style_btn_tpr
;
/*Style of the toggled pressed buttons*/
lv_style_t
*
style_btn_ina
;
/*Style of the inactive buttons*/
uint8_t
tgl
:
1
;
/*Enable toggling*/
}
lv_btnm_ext_t
;
...
...
@@ -100,13 +101,18 @@ void lv_btnm_set_action(lv_obj_t * btnm, lv_btnm_callback_t cb);
*/
void
lv_btnm_set_tgl
(
lv_obj_t
*
btnm
,
bool
en
,
uint16_t
id
);
/**
* Set the styles of the buttons of the button matr
o
x
* Set the styles of the buttons of the button matr
i
x
* @param btnm pointer to a button matrix object
* @param state style in this state (LV_BTN_STATE_PR or LV_BTN_STATE_REL)
* @param style pointer to style
* @param rel pointer to a style for releases state
* @param pr pointer to a style for pressed state
* @param trel pointer to a style for toggled releases state
* @param tpr pointer to a style for toggled pressed state
* @param ina pointer to a style for inactive state
*/
void
lv_btnm_set_styles_btn
(
lv_obj_t
*
btnm
,
lv_style_t
*
rel
,
lv_style_t
*
pr
);
void
lv_btnm_set_styles_btn
(
lv_obj_t
*
btnm
,
lv_style_t
*
rel
,
lv_style_t
*
pr
,
lv_style_t
*
trel
,
lv_style_t
*
tpr
,
lv_style_t
*
ina
)
/**
* Get the current map of a button matrix
...
...
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