思澈科技软件开发工具包  2.20
GUI APP Framework exported functions

Enumerations

enum  gui_app_msg_type_t {
  GUI_APP_MSG_ONSTART = 0,
  GUI_APP_MSG_ONRESUME,
  GUI_APP_MSG_ONPAUSE,
  GUI_APP_MSG_ONSTOP,
  GUI_APP_MSG_USER_END
}
 Page state notification messages. More...
 

Functions

void gui_app_init (void)
 Initialize application framework.
 
int gui_app_run (const char *cmd)
 run an app More...
 
int gui_app_exit (const char *id)
 exit specified app by it's id More...
 
void gui_app_self_exit (void)
 exit current app
 
bool gui_app_is_actived (char *id)
 check whether the app is active(or running) More...
 
bool gui_app_is_page_present (char *id)
 check whether the subpage is present in cur app More...
 
void gui_app_remove_page (const char *pg_id)
 Remove a subgpage from this app. More...
 
void gui_app_refr_page (const char *pg_id)
 Refresh subgpage(pause then resume) More...
 
int gui_app_goback_to_page (const char *pg_id)
 Goback to specified subpage in this app. More...
 
int gui_app_goback (void)
 Destory current page, and destory app if it's having no page. More...
 
int gui_app_manual_goback_anim (void)
 Goback current page manual. More...
 
void gui_app_cleanup (void)
 Close all app. More...
 
void gui_app_cleanup_bg_apps (void)
 Close all background app. More...
 
void gui_app_cleanup_now (void)
 Close all app synchronously, must been call while all gui app task is NOT running. More...
 
void gui_app_run_now (const char *cmd)
 Run app immediately, no animation. More...
 
bool gui_app_is_all_closed (void)
 Check whether all app has been closed. More...
 
intent_t gui_app_get_intent (void)
 Get current actived app's intent. More...
 
void * gui_app_get_page_userdata (const char *pg_id)
 Get subpage's user data. More...
 
int gui_app_set_page_userdata (const char *pg_id, void *usr_data)
 Set subpage's user data. More...
 
void * gui_app_this_page_userdata (void)
 Get current subpage's user data. More...
 
uint32_t gui_app_get_running_apps (void)
 Get all runing apps numbers
. More...
 
lv_obj_t * gui_app_get_clock_parent ()
 Get current clock parent
. More...
 
void gui_app_exec_now (void)
 Execute gui app schedule immediately util finish all job.
. More...
 
int gui_app_fwk_suspend (void)
 suspend gui_app framework asynchronized, append 'gui_app_exec_now' after if you want suspend synchronized. More...
 
int gui_app_fwk_resume (void)
 resume gui_app framework asynchronized More...
 

Detailed Description

Enumeration Type Documentation

◆ gui_app_msg_type_t

Page state notification messages.

Messages be send to page's msg handler by firmware while page's state changed

Enumerator
GUI_APP_MSG_ONSTART 

Page was started.
Recieve this msg only once after the page created.

GUI_APP_MSG_ONRESUME 

Page was bring to foreground.
The page's state can be paused or started before.

GUI_APP_MSG_ONPAUSE 

Page was bring to background.
The page's state must be resumed when recieve this message.

GUI_APP_MSG_ONSTOP 

Page was being destory.
The page's state must be paused when recieve this message, and will recieve once.

GUI_APP_MSG_USER_END 

last user application message

Function Documentation

◆ gui_app_cleanup()

void gui_app_cleanup ( void  )

Close all app.

Return values
void

◆ gui_app_cleanup_bg_apps()

void gui_app_cleanup_bg_apps ( void  )

Close all background app.

Return values
void

◆ gui_app_cleanup_now()

void gui_app_cleanup_now ( void  )

Close all app synchronously, must been call while all gui app task is NOT running.

Return values
void

◆ gui_app_exec_now()

void gui_app_exec_now ( void  )

Execute gui app schedule immediately util finish all job.
.

Returns
none
See also

◆ gui_app_exit()

int gui_app_exit ( const char *  id)

exit specified app by it's id

Parameters
[in]idThe id of app
Return values
RT_EOKif successful, otherwise return error number < 0.

◆ gui_app_fwk_resume()

int gui_app_fwk_resume ( void  )

resume gui_app framework asynchronized

Returns
RT_EOK if successful, otherwise return error number < 0.

◆ gui_app_fwk_suspend()

int gui_app_fwk_suspend ( void  )

suspend gui_app framework asynchronized, append 'gui_app_exec_now' after if you want suspend synchronized.

Returns
RT_EOK if successful, otherwise return error number < 0.

◆ gui_app_get_clock_parent()

lv_obj_t* gui_app_get_clock_parent ( )

Get current clock parent
.

Returns
clock parent object
See also

◆ gui_app_get_intent()

intent_t gui_app_get_intent ( void  )

Get current actived app's intent.

Returns
Current active app's intent

◆ gui_app_get_page_userdata()

void* gui_app_get_page_userdata ( const char *  pg_id)

Get subpage's user data.

Parameters
pg_id- Subpage id (should be unique in app )
Returns
NULL if not found pg_id

◆ gui_app_get_running_apps()

uint32_t gui_app_get_running_apps ( void  )

Get all runing apps numbers
.

Returns
The number of running apps
See also

◆ gui_app_goback()

int gui_app_goback ( void  )

Destory current page, and destory app if it's having no page.

Return values
RT_EOKif successful, otherwise return error number < 0.

◆ gui_app_goback_to_page()

int gui_app_goback_to_page ( const char *  pg_id)

Goback to specified subpage in this app.

Parameters
[in]pg_idSubpage id (should be unique in app )
Return values
RT_EOKif pg_id is existent, otherwise return error number < 0.

◆ gui_app_is_actived()

bool gui_app_is_actived ( char *  id)

check whether the app is active(or running)

Parameters
[in]idIdentification of application
Return values
FALSE- if app is paused, or not even started, TRUE if app is active.

◆ gui_app_is_all_closed()

bool gui_app_is_all_closed ( void  )

Check whether all app has been closed.

Return values
trueall app is closed, false: not closed yet

◆ gui_app_is_page_present()

bool gui_app_is_page_present ( char *  id)

check whether the subpage is present in cur app

Parameters
[in]idIdentification of subpage
Return values
FALSE- if subpage is not started, TRUE if subpage is active, paused, or resumed.

◆ gui_app_manual_goback_anim()

int gui_app_manual_goback_anim ( void  )

Goback current page manual.

Return values
RT_EOKif successful, otherwise return error number < 0.

◆ gui_app_refr_page()

void gui_app_refr_page ( const char *  pg_id)

Refresh subgpage(pause then resume)

Parameters
[in]pg_idSubpage id (should be unique in app )
Return values
RT_EOKif successful, otherwise return error number < 0.

◆ gui_app_remove_page()

void gui_app_remove_page ( const char *  pg_id)

Remove a subgpage from this app.

Parameters
[in]pg_idSubpage id (should be unique in app )
Return values
RT_EOKif successful, otherwise return error number < 0.

◆ gui_app_run()

int gui_app_run ( const char *  cmd)

run an app

Parameters
[in]cmdapplication command - format:[app_id] [param0] [param1] [param2] ...
Return values
RT_EOKif successful, otherwise return error number < 0.

◆ gui_app_run_now()

void gui_app_run_now ( const char *  cmd)

Run app immediately, no animation.

Parameters
[in]cmdapplication command - format:[app_id] [param0] [param1] [param2] ...
Return values
void

◆ gui_app_set_page_userdata()

int gui_app_set_page_userdata ( const char *  pg_id,
void *  usr_data 
)

Set subpage's user data.

Parameters
pg_id- Subpage id (should be unique in app )
usr_data- user data
Returns
RT_EOK if successful, otherwise return error number < 0.

◆ gui_app_this_page_userdata()

void* gui_app_this_page_userdata ( void  )

Get current subpage's user data.

Returns
NULL if no data