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
ad22d4b9
Commit
ad22d4b9
authored
May 26, 2018
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LV_GROUP_KEY_ENTER_LONG: improve objects behaviour
parent
e5bba052
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
11 additions
and
10 deletions
+11
-10
lv_indev.c
lv_core/lv_indev.c
+5
-3
lv_btn.c
lv_objx/lv_btn.c
+0
-1
lv_btnm.c
lv_objx/lv_btnm.c
+1
-1
lv_cb.c
lv_objx/lv_cb.c
+1
-1
lv_ddlist.c
lv_objx/lv_ddlist.c
+1
-1
lv_list.c
lv_objx/lv_list.c
+1
-1
lv_roller.c
lv_objx/lv_roller.c
+1
-1
lv_sw.c
lv_objx/lv_sw.c
+1
-1
No files found.
lv_core/lv_indev.c
View file @
ad22d4b9
...
@@ -356,13 +356,15 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
...
@@ -356,13 +356,15 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
data
->
key
=
i
->
proc
.
last_key
;
data
->
key
=
i
->
proc
.
last_key
;
if
(
data
->
key
==
LV_GROUP_KEY_NEXT
)
{
if
(
data
->
key
==
LV_GROUP_KEY_NEXT
)
{
lv_group_focus_next
(
i
->
group
);
lv_group_focus_next
(
i
->
group
);
}
}
else
if
(
data
->
key
==
LV_GROUP_KEY_PREV
)
{
else
if
(
data
->
key
==
LV_GROUP_KEY_PREV
)
{
lv_group_focus_prev
(
i
->
group
);
lv_group_focus_prev
(
i
->
group
);
}
}
else
{
else
if
(
data
->
key
==
LV_GROUP_KEY_ENTER
&&
i
->
proc
.
long_pr_sent
)
{
lv_group_send_data
(
i
->
group
,
data
->
key
);
/*Do nothing. Don't send the ENTER if ENTER_LONG was sent*/
}
else
{
lv_group_send_data
(
i
->
group
,
data
->
key
);
}
}
i
->
proc
.
pr_timestamp
=
0
;
i
->
proc
.
pr_timestamp
=
0
;
...
...
lv_objx/lv_btn.c
View file @
ad22d4b9
...
@@ -384,7 +384,6 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param)
...
@@ -384,7 +384,6 @@ static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param)
else
if
(
c
==
LV_GROUP_KEY_ENTER_LONG
)
{
else
if
(
c
==
LV_GROUP_KEY_ENTER_LONG
)
{
if
(
ext
->
actions
[
LV_BTN_ACTION_LONG_PR
]
&&
state
!=
LV_BTN_STATE_INA
)
{
if
(
ext
->
actions
[
LV_BTN_ACTION_LONG_PR
]
&&
state
!=
LV_BTN_STATE_INA
)
{
res
=
ext
->
actions
[
LV_BTN_ACTION_LONG_PR
](
btn
);
res
=
ext
->
actions
[
LV_BTN_ACTION_LONG_PR
](
btn
);
ext
->
long_pr_action_executed
=
1
;
}
}
}
}
}
}
...
...
lv_objx/lv_btnm.c
View file @
ad22d4b9
...
@@ -627,7 +627,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param)
...
@@ -627,7 +627,7 @@ static lv_res_t lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param)
}
}
lv_obj_invalidate
(
btnm
);
lv_obj_invalidate
(
btnm
);
}
else
if
(
c
==
LV_GROUP_KEY_ENTER
)
{
}
else
if
(
c
==
LV_GROUP_KEY_ENTER
||
c
==
LV_GROUP_KEY_ENTER_LONG
)
{
if
(
ext
->
action
!=
NULL
)
{
if
(
ext
->
action
!=
NULL
)
{
uint16_t
txt_i
=
get_button_text
(
btnm
,
ext
->
btn_id_pr
);
uint16_t
txt_i
=
get_button_text
(
btnm
,
ext
->
btn_id_pr
);
if
(
txt_i
!=
LV_BTNM_PR_NONE
)
{
if
(
txt_i
!=
LV_BTNM_PR_NONE
)
{
...
...
lv_objx/lv_cb.c
View file @
ad22d4b9
...
@@ -305,7 +305,7 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param)
...
@@ -305,7 +305,7 @@ static lv_res_t lv_cb_signal(lv_obj_t * cb, lv_signal_t sign, void * param)
char
c
=
*
((
char
*
)
param
);
char
c
=
*
((
char
*
)
param
);
if
(
c
==
LV_GROUP_KEY_RIGHT
||
c
==
LV_GROUP_KEY_DOWN
||
if
(
c
==
LV_GROUP_KEY_RIGHT
||
c
==
LV_GROUP_KEY_DOWN
||
c
==
LV_GROUP_KEY_LEFT
||
c
==
LV_GROUP_KEY_UP
||
c
==
LV_GROUP_KEY_LEFT
||
c
==
LV_GROUP_KEY_UP
||
c
==
LV_GROUP_KEY_ENTER
)
{
c
==
LV_GROUP_KEY_ENTER
||
c
==
LV_GROUP_KEY_ENTER_LONG
)
{
lv_btn_set_state
(
ext
->
bullet
,
lv_btn_get_state
(
cb
));
lv_btn_set_state
(
ext
->
bullet
,
lv_btn_get_state
(
cb
));
}
}
}
}
...
...
lv_objx/lv_ddlist.c
View file @
ad22d4b9
...
@@ -549,7 +549,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
...
@@ -549,7 +549,7 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
lv_ddlist_pos_current_option
(
ddlist
);
lv_ddlist_pos_current_option
(
ddlist
);
lv_obj_invalidate
(
ddlist
);
lv_obj_invalidate
(
ddlist
);
}
}
}
else
if
(
c
==
LV_GROUP_KEY_ENTER
)
{
}
else
if
(
c
==
LV_GROUP_KEY_ENTER
||
c
==
LV_GROUP_KEY_ENTER_LONG
)
{
if
(
ext
->
opened
)
{
if
(
ext
->
opened
)
{
ext
->
sel_opt_id_ori
=
ext
->
sel_opt_id
;
ext
->
sel_opt_id_ori
=
ext
->
sel_opt_id
;
ext
->
opened
=
0
;
ext
->
opened
=
0
;
...
...
lv_objx/lv_list.c
View file @
ad22d4b9
...
@@ -570,7 +570,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param)
...
@@ -570,7 +570,7 @@ static lv_res_t lv_list_signal(lv_obj_t * list, lv_signal_t sign, void * param)
lv_page_focus
(
list
,
btn_prev
,
ext
->
anim_time
);
lv_page_focus
(
list
,
btn_prev
,
ext
->
anim_time
);
}
}
}
}
}
else
if
(
c
==
LV_GROUP_KEY_ENTER
)
{
}
else
if
(
c
==
LV_GROUP_KEY_ENTER
||
c
==
LV_GROUP_KEY_ENTER_LONG
)
{
/*Get the 'pressed' button*/
/*Get the 'pressed' button*/
lv_obj_t
*
btn
=
NULL
;
lv_obj_t
*
btn
=
NULL
;
btn
=
get_next_btn
(
list
,
btn
);
btn
=
get_next_btn
(
list
,
btn
);
...
...
lv_objx/lv_roller.c
View file @
ad22d4b9
...
@@ -321,7 +321,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par
...
@@ -321,7 +321,7 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par
if
(
ext
->
ddlist
.
sel_opt_id
>
0
)
{
if
(
ext
->
ddlist
.
sel_opt_id
>
0
)
{
lv_roller_set_selected
(
roller
,
ext
->
ddlist
.
sel_opt_id
-
1
,
true
);
lv_roller_set_selected
(
roller
,
ext
->
ddlist
.
sel_opt_id
-
1
,
true
);
}
}
}
else
if
(
c
==
LV_GROUP_KEY_ENTER
)
{
}
else
if
(
c
==
LV_GROUP_KEY_ENTER
||
c
==
LV_GROUP_KEY_ENTER_LONG
)
{
if
(
ext
->
ddlist
.
action
)
ext
->
ddlist
.
action
(
roller
);
if
(
ext
->
ddlist
.
action
)
ext
->
ddlist
.
action
(
roller
);
ext
->
ddlist
.
sel_opt_id_ori
=
ext
->
ddlist
.
sel_opt_id
;
/*Set the entered value as default*/
ext
->
ddlist
.
sel_opt_id_ori
=
ext
->
ddlist
.
sel_opt_id
;
/*Set the entered value as default*/
}
}
...
...
lv_objx/lv_sw.c
View file @
ad22d4b9
...
@@ -243,7 +243,7 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param)
...
@@ -243,7 +243,7 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param)
else
if
(
sign
==
LV_SIGNAL_CONTROLL
)
{
else
if
(
sign
==
LV_SIGNAL_CONTROLL
)
{
char
c
=
*
((
char
*
)
param
);
char
c
=
*
((
char
*
)
param
);
if
(
c
==
LV_GROUP_KEY_ENTER
)
{
if
(
c
==
LV_GROUP_KEY_ENTER
||
c
==
LV_GROUP_KEY_ENTER_LONG
)
{
if
(
lv_sw_get_state
(
sw
))
lv_sw_off
(
sw
);
if
(
lv_sw_get_state
(
sw
))
lv_sw_off
(
sw
);
else
lv_sw_on
(
sw
);
else
lv_sw_on
(
sw
);
...
...
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