• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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_FRAMEWORKS_BRIDGE_ARKTS_FRONTEND_ANI_GRAPHICS_MODULE_H
17 #define FOUNDATION_ACE_FRAMEWORKS_BRIDGE_ARKTS_FRONTEND_ANI_GRAPHICS_MODULE_H
18 
19 #include <cstdint>
20 
21 #include "core/components_ng/base/modifier.h"
22 
23 typedef class __ani_object* ani_object;
24 typedef struct __ani_env ani_env;
25 typedef int64_t ani_long;
26 typedef class __ani_fn_object *ani_fn_object;
27 
28 namespace OHOS::Ace::Framework {
29 class AniGraphicsModule final {
30 public:
31     static void SetDrawCallback(ani_env* env, ani_long ptr, ani_fn_object fnObj);
32     static void SetDrawModifier(ani_env* env, ani_long ptr, ani_object fnObj);
33     static void Invalidate(ani_env* env, ani_long ptr);
34 
35 private:
36     static ani_object CreateDrawingContext(ani_env* env, const NG::DrawingContext& context);
37 };
38 } // namespace OHOS::Ace::Framework
39 #endif
40