mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
improve for AWTK_LITE
This commit is contained in:
parent
84113a0f00
commit
2d97791a31
@ -4,6 +4,7 @@
|
||||
* 完善文档。
|
||||
* 增加widget\_auto\_scale\_children。
|
||||
* 将widget\_on\_pointer\_xxx\_children公开。
|
||||
* 为AWTK\_LITE优化大小(感谢智明提供补丁)
|
||||
|
||||
2021/05/16
|
||||
* 完善layout处理流程。
|
||||
|
@ -153,7 +153,9 @@ ret_t tk_init_internal(void) {
|
||||
font_loader_t* font_loader = NULL;
|
||||
|
||||
s_ui_thread_id = tk_thread_self();
|
||||
#ifndef AWTK_LITE
|
||||
fscript_global_init();
|
||||
#endif
|
||||
#ifdef WITH_FSCRIPT_EXT
|
||||
fscript_ext_init();
|
||||
#endif /*WITH_FSCRIPT_EXT*/
|
||||
@ -322,8 +324,9 @@ ret_t tk_deinit_internal(void) {
|
||||
#endif /*WITH_DATA_READER_WRITER*/
|
||||
|
||||
system_info_deinit();
|
||||
#ifndef AWTK_LITE
|
||||
fscript_global_deinit();
|
||||
|
||||
#endif
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
@ -354,6 +354,7 @@ typedef struct _system_info_t system_info_t;
|
||||
#define WITHOUT_WINDOW_ANIMATORS 1
|
||||
#define WITHOUT_WIDGET_ANIMATORS 1
|
||||
#define WITHOUT_DIALOG_HIGHLIGHTER 1
|
||||
#undef WITH_UNICODE_BREAK
|
||||
#endif /*AWTK_LITE*/
|
||||
|
||||
/**
|
||||
|
@ -1720,6 +1720,7 @@ static ret_t widget_on_ungrab_keys(void* ctx, event_t* e) {
|
||||
}
|
||||
|
||||
static ret_t widget_exec_code(void* ctx, event_t* evt) {
|
||||
#ifndef AWTK_LITE
|
||||
value_t v;
|
||||
value_t result;
|
||||
ret_t ret = RET_OK;
|
||||
@ -1784,6 +1785,9 @@ static ret_t widget_exec_code(void* ctx, event_t* evt) {
|
||||
OBJECT_UNREF(obj);
|
||||
|
||||
return ret;
|
||||
#else
|
||||
return RET_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ret_t widget_free_code(void* ctx, event_t* evt) {
|
||||
|
@ -14,6 +14,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "base/types_def.h"
|
||||
#ifndef AWTK_LITE
|
||||
#include "tkc/mem.h"
|
||||
#include "tkc/utils.h"
|
||||
#include "tkc/fscript.h"
|
||||
@ -2100,3 +2102,5 @@ double tk_expr_eval(const char* expr) {
|
||||
|
||||
return value_double(&v);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -117,6 +117,7 @@ static widget_t* window_manager_find_prev_normal_window(widget_t* widget) {
|
||||
}
|
||||
|
||||
ret_t window_manager_default_snap_curr_window(widget_t* widget, widget_t* curr_win, bitmap_t* img) {
|
||||
#ifndef WITHOUT_WINDOW_ANIMATORS
|
||||
canvas_t* c = NULL;
|
||||
rect_t r = {0};
|
||||
canvas_t* canvas = NULL;
|
||||
@ -141,10 +142,11 @@ ret_t window_manager_default_snap_curr_window(widget_t* widget, widget_t* curr_w
|
||||
ENSURE(canvas_offline_destroy(canvas) == RET_OK);
|
||||
img->flags |= BITMAP_FLAG_OPAQUE;
|
||||
canvas_restore(c);
|
||||
|
||||
#endif
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
#ifndef WITHOUT_WINDOW_ANIMATORS
|
||||
static ret_t window_manager_default_snap_prev_window_draw_dialog_highlighter_and_get_alpha(
|
||||
widget_t* widget, canvas_t* c, uint8_t* alpha) {
|
||||
value_t v;
|
||||
@ -166,8 +168,10 @@ static ret_t window_manager_default_snap_prev_window_draw_dialog_highlighter_and
|
||||
}
|
||||
return RET_FAIL;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret_t window_manager_default_snap_prev_window(widget_t* widget, widget_t* prev_win, bitmap_t* img) {
|
||||
#ifndef WITHOUT_WINDOW_ANIMATORS
|
||||
rect_t r = {0};
|
||||
canvas_t* c = NULL;
|
||||
canvas_t* canvas = NULL;
|
||||
@ -235,6 +239,7 @@ ret_t window_manager_default_snap_prev_window(widget_t* widget, widget_t* prev_w
|
||||
dialog_highlighter_set_bg_clip_rect(dialog_highlighter, &r);
|
||||
}
|
||||
wm->curr_win = NULL;
|
||||
#endif
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user