思澈科技软件开发工具包  2.20
GUI Application Framework

Sifli GUI application framework, provide basic functions for user to start/stop/pause/resume application. It also provide navigation among applications and transition of GUI. More...

Modules

 GUI APP Framework exported functions
 

Data Structures

struct  gui_point_t
 
struct  builtin_app_desc_t
 
struct  gui_app_trans_anim_zoom_t
 
struct  gui_app_trans_anim_push_t
 
struct  gui_app_trans_anim_custom_t
 
struct  gui_app_trans_anim_t
 
struct  gui_app_trans_anim_group_t
 

Macros

#define GUI_APP_NAME_MAX_LEN   16
 App display name max length.
 
#define GUI_APP_ID_MAX_LEN   16
 An unique character id of an app (both bult-in app and dl app)
 
#define GUI_DL_APP_MAX_FILE_PATH_LEN   64
 Max file path length for dynamic loading applications.
 
#define BUILTIN_APP_EXPORT(name, icon, id, entry)
 
#define gui_app_regist_msg_handler(id, handler)   gui_app_regist_msg_handler_ext(id,handler, NULL)
 
#define gui_app_create_page(pg_id, pg_handler)   gui_app_create_page_ext(pg_id, pg_handler, NULL)
 
#define gui_app_create_page_for_app(app_id, pg_id, pg_handler)   gui_app_create_page_for_app_ext(app_id,pg_id,pg_handler,NULL)
 
#define MANUAL_TRAN_ANIM_MAX_PROCESS   10000
 
#define FLAG_TRANS_ANIM_REVERSE   0x01
 
#define FLAG_TRANS_ANIM_FG   0x02
 
#define gui_script_app_list_get_next(app)   NULL
 
#define gui_script_watch_face_register()
 

Typedefs

typedef int(* gui_app_entry_func_ptr_t) (intent_t i)
 
typedef int16_t gui_anim_value_t
 
typedef lv_obj_t * gui_anim_obj_t
 
typedef int16_t gui_coord_t
 
typedef void(* gui_page_msg_cb_t) (gui_app_msg_type_t msg, void *param)
 
typedef void(* cust_anim_cb_t) (gui_anim_obj_t img, void *user_data, uint32_t flag, gui_anim_value_t process)
 

Enumerations

enum  gui_app_trans_anim_type_t {
  GUI_APP_TRANS_ANIM_NONE,
  GUI_APP_TRANS_ANIM_PUSH_RIGHT_IN,
  GUI_APP_TRANS_ANIM_PUSH_RIGHT_OUT,
  GUI_APP_TRANS_ANIM_PUSH_LEFT_IN,
  GUI_APP_TRANS_ANIM_PUSH_LEFT_OUT,
  GUI_APP_TRANS_ANIM_ZOOM_IN,
  GUI_APP_TRANS_ANIM_ZOOM_OUT,
  GUI_APP_TRANS_ANIM_CUSTOM,
  GUI_APP_TRANS_ANIM_ENTER_DEFAULT = 0xFFFE,
  GUI_APP_TRANS_ANIM_EXIT_DEFAULT = 0xFFFF
}
 

Functions

int gui_app_regist_msg_handler_ext (const char *id, gui_page_msg_cb_t handler, void *usr_data)
 register an application's root page message handler More...
 
int gui_app_create_page_ext (const char *pg_id, gui_page_msg_cb_t handler, void *usr_data)
 Create a subgpage in current actived app, and present it. More...
 
int gui_app_create_page_for_app_ext (const char *app_id, const char *pg_id, gui_page_msg_cb_t handler, void *usr_data)
 Create a subgpage for specified app, and present it. More...
 
void gui_app_trans_anim_init_cfg (gui_app_trans_anim_t *cfg, gui_app_trans_anim_type_t type)
 get default configuration of type animation
More...
 
void gui_app_set_enter_trans_anim (gui_app_trans_anim_t *cfg)
 set app's enter transform animation
More...
 
void gui_app_set_exit_trans_anim (gui_app_trans_anim_t *cfg)
 set app's exit transform animation
More...
 
rt_err_t gui_app_manual_animation_start (uint32_t process)
 
rt_err_t gui_app_manual_animation_update (uint32_t process)
 
rt_err_t gui_app_manual_animation_stop (uint32_t process)
 
const builtin_app_desc_tgui_builtin_app_list_open (void)
 
const builtin_app_desc_tgui_builtin_app_list_get_next (const builtin_app_desc_t *ptr_app)
 
void gui_builtin_app_list_close (const builtin_app_desc_t *ptr_app)
 

Detailed Description

Sifli GUI application framework, provide basic functions for user to start/stop/pause/resume application. It also provide navigation among applications and transition of GUI.

Macro Definition Documentation

◆ BUILTIN_APP_EXPORT

#define BUILTIN_APP_EXPORT (   name,
  icon,
  id,
  entry 
)
Value:
RT_USED static const builtin_app_desc_t __builtinapp \
SECTION("BuiltinAppTab") = \
{ \
name, \
icon, \
id, \
(gui_app_entry_func_ptr_t)entry \
}

Define a build-in GUI applications: name - name which will display on mainmenu icon - icon which will display on mainmenu too. id - let other app find this app by id entry- app's entry function

Enumeration Type Documentation

◆ gui_app_trans_anim_type_t

Enumerator
GUI_APP_TRANS_ANIM_NONE 

Disable app's trans anim.

GUI_APP_TRANS_ANIM_CUSTOM 

Customized tansform animation.

GUI_APP_TRANS_ANIM_ENTER_DEFAULT 

Use system default animation.

GUI_APP_TRANS_ANIM_EXIT_DEFAULT 

Use system default animation.

Function Documentation

◆ gui_app_create_page_ext()

int gui_app_create_page_ext ( const char *  pg_id,
gui_page_msg_cb_t  handler,
void *  usr_data 
)

Create a subgpage in current actived app, and present it.

Parameters
[in]pg_idSubpage id (should be unique in one app )
[in]handlerThis subpage message handler
[in]usr_dataUser data of this subpage
Return values
RT_EOKif successful, otherwise return error number < 0.

◆ gui_app_create_page_for_app_ext()

int gui_app_create_page_for_app_ext ( const char *  app_id,
const char *  pg_id,
gui_page_msg_cb_t  handler,
void *  usr_data 
)

Create a subgpage for specified app, and present it.

Parameters
[in]app_idIdentification of an application
[in]pg_idSubpage id (should be unique in one app )
[in]handlerThis subpage message handler
[in]usr_dataUser data of this subpage
Return values
RT_EOKif successful, otherwise return error number < 0.

◆ gui_app_regist_msg_handler_ext()

int gui_app_regist_msg_handler_ext ( const char *  id,
gui_page_msg_cb_t  handler,
void *  usr_data 
)

register an application's root page message handler

Parameters
[in]idIdentification of application
[in]handlerThe main subpage message handler.
[in]usr_dataUser data of this app
Return values
RT_EOKif successful, otherwise return error number < 0.

◆ gui_app_set_enter_trans_anim()

void gui_app_set_enter_trans_anim ( gui_app_trans_anim_t cfg)

set app's enter transform animation

Parameters
cfg
See also

◆ gui_app_set_exit_trans_anim()

void gui_app_set_exit_trans_anim ( gui_app_trans_anim_t cfg)

set app's exit transform animation

Parameters
cfg
See also

◆ gui_app_trans_anim_init_cfg()

void gui_app_trans_anim_init_cfg ( gui_app_trans_anim_t cfg,
gui_app_trans_anim_type_t  type 
)

get default configuration of type animation

Parameters
cfg- output config
type- animation type id
See also
builtin_app_desc_t
Definition: gui_app_fwk.h:94