1 /*
2 * Copyright (c) 2024 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 #include "js_text_init.h"
17 #include "enum_napi/text_enum_napi.h"
18 #include "fontcollection_napi/js_fontcollection.h"
19 #include "js_fontdescriptor.h"
20 #include "paragraph_builder_napi/js_paragraph_builder.h"
21 #include "paragraph_napi/js_paragraph.h"
22 #include "run_napi/js_run.h"
23 #include "text_line_napi/js_text_line.h"
24
25 namespace OHOS::Rosen {
TextInit(napi_env env,napi_value exportObj)26 napi_value TextInit(napi_env env, napi_value exportObj)
27 {
28 JsFontCollection::Init(env, exportObj);
29 JsEnum::Init(env, exportObj);
30 JsRun::Init(env, exportObj);
31 JsTextLine::Init(env, exportObj);
32 JsParagraph::Init(env, exportObj);
33 JsParagraphBuilder::Init(env, exportObj);
34 JsFontDescriptor::Init(env, exportObj);
35 return exportObj;
36 }
37 } // namespace OHOS::Rosen
38