• 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 KNUCKLE_DRAWING_H
17 #define KNUCKLE_DRAWING_H
18 
19 #include "i_knuckle_drawing.h"
20 #include "knuckle_drawing_manager.h"
21 #ifndef OHOS_BUILD_ENABLE_NEW_KNUCKLE_DYNAMIC
22 #include "knuckle_dynamic_drawing_manager.h"
23 #endif // OHOS_BUILD_ENABLE_NEW_KNUCKLE_DYNAMIC
24 
25 namespace OHOS {
26 namespace MMI {
27 class KnuckleDrawing final : public IKnuckleDrawing {
28 public:
29     KnuckleDrawing();
30     ~KnuckleDrawing() = default;
31 
32     void Draw(const OLD::DisplayInfo& displayInfo, const std::shared_ptr<PointerEvent> &touchEvent) override;
33     void SetMultiWindowScreenId(uint64_t screenId, uint64_t displayNodeScreenId) override;
34     void RegisterAddTimer(AddTimerFunc addTimerFunc) override;
35 private:
36     std::shared_ptr<KnuckleDrawingManager> knuckleDrawingMgr_ {nullptr};
37 #ifndef OHOS_BUILD_ENABLE_NEW_KNUCKLE_DYNAMIC
38     std::shared_ptr<KnuckleDynamicDrawingManager> knuckleDynamicDrawingMgr_ {nullptr};
39 #endif // OHOS_BUILD_ENABLE_NEW_KNUCKLE_DYNAMIC
40 };
41 } // namespace MMI
42 } // namespace OHOS
43 
44 #endif // KNUCKLE_DRAWING_H
45