mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 12:08:16 +08:00
add fscript_ext
This commit is contained in:
parent
f68eaf21cc
commit
0c7843798f
@ -35,6 +35,7 @@
|
||||
#include "base/window_manager.h"
|
||||
#include "base/widget_factory.h"
|
||||
#include "base/assets_manager.h"
|
||||
#include "fscript_ext/fscript_ext.h"
|
||||
|
||||
#ifdef WITH_DATA_READER_WRITER
|
||||
#include "tkc/data_reader_factory.h"
|
||||
@ -153,6 +154,7 @@ ret_t tk_init_internal(void) {
|
||||
|
||||
s_ui_thread_id = tk_thread_self();
|
||||
fscript_global_init();
|
||||
fscript_ext_init();
|
||||
#ifdef WITH_DATA_READER_WRITER
|
||||
data_writer_factory_set(data_writer_factory_create());
|
||||
data_reader_factory_set(data_reader_factory_create());
|
||||
|
30
src/fscript_ext/fscript_ext.c
Normal file
30
src/fscript_ext/fscript_ext.c
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* File: fscript_ext.h
|
||||
* Author: AWTK Develop Team
|
||||
* Brief: ext functions for fscript
|
||||
*
|
||||
* Copyright (c) 2020 - 2021 Guangzhou ZHIYUAN Electronics Co.,Ltd.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* History:
|
||||
* ================================================================
|
||||
* 2021-01-03 Li XianJing <lixianjing@zlg.cn> created
|
||||
*
|
||||
*/
|
||||
|
||||
#include "fscript_ext/fscript_math.h"
|
||||
|
||||
#if defined(LINUX) || defined(WINDOWS) || defined(MACOS) || defined(ANDROID) || defined(IOS)
|
||||
#define FSCRIPT_WITH_MATH 1
|
||||
#endif/*PC*/
|
||||
|
||||
ret_t fscript_ext_init(void) {
|
||||
#ifdef FSCRIPT_WITH_MATH
|
||||
fscript_math_register();
|
||||
#endif/*FSCRIPT_WITH_MATH*/
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
35
src/fscript_ext/fscript_ext.h
Normal file
35
src/fscript_ext/fscript_ext.h
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* File: fscript_ext.h
|
||||
* Author: AWTK Develop Team
|
||||
* Brief: ext functions for fscript
|
||||
*
|
||||
* Copyright (c) 2020 - 2021 Guangzhou ZHIYUAN Electronics Co.,Ltd.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* History:
|
||||
* ================================================================
|
||||
* 2021-01-03 Li XianJing <lixianjing@zlg.cn> created
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TK_FSCRIPT_EXT_H
|
||||
#define TK_FSCRIPT_EXT_H
|
||||
|
||||
#include "tkc/str.h"
|
||||
#include "tkc/object.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
/**
|
||||
* @method fscript_ext_init
|
||||
* 注册扩展函数。
|
||||
*
|
||||
* @return {ret_t} 返回RET_OK表示成功,否则表示失败。
|
||||
*/
|
||||
ret_t fscript_ext_init(void);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /*TK_FSCRIPT_EXT_H*/
|
Loading…
Reference in New Issue
Block a user