#ifndef __FR_LV_PUBLIC_FUNC_H__
#define __FR_LV_PUBLIC_FUNC_H__

#include "img_def.h"
#include "lv_common_function.h"

enum
{
Exercise_Type_Outdoor_Running                 =    0x1 ,    //户外跑步
Exercise_Type_Outdoor_Cycling                 =    0x2 ,    //户外骑行
Exercise_Type_Skipping                        =    0x3 ,    //跳绳
Exercise_Type_Swimming                        =    0x4 ,    //游泳
Exercise_Type_Badminton                       =    0x5 ,    //羽毛球
Exercise_Type_Table_Tennis                    =    0x6 ,    //乒乓球
Exercise_Type_Tennis                          =    0x7 ,    //网球
Exercise_Type_Climbing                        =    0x8 ,    //登山
Exercise_Type_Hiking                          =    0x9 ,    //徒步
Exercise_Type_Basketball                      =    0xa ,    //篮球
Exercise_Type_Soccer                          =    0xb ,    //足球
Exercise_Type_Baseball                        =    0xc ,    //棒球
Exercise_Type_Volleyball                      =    0xd ,    //排球
Exercise_Type_Cricket                         =    0xe ,    //板球
Exercise_Type_Rugby                           =    0xf ,    //橄榄球
Exercise_Type_Hockey                          =    0x10,    //曲棍球
Exercise_Type_Dance                           =    0x11,    //舞蹈
Exercise_Type_Indoor_Cycling                  =    0x12,    //室内骑行
Exercise_Type_Yoga                            =    0x13,    //瑜伽
Exercise_Type_Sit_ups                         =    0x14,    //仰卧起坐
Exercise_Type_Treadmill                       =    0x15,    //跑步机
Exercise_Type_Gymnastics                      =    0x16,    //体操
Exercise_Type_Rowing                          =    0x17,    //划船
Exercise_Type_Jumping_Jack                    =    0x18,    //开合跳
Exercise_Type_Free_training                   =    0x19,    //自由训练
Exercise_Type_Outdoor_Walking                 =    0x1A,    //户外健走
Exercise_Type_Indoor_Run                      =    0x1B,    //室内跑步
Exercise_Type_Strength_Training               =    0x1C,    //力量训练
Exercise_Type_Stepping                        =    0x1D,    //踏步
Exercise_Type_Horse_Riding                    =    0x1E,    //骑马
Exercise_Type_Elliptical_Trainer              =    0x1F,    //椭圆机
Exercise_Type_Tai_Chi                         =    0x20,    //太极
Exercise_Type_Shuttlecock                     =    0x21,    //毽球
Exercise_Type_Boxing                          =    0x22,    //拳击
Exercise_Type_Outdoor_Walk                    =    0x23,    //室内走路
Exercise_Type_Cross_country_Running           =    0x24,    //越野跑
Exercise_Type_Skiing                          =    0x25,    //滑雪
Exercise_Type_Ice_Hockey                      =    0x26,    //冰球
Exercise_Type_Taekwondo                       =    0x27,    //跆拳道
Exercise_Type_VO2max_test                     =    0x28,    //最大摄氧量测试
Exercise_Type_Rowing_Maching                  =    0x29,    //划船机
Exercise_Type_Stroller                        =    0x2A,    //漫步机
Exercise_Type_Hiking_Unused                   =    0x2B,    //原本地就有（徒步）
Exercise_Type_Athletics                       =    0x2C,    //田径
Exercise_Type_Waist_and_Abdominal_Training    =    0x2D,    //腰腹训练
Exercise_Type_Karate                          =    0x2E,    //空手道
Exercise_Type_Relaxation                      =    0x2F,    //整理放松
Exercise_Type_Cross_Training                  =    0x30,    //交叉训练
Exercise_Type_Pilates                         =    0x31,    //普拉提
Exercise_Type_Cross_Fit                       =    0x32,    //交叉配合
Exercise_Type_Functional_Training             =    0x33,    //功能性训练
Exercise_Type_Physical_Training               =    0x34,    //体能训练
Exercise_Type_Archery                         =    0x35,    //射箭
Exercise_Type_Flexibility                     =    0x36,    //柔韧度
Exercise_Type_Mixed_Aerobic                   =    0x37,    //混合有氧
Exercise_Type_Latin_Dance                     =    0x38,    //拉丁舞
Exercise_Type_Street_Dance                    =    0x39,    //街舞
Exercise_Type_Free_Boxing                     =    0x3A,    //自由搏击
Exercise_Type_Ballet                          =    0x3B,    //芭蕾
Exercise_Type_Australian_Soccer               =    0x3C,    //澳式足球
Exercise_Type_Martial_Arts                    =    0x3D,    //武术
Exercise_Type_Stair_Climbing                  =    0x3E,    //爬楼
Exercise_Type_Handball                        =    0x3F,    //手球
Exercise_Type_Bowling                         =    0x40,    //保龄球
Exercise_Type_Squash                          =    0x41,    //壁球
Exercise_Type_Curling                         =    0x42,    //冰壶
Exercise_Type_Hunting                         =    0x43,    //打猎
Exercise_Type_Snowboarding                    =    0x44,    //单板滑雪
Exercise_Type_Leisure_Sports                  =    0x45,    //休闲运动
Exercise_Type_American_Football               =    0x46,    //美式橄榄球
Exercise_Type_Hand_Cycling                    =    0x47,    //手摇车
Exercise_Type_Fishing                         =    0x48,    //钓鱼
Exercise_Type_Frisbee                         =    0x49,    //飞盘
Exercise_Type_Rugby_Unused                    =    0x4A,    //原本地就有（橄榄球）
Exercise_Type_Golf                            =    0x4B,    //高尔夫
Exercise_Type_Folk_Dance                      =    0x4C,    //民族舞
Exercise_Type_Downhill_Skiing                 =    0x4D,    //高山滑雪
Exercise_Type_Snow_Sports                     =    0x4E,    //雪上运动
Exercise_Type_Clam_Mediation_Sports           =    0x4F,    //舒缓冥想类运动
Exercise_Type_Core_Training                   =    0x50,    //核心训练
Exercise_Type_Ice_Skating                     =    0x51,    //滑冰
Exercise_Type_Fitness_Games                   =    0x52,    //健身游戏
Exercise_Type_Gymnastics_Unused               =    0x53,    //健身操
Exercise_Type_Group_Training                  =    0x54,    //团体操
Exercise_Type_Kickboxing                      =    0x55,    //搏击操
Exercise_Type_Lacrosse                        =    0x56,    //长曲棍球
Exercise_Type_Foam_Rolling                    =    0x57,    //泡沫轴筋膜放松
Exercise_Type_Wrestling                       =    0x58,    //摔跤
Exercise_Type_Fencing                         =    0x59,    //击剑
Exercise_Type_Softball                        =    0x5A,    //垒球
Exercise_Type_Single_Bar                      =    0x5B,    //单杠
Exercise_Type_Parallel_Bars                   =    0x5C,    //双杠
Exercise_Type_Roller_Skating                  =    0x5D,    //轮滑
Exercise_Type_Hula_Hoop                       =    0x5E,    //呼啦圈
Exercise_Type_Darts                           =    0x5F,    //飞镖
Exercise_Type_Pickleball                      =    0x60,    //匹克球
Exercise_Type_HIIT                            =    0x61,    //HIIT
Exercise_Type_Shooting                        =    0x62,    //射击
Exercise_Type_Judo                            =    0x63,    //柔道
Exercise_Type_Trampoline                      =    0x64,    //蹦床
Exercise_Type_Skateboarding                   =    0x65,    //滑板
Exercise_Type_Hoverboard                      =    0x66,    //平衡车
Exercise_Type_Blading                         =    0x67,    //溜旱冰
Exercise_Type_Parkour                         =    0x68,    //跑酷
Exercise_Type_Diving                          =    0x69,    //跳水
Exercise_Type_Surfing                         =    0x6A,    //冲浪
Exercise_Type_Snorkeling                      =    0x6B,    //浮潜
Exercise_Type_Pull_ups                        =    0x6C,    //引体向上
Exercise_Type_Push_ups                        =    0x6D,    //俯卧撑
Exercise_Type_Planking                        =    0x6E,    //平板支撑
Exercise_Type_Rock_Climbing                   =    0x6F,    //攀岩
Exercise_Type_High_Jump                       =    0x70,    //跳高
Exercise_Type_Bungee_Jump                     =    0x71,    //蹦极
Exercise_Type_Long_Jump                       =    0x72,    //跳远
Exercise_Type_Marathon                        =    0x73,    //马拉松
};

#define BODY_BUILDING_NUM       41  //健身类
#define DANCE_SPORTS_NUM        4  //舞蹈类
#define RELATIVE_SPORTS_NUM     18  //休闲运动
#define BALL_GAME_NUM           19 //球类
#define ICE_SPORTS_NUM          7  //水上运动
#define WATER_SPORTS_NUM        4 //冰上运动
#define EXTREMITY_SPORTS_NUM    4 //极限运动

enum
{
Exercise_List_Type_BodyBuilding=0x00, //健身类
Exercise_List_Type_Dance=0x01,//舞蹈类
Exercise_List_Type_Relative=0x02,//休闲运动
Exercise_List_Type_Ball=0x03,//球类
Exercise_List_Type_ICE=0x04,//水上运动
Exercise_List_Type_Water=0x05,//冰上运动
Exercise_List_Type_Extremity=0x06,//极限运动

};

enum
{
Information_App_call=0x01,
Information_App_facebook=0x02,
Information_App_flickr=0x03,
Information_App_gmail=0x04,
Information_App_googleplus=0x05,
Information_App_hangouts  ,
Information_App_ins       ,
Information_App_kakao     ,
Information_App_line      ,
Information_App_link      ,
Information_App_message   ,
Information_App_messenger ,
Information_App_other     ,
Information_App_pinterest ,
Information_App_QQ        ,
Information_App_skype     ,
Information_App_snapchat  ,
Information_App_telegram  ,
Information_App_tumblr    ,
Information_App_twitter   ,
Information_App_viber     ,
Information_App_vkontakte ,
Information_App_wechat    ,
Information_App_whatsapp  ,
Information_App_youtube   ,
Information_App_ZALO      ,
};

#define OK_BTN_ICO_SMALL_IMG        IMG_OK_GREY_54X54  //灰色
#define CLEAR_BTN_ICO_SMALL_IMG     IMG_CANCELLATION_WHITE_54X54
#define OK_BTN_ICO_WHITE_SMALL      IMG_OK_WHITE_58X58 //白色

void convertTo12HourFormat(uint8_t *hours, uint8_t *isAM);

void lv_img_change_big_img_src(lv_obj_t* parent, const lv_img_dsc_t **src ,uint8_t img_num,uint8_t start);
void lv_img_big_disp(lv_obj_t* parent, const lv_img_dsc_t **src , lv_coord_t x, lv_coord_t y,uint8_t img_num,uint8_t start);
lv_obj_t* lv_img_big_create(lv_obj_t* parent, const lv_img_dsc_t **src , lv_coord_t x, lv_coord_t y,uint8_t img_num,uint8_t start);
lv_obj_t* lv_title_text_create(lv_obj_t* parent ,uint8_t *str,lv_color_t value, uint8_t hour,uint8_t minute);
void roller_mask_event_cb(lv_event_t * e);

extern const lv_img_dsc_t* exercise_type_img[115];
extern const uint16_t exercise_type_str[115] ;
extern const uint16_t measure_text_str[3];
extern const lv_img_dsc_t* switch_ico_img[2];
const uint16_t format_12hour_str[2];
extern const uint16_t week_str[7];

extern lv_obj_t* cont_parent;




uint8_t get_language_id(void);
uint8_t get_system_curr_time_hour(void);
uint8_t get_system_curr_time_min(void);
uint8_t get_time_format_flag(void);
lv_obj_t *lv_user_create_chart(lv_obj_t *parent,lv_coord_t x, lv_coord_t y,uint8_t *value,uint32_t *color_buff,uint16_t num);


 

//bool lv_ui_node_set_cur_p(lv_point_t * top);
//bool lv_ui_node_get_cur(lv_ui_node_t * e);
//void lv_ui_node_hor_prev(lv_obj_t *parent);

#endif

