📄 im_struct.h
字号:
#ifndef _IM_STRUCT_H
#define _IM_STRUCT_H
#include "IM_user_struct.h"
typedef struct
{
U8 user_type_filter[IM_USER_TYPE_MAX_NUM]; //可用用户类型
im_user_common_struct* user_list[IM_APP_MAX_USER_NUM];
S32 user_num;
}im_app_user_struct;
typedef struct
{
im_app_process_state_enum state;
im_app_process_state_enum new_state;
U32 ticks_on_state;
void* curr_system_status;
}im_app_process_struct;
typedef struct
{
U16 type;
S8* icon;
U16 icon_id;
UI_string_type text;
U16 text_id;
U16 min_duration;
XHC_CALLBACK_PTR click_func;
void* click_func_para;
U16 status_on_tick;
void* app;
} im_statusbar_node_struct;
typedef struct
{
xhc_array_struct status_list;
U16 curr_dispay_type;
im_statusbar_node_struct* curr_status[IM_STATUSBAR_MAX_TYPE];
} im_statusbar_struct;
typedef struct
{
UI_filled_area* list_background;
UI_filled_area* list_item_select_background;
color text_color;
}im_gui_theme_struct;
typedef struct
{
im_app_ui_state_enum state;
im_app_ui_state_enum new_state;
U16 screen;
U16 new_screen;
FuncPtr curr_entry_handler;
FuncPtr curr_exit_handler;
S32 is_entry_im_screen;
S32 is_im_screen_goback;
S32 (*curr_get_category_data_size)(void);
U8 (*curr_get_category_data)(U8 *data);
S32 redraw_main_list_req;
S32 redraw_chat_room_req;
S8 curr_login_edit_index;
U8* list_of_user_type[IM_USER_TYPE_MAX_NUM];
U16 app_login_menu_id;
U16 app_title_str;
U16 app_title_icon;
xhc_array_struct ui_items;
S32 rebuild_ui_items_req;
S32 active_main_index;
void* active_main_obj;
void* old_active_user;
S32 active_chat_index;
void* active_chat_obj;
S32 quit_app_req;
im_statusbar_struct statusbar;
U32 ticks_on_screen;
}im_app_ui_struct;
typedef struct
{
S32 is_enable;
S32 user_type;
S8 name[IM_MAX_NAME_LENGTH];
S8 pass_word[IM_MAX_PASSWORD_LENGTH];
S32 is_save_login_data;
S32 def_login_state;
S32 is_login_success;
}im_app_login_opt_struct;
typedef struct
{
im_app_login_opt_struct login_opt_read[IM_APP_MAX_USER_NUM];
im_app_login_opt_struct login_opt[IM_APP_MAX_USER_NUM];
S32 login_user_num;
S32 is_show_logo_scr;
S32 is_show_login_scr;
S32 is_enable_multi_user;
S32 is_only_show_online;
S32 is_enable_audio;
S32 is_enable_vibrator;
S32 curr_theme;
S8 app_login_file_path_name[64];
S8 app_option_file_path_name[64];
}im_app_option_struct;
typedef struct
{
XHC_CALLBACK_PTR create_app_func;
im_common_obj_func_struct user_func;
im_common_obj_func_struct team_func;
im_common_obj_func_struct friend_func;
im_common_obj_func_struct chat_history_func;
im_common_obj_func_struct chat_msg_func;
im_common_obj_func_struct system_msg_func;
}im_app_common_struct;
typedef struct
{
IM_COMMON_OBJ_STRUCT
U16 msg_type;
UI_string_type desc;
void* data;
XHC_CALLBACK_PTR read_func;
} im_app_system_msg_struct;
typedef struct
{
im_user_common_team_type_struct sys_team;
im_user_common_chat_history_type_struct* curr_chat;
UI_string_type curr_edit_msg; //当前正在编辑的消息
U16 edit_msg_size; //当前正在编辑的消息大小
}im_app_friends_struct;
typedef struct
{
S8 app_file_path_root[32];
S8 app_log_file_path_name[64];
FS_HANDLE log_file;
}im_app_data_struct;
typedef struct
{
IM_COMMON_OBJ_STRUCT
im_app_process_struct process; //核心流程管理,见IM_app.c
im_app_ui_struct ui; //界面流程管理,见IM_ui.c
im_app_common_struct common; //通用功能,见IM_app.c
im_app_user_struct user; //用户数据管理,见IM_app.c
im_app_friends_struct friends; //好友数据管理,见IM_friends.c
im_app_option_struct opt; //选项数据管理,见IM_option.c
im_app_data_struct data; //数据管理,见IM_other.c
} im_app_struct;
typedef struct
{
S32 debug_enable; //是否开启调试输出功能
S32 log_file_enable; //是否将调试信息输出到LOG文件
S32 max_chat_history_file_size; //聊天记录文件最大容量(注:每个文件仅保存一个好友的聊天记录)
S32 msg_editor_size; //编辑信息窗口最大可输入字节数
U16 full_input_type; //编辑信息窗口默认输入法
S32 disable_background_running; //禁止后台运行
S32 dur_auto_offline_in_sleep_mode; //睡眠模式多少分钟以后自动下线
S32 default_enable_audio; //出厂默认是否开启语音
S32 default_enable_vibrator; //出厂默认是否开启振动
S32 default_enable_theme; //出厂默认皮肤序号
S8 cust_file_path_root[32]; //IM普通数据,如聊天记录等
} im_custom_struct;
typedef struct
{
U16 timer_id; //通用定时器ID
U16 timer_id2; //高精度定时器ID,主要用于UI
U8 touch_screen_enable; //是否开启触摸屏
} im_adp_struct;
typedef struct //IM管理中心
{
im_app_struct app_list[IM_APP_MAX_NUM]; //IM程序列表
im_user_type_struct user_type[IM_USER_TYPE_MAX_NUM]; //IM用户类型列表
im_custom_struct custom; //IM客户自定义数据
im_adp_struct adp; //IM适配层数据
S32 mem_id; //IM系统内存管理ID
S8 sys_file_path_root[32]; //IM系统级目录,保存重要数据
S8 cust_file_path_root[32]; //IM普通数据,如聊天记录等
S8 log_file_path_root[32]; //LOG文件路径
} im_global_struct;
#endif //_IM_STRUCT_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -