(Canvas Renderer) Moved Devel Headers into sub-folder to improve SAM score
[platform/core/uifw/dali-adaptor.git] / dali / internal / canvas-renderer / generic / drawable-impl-generic.h
1 #ifndef DALI_INTERNAL_GENERIC_DRAWABLE_IMPL_GENERIC_H
2 #define DALI_INTERNAL_GENERIC_DRAWABLE_IMPL_GENERIC_H
3
4 /*
5  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/base-object.h>
23
24 // INTERNAL INCLUDES
25 #include <dali/devel-api/adaptor-framework/canvas-renderer/canvas-renderer-drawable.h>
26 #include <dali/devel-api/adaptor-framework/canvas-renderer/canvas-renderer.h>
27 #include <dali/internal/canvas-renderer/common/drawable-impl.h>
28
29 namespace Dali
30 {
31 namespace Internal
32 {
33 namespace Adaptor
34 {
35 /**
36  * Dali internal Drawable.
37  */
38 class DrawableGeneric : public Dali::Internal::Adaptor::Drawable
39 {
40 public:
41   /**
42    * @brief Creates a Drawable object.
43    * @return A pointer to a newly allocated Drawable
44    */
45   static DrawableGeneric* New();
46
47   /**
48    * @copydoc Dali::CanvasRenderer::Drawable::SetOpacity()
49    */
50   bool SetOpacity(float opacity) override;
51
52   /**
53    * @copydoc Dali::CanvasRenderer::Drawable::GetOpacity()
54    */
55   float GetOpacity() const override;
56
57   /**
58    * @copydoc Dali::CanvasRenderer::Drawable::Rotate()
59    */
60   bool Rotate(Degree degree) override;
61
62   /**
63    * @copydoc Dali::CanvasRenderer::Drawable::Scale()
64    */
65   bool Scale(float factor) override;
66
67   /**
68    * @copydoc Dali::CanvasRenderer::Drawable::Translate()
69    */
70   bool Translate(Vector2 translate) override;
71
72   /**
73    * @copydoc Dali::CanvasRenderer::Drawable::Transform()
74    */
75   bool Transform(const Dali::Matrix3& matrix) override;
76
77   /**
78    * @copydoc Dali::CanvasRenderer::Drawable::GetBoundingBox()
79    */
80   Rect<float> GetBoundingBox() const override;
81
82   /**
83    * @copydoc Dali::CanvasRenderer::Drawable::SetClipPath()
84    */
85   bool SetClipPath(Dali::CanvasRenderer::Drawable& clip) override;
86
87   /**
88    * @copydoc Dali::CanvasRenderer::Drawable::SetMask()
89    */
90   bool SetMask(Dali::CanvasRenderer::Drawable& mask, Dali::CanvasRenderer::Drawable::MaskType type) override;
91
92   /**
93    * @copydoc Internal::Adaptor::Drawable::GetCompositionDrawable()
94    */
95   Dali::CanvasRenderer::Drawable GetCompositionDrawable() const override;
96
97   /**
98    * @copydoc Internal::Adaptor::Drawable::GetCompositionType()
99    */
100   CompositionType GetCompositionType() const override;
101
102   /**
103    * @copydoc Internal::Adaptor::Drawable::SetAdded()
104    */
105   void SetAdded(bool added) override;
106
107   /**
108    * @copydoc Internal::Adaptor::Drawable::IsAdded()
109    */
110   bool IsAdded() const override;
111
112   /**
113    * @copydoc Internal::Adaptor::Drawable::SetObject()
114    */
115   void SetObject(const void* object) override;
116
117   /**
118    * @copydoc Internal::Adaptor::Drawable::GetObject()
119    */
120   void* GetObject() const override;
121
122   /**
123    * @copydoc Internal::Adaptor::Drawable::SetChanged()
124    */
125   void SetChanged(bool changed);
126
127   /**
128    * @copydoc Internal::Adaptor::Drawable::GetChanged()
129    */
130   bool GetChanged() const;
131
132   DrawableGeneric(const DrawableGeneric&) = delete;
133   DrawableGeneric& operator=(DrawableGeneric&) = delete;
134   DrawableGeneric(DrawableGeneric&&)           = delete;
135   DrawableGeneric& operator=(DrawableGeneric&&) = delete;
136
137 protected:
138   /**
139    * @brief Constructor
140    */
141   DrawableGeneric();
142
143   /**
144    * @brief Destructor.
145    */
146   virtual ~DrawableGeneric() override;
147 };
148
149 } // namespace Adaptor
150
151 } // namespace Internal
152
153 } // namespace Dali
154
155 #endif // DALI_INTERNAL_GENERIC_DRAWABLE_IMPL_GENERIC_H