/* Get object's and its ancestors type. Put their name in  */
void lv_obj_get_type(lv_obj_t *obj, lv_obj_type_t *buf)
/* Get object's and its ancestors type. Put their name in  */
void lv_obj_get_type(lv_obj_t *obj, lv_obj_type_t *buf)
{
    lv_obj_type_t tmp;
    memset(buf, 0, sizeof(lv_obj_type_t));
    memset(&tmp, 0, sizeof(lv_obj_type_t));
    obj->signal_func(obj, LV_SIGNAL_GET_TYPE, &tmp);
    uint8_t cnt;
    for(cnt = 0; cnt < LV_MAX_ANCESTOR_NUM; cnt++) {
        if(tmp.type[cnt] == NULL) break;
    }
    uint8_t i;
    for(i = 0; i < cnt; i++) {
        buf->type[i] = tmp.type[cnt - 1 - i];
    }
}