#include "include.h" #include "func.h" #if TRACE_EN #define TRACE(...) printf(__VA_ARGS__) #else #define TRACE(...) #endif typedef struct f_remind_disconnect_t_ { } f_remind_disconnect_t; void *barcode_creat(void *parent, char *str, int x, int y, int h, u8 length, bool dir); //创建蓝牙未连接窗体 compo_form_t *func_remind_disconnect_form_create(void) { //新建窗体 compo_form_t *frm = compo_form_create(true); //创建 暂无通话记录 文本框 compo_textbox_t *txt = compo_textbox_create(frm, 50); // compo_setid(txt,COMPO_ID_TXT); compo_textbox_set_location(txt, GUI_SCREEN_CENTER_X, GUI_SCREEN_CENTER_Y, GUI_SCREEN_WIDTH-40, 50); compo_textbox_set_multiline(txt,true); compo_textbox_set_autoroll_mode(txt, TEXT_AUTOROLL_MODE_SROLL_CIRC); compo_textbox_set(txt, i18n[STR_CONNECT_BT]); compo_textbox_set_visible(txt,true); //创建按键 // compo_button_t *btn = compo_button_create_by_image(frm, UI_BUF_REMIND_POP_DISCONNET_BIN); // compo_button_set_pos(btn, GUI_SCREEN_CENTER_X, GUI_SCREEN_CENTER_Y); return frm; } //蓝牙未连接功能事件处理 static void func_remind_disconnect_process(void) { func_process(); } //蓝牙未连接功能消息处理 static void func_remind_disconnect_message(size_msg_t msg) { switch (msg) { case MSG_CTP_CLICK: break; case MSG_CTP_SHORT_UP: break; case MSG_CTP_SHORT_DOWN: break; case MSG_CTP_LONG: break; default: func_message(msg); break; } } //进入蓝牙未连接功能 static void func_remind_disconnect_enter(void) { func_cb.f_cb = func_zalloc(sizeof(f_remind_disconnect_t)); func_cb.frm_main = func_remind_disconnect_form_create(); } //退出蓝牙未连接功能 static void func_remind_disconnect_exit(void) { func_cb.last = FUN_REMIND_DISCONNECT; } //蓝牙未连接功能 void func_remind_disconnect(void) { printf("%s\n", __func__); func_remind_disconnect_enter(); while (func_cb.sta == FUN_REMIND_DISCONNECT) { func_remind_disconnect_process(); func_remind_disconnect_message(msg_dequeue()); } func_remind_disconnect_exit(); }