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
22f1a01b
Commit
22f1a01b
authored
Jan 16, 2017
by
Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_mbox: start/stop auto close added
parent
2cb9d8ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
lv_app_notice.c
lv_app/lv_app_util/lv_app_notice.c
+1
-1
lv_mbox.c
lv_objx/lv_mbox.c
+12
-3
lv_mbox.h
lv_objx/lv_mbox.h
+7
-1
No files found.
lv_app/lv_app_util/lv_app_notice.c
View file @
22f1a01b
...
@@ -78,7 +78,7 @@ lv_obj_t * lv_app_notice_add(const char * format, ...)
...
@@ -78,7 +78,7 @@ lv_obj_t * lv_app_notice_add(const char * format, ...)
lv_obj_set_opa
(
mbox
,
app_style
->
menu_opa
);
lv_obj_set_opa
(
mbox
,
app_style
->
menu_opa
);
#if LV_APP_NOTICE_SHOW_TIME != 0
#if LV_APP_NOTICE_SHOW_TIME != 0
lv_mbox_auto_close
(
mbox
,
LV_APP_NOTICE_SHOW_TIME
);
lv_mbox_
start_
auto_close
(
mbox
,
LV_APP_NOTICE_SHOW_TIME
);
#endif
#endif
lv_obj_set_parent
(
notice_h
,
lv_scr_act
());
lv_obj_set_parent
(
notice_h
,
lv_scr_act
());
...
...
lv_objx/lv_mbox.c
View file @
22f1a01b
...
@@ -156,13 +156,13 @@ bool lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param)
...
@@ -156,13 +156,13 @@ bool lv_mbox_signal(lv_obj_t * mbox, lv_signal_t sign, void * param)
}
}
break
;
break
;
case
LV_SIGNAL_LONG_PRESS
:
case
LV_SIGNAL_LONG_PRESS
:
case
LV_SIGNAL_RELEASED
:
#if LV_MBOX_ANIM_TIME != 0
#if LV_MBOX_ANIM_TIME != 0
lv_mbox_auto_close
(
mbox
,
0
);
lv_mbox_
start_
auto_close
(
mbox
,
0
);
#else
#else
lv_obj_del
(
mbox
);
lv_obj_del
(
mbox
);
valid
=
false
;
valid
=
false
;
#endif
#endif
lv_dispi_wait_release
(
param
);
break
;
break
;
case
LV_SIGNAL_STYLE_CHG
:
case
LV_SIGNAL_STYLE_CHG
:
lv_obj_set_style
(
ext
->
title
,
&
style
->
title
);
lv_obj_set_style
(
ext
->
title
,
&
style
->
title
);
...
@@ -289,7 +289,7 @@ lv_action_res_t lv_mbox_close_action(lv_obj_t * btn, lv_dispi_t * dispi)
...
@@ -289,7 +289,7 @@ lv_action_res_t lv_mbox_close_action(lv_obj_t * btn, lv_dispi_t * dispi)
* @param mbox pointer to a message box object
* @param mbox pointer to a message box object
* @param tout a time (in milliseconds) to wait before delete the message box
* @param tout a time (in milliseconds) to wait before delete the message box
*/
*/
void
lv_mbox_auto_close
(
lv_obj_t
*
mbox
,
uint16_t
tout
)
void
lv_mbox_
start_
auto_close
(
lv_obj_t
*
mbox
,
uint16_t
tout
)
{
{
#if LV_MBOX_ANIM_TIME != 0
#if LV_MBOX_ANIM_TIME != 0
/*Add shrinking animations*/
/*Add shrinking animations*/
...
@@ -304,6 +304,15 @@ void lv_mbox_auto_close(lv_obj_t * mbox, uint16_t tout)
...
@@ -304,6 +304,15 @@ void lv_mbox_auto_close(lv_obj_t * mbox, uint16_t tout)
#endif
#endif
}
}
/**
* Stop the auto. closing of message box
* @param mbox pointer to a message box object
*/
void
lv_mbox_stop_auto_close
(
lv_obj_t
*
mbox
)
{
anim_del
(
mbox
,
NULL
);
}
/*=====================
/*=====================
* Getter functions
* Getter functions
*====================*/
*====================*/
...
...
lv_objx/lv_mbox.h
View file @
22f1a01b
...
@@ -128,7 +128,13 @@ lv_action_res_t lv_mbox_close_action(lv_obj_t * btn, lv_dispi_t * dispi);
...
@@ -128,7 +128,13 @@ lv_action_res_t lv_mbox_close_action(lv_obj_t * btn, lv_dispi_t * dispi);
* @param mbox pointer to a message box object
* @param mbox pointer to a message box object
* @param tout a time (in milliseconds) to wait before delete the message box
* @param tout a time (in milliseconds) to wait before delete the message box
*/
*/
void
lv_mbox_auto_close
(
lv_obj_t
*
mbox
,
uint16_t
tout
);
void
lv_mbox_start_auto_close
(
lv_obj_t
*
mbox
,
uint16_t
tout
);
/**
* Stop the auto. closing of message box
* @param mbox pointer to a message box object
*/
void
lv_mbox_stop_auto_close
(
lv_obj_t
*
mbox
);
/**
/**
* get the title of the message box
* get the title of the message box
...
...
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