add EVT_DATA/EVT_CONNECT

This commit is contained in:
lixianjing 2022-07-08 12:09:31 +08:00
parent 80e9d98127
commit a77e78c834
2 changed files with 17 additions and 0 deletions

View File

@ -262,6 +262,11 @@ int32_t event_from_name(const char* name) {
return EVT_BLUR;
}
}
case 'd': {
if (tk_str_eq(name, "data")) {
return EVT_DATA;
}
}
case 'g': {
if (tk_str_eq(name, "global_key_up")) {
return EVT_KEY_UP;
@ -299,6 +304,8 @@ int32_t event_from_name(const char* name) {
case 'c': {
if (tk_str_eq(name, "click")) {
return EVT_CLICK;
} else if (tk_str_eq(name, "connect")) {
return EVT_CONNECT;
}
break;
}

View File

@ -490,6 +490,16 @@ typedef enum _event_type_t {
* (event_t)
*/
EVT_TIMER,
/**
* @const EVT_DATA
* (event_t)
*/
EVT_DATA,
/**
* @const EVT_CONNECT
* (event_t)
*/
EVT_CONNECT,
/**
* @const EVT_REQ_START
* event queue其它请求编号起始值