mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
format code
This commit is contained in:
parent
fa7789947c
commit
90b418624d
@ -326,7 +326,7 @@ ret_t lcd_resize(lcd_t* lcd, wh_t w, wh_t h, uint32_t line_length) {
|
||||
if (lcd->resize(lcd, w, h, line_length) == RET_OK) {
|
||||
lcd->w = w;
|
||||
lcd->h = h;
|
||||
return RET_OK;
|
||||
return RET_OK;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -727,7 +727,8 @@ uint32_t window_manager_get_curr_expected_sleep_time(widget_t* widget) {
|
||||
return wm->curr_expected_sleep_time;
|
||||
}
|
||||
|
||||
ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget, uint32_t curr_expected_sleep_time) {
|
||||
ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget,
|
||||
uint32_t curr_expected_sleep_time) {
|
||||
window_manager_t* wm = WINDOW_MANAGER(widget);
|
||||
return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS);
|
||||
wm->curr_expected_sleep_time = curr_expected_sleep_time;
|
||||
|
@ -493,7 +493,8 @@ ret_t window_manager_on_theme_changed(widget_t* widget);
|
||||
ret_t window_manager_dispatch_top_window_changed(widget_t* widget);
|
||||
ret_t window_manager_dispatch_window_event(widget_t* window, event_type_t type);
|
||||
uint32_t window_manager_get_curr_expected_sleep_time(widget_t* widget);
|
||||
ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget, uint32_t curr_expected_sleep_time);
|
||||
ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget,
|
||||
uint32_t curr_expected_sleep_time);
|
||||
|
||||
#define WINDOW_MANAGER(widget) ((window_manager_t*)(widget))
|
||||
|
||||
|
@ -238,7 +238,7 @@ ret_t tk_semaphore_wait(tk_semaphore_t* semaphore, uint32_t timeout_ms) {
|
||||
if (timeout_ms == -1) {
|
||||
int retval;
|
||||
do {
|
||||
retval = sem_wait(semaphore->sem);
|
||||
retval = sem_wait(semaphore->sem);
|
||||
} while (retval < 0 && errno == EINTR);
|
||||
|
||||
return_value_if_fail(retval == 0, RET_FAIL);
|
||||
@ -265,10 +265,10 @@ tryagain:
|
||||
return RET_OK;
|
||||
} else {
|
||||
switch (errno) {
|
||||
case EINTR:
|
||||
goto tryagain;
|
||||
case ETIMEDOUT:
|
||||
return RET_TIMEOUT;
|
||||
case EINTR:
|
||||
goto tryagain;
|
||||
case ETIMEDOUT:
|
||||
return RET_TIMEOUT;
|
||||
}
|
||||
return RET_FAIL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user