• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025-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_FB_OPTION_H
17 #define OHOS_FB_OPTION_H
18 #include <refbase.h>
19 #include <string>
20 #include "floating_ball_template_info.h"
21 namespace OHOS {
22 namespace Rosen {
23 class FbOption : public RefBase {
24 public:
25     explicit FbOption();
26     virtual ~FbOption() = default;
27 
28     void SetTemplate(const uint32_t& type);
29     void SetTitle(const std::string& title);
30     void SetContent(const std::string& content);
31     void SetBackgroundColor(const std::string& color);
32     void SetIcon(const std::shared_ptr<Media::PixelMap>& icon);
33 
34     uint32_t GetTemplate() const;
35     std::string GetTitle() const;
36     std::string GetContent() const;
37     std::string GetBackgroundColor() const;
38     std::shared_ptr<Media::PixelMap> GetIcon() const;
39 
40     void GetFbTemplateBaseInfo(FloatingBallTemplateBaseInfo& fbTemplateBaseInfo);
41 private:
42     uint32_t template_ {};
43     std::string title_ {};
44     std::string content_ {};
45     std::string backgroundColor_ {};
46     std::shared_ptr<Media::PixelMap> icon_ {};
47 };
48 }
49 }
50 #endif //OHOS_FB_OPTION_H