• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FOUNDATION_ACE_NAPI_NATIVE_ENGINE_IMPL_JERRYSCRIPT_JERRYSCRIPT_HEADERS_H
17 #define FOUNDATION_ACE_NAPI_NATIVE_ENGINE_IMPL_JERRYSCRIPT_JERRYSCRIPT_HEADERS_H
18 
19 #include "jerryscript-port-default.h"
20 #include "jerryscript.h"
21 
22 using jerry_finalizer_t = void (*)(void* data, void* hint);
23 
24 bool jerry_add_external();
25 jerry_value_t jerry_create_external(void* value, jerry_finalizer_t finalizer, void* hint);
26 bool jerry_value_is_external(const jerry_value_t object);
27 void* jerry_value_get_external(const jerry_value_t object);
28 
29 void jerry_freeze(jerry_value_t value);
30 void jerry_seal(jerry_value_t value);
31 jerry_value_t jerry_strict_date(double time);
32 double jerry_get_date(jerry_value_t value);
33 bool jerry_is_date(jerry_value_t value);
34 
35 #endif /* FOUNDATION_ACE_NAPI_NATIVE_ENGINE_IMPL_JERRYSCRIPT_JERRYSCRIPT_HEADERS_H */