• 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 OHOS_FORM_FWK_FORM_RENDER_TASK_MGR_H
17 #define OHOS_FORM_FWK_FORM_RENDER_TASK_MGR_H
18 
19 #include <singleton.h>
20 #include "iremote_object.h"
21 #include "want.h"
22 #include "data_center/form_record/form_record.h"
23 
24 namespace OHOS {
25 namespace AppExecFwk {
26 using Want = OHOS::AAFwk::Want;
27 class FormRenderTaskMgr final : public DelayedRefSingleton<FormRenderTaskMgr> {
28     DECLARE_DELAYED_REF_SINGLETON(FormRenderTaskMgr)
29 
30 public:
31     void PostUpdateFormSize(const int64_t &formId, float width, float height, float borderWidth,
32         const std::string &uid, const sptr<IRemoteObject> &remoteObject);
33 
34     void PostOnUnlock(const sptr<IRemoteObject> &remoteObject);
35 
36     void PostSetVisibleChange(int64_t formId, bool isVisible, const sptr<IRemoteObject> &remoteObject);
37 
38     void PostReloadForm(const std::vector<FormRecord> &&formRecords, const Want &want,
39         const sptr<IRemoteObject> &remoteObject);
40 
41 private:
42     void UpdateFormSize(const int64_t &formId, float width, float height, float borderWidth, const std::string &uid,
43         const sptr<IRemoteObject> &remoteObject);
44 
45     void OnUnlock(const sptr<IRemoteObject> &remoteObject);
46 
47     void SetVisibleChange(int64_t formId, bool isVisible, const sptr<IRemoteObject> &remoteObject);
48 
49     void ReloadForm(const std::vector<FormRecord> &&formRecords, const Want &want,
50         const sptr<IRemoteObject> &remoteObject);
51 };
52 }  // namespace AppExecFwk
53 }  // namespace OHOS
54 #endif // OHOS_FORM_FWK_FORM_RENDER_TASK_MGR_H