1 #ifndef __DALI_INTERNAL_RENDERABLE_ACTOR_H__
2 #define __DALI_INTERNAL_RENDERABLE_ACTOR_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.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
11 // http://floralicense.org/license/
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.
21 #include <dali/public-api/actors/renderable-actor.h>
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/internal/event/actors/actor-impl.h>
31 class RenderableAttachment;
34 * An abstract base class for renderable actors
36 class RenderableActor : public Actor
41 * @copydoc Dali::RenderableActor::SetSortModifier()
43 void SetSortModifier(float modifier);
46 * @copydoc Dali::RenderableActor::GetSortModifier()
48 float GetSortModifier() const;
51 * @copydoc Dali::RenderableActor::SetCullFace()
53 void SetCullFace(CullFaceMode mode);
56 * @copydoc Dali::RenderableActor::GetCullFace()
58 CullFaceMode GetCullFace() const;
61 * @copydoc Dali::RenderableActor::SetBlendMode()
63 void SetBlendMode( BlendingMode::Type mode );
66 * @copydoc Dali::RenderableActor::GetBlendMode()
68 BlendingMode::Type GetBlendMode() const;
71 * @copydoc Dali::RenderableActor::SetBlendFunc()
73 void SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba );
76 * @copydoc Dali::RenderableActor::SetBlendFunc()
78 void SetBlendFunc( BlendingFactor::Type srcFactorRgb, BlendingFactor::Type destFactorRgb,
79 BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha );
82 * @copydoc Dali::RenderableActor::GetBlendFunc()
84 void GetBlendFunc( BlendingFactor::Type& srcFactorRgb, BlendingFactor::Type& destFactorRgb,
85 BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const;
88 * @copydoc Dali::RenderableActor::SetBlendEquation()
90 void SetBlendEquation( BlendingEquation::Type equationRgba );
93 * @copydoc Dali::RenderableActor::SetBlendEquation()
95 void SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha );
98 * @copydoc Dali::RenderableActor::GetBlendEquation()
100 void GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const;
103 * @copydoc Dali::RenderableActor::SetBlendColor()
105 void SetBlendColor( const Vector4& color );
108 * @copydoc Dali::RenderableActor::GetBlendColor()
110 const Vector4& GetBlendColor() const;
115 * Protected constructor; only derived classes are instantiatable.
120 * A reference counted object may only be deleted by calling Unreference()
122 virtual ~RenderableActor();
127 * @return a reference to the renderable attachment
129 virtual RenderableAttachment& GetRenderableAttachment() const = 0;
132 RenderableActor(const RenderableActor&);
134 RenderableActor& operator=(const RenderableActor& rhs);
137 } // namespace Internal
139 // Helpers for public-api forwarding methods
141 inline Internal::RenderableActor& GetImplementation(Dali::RenderableActor& renderable)
143 DALI_ASSERT_ALWAYS( renderable && "RenderableActor handle is empty" );
145 BaseObject& handle = renderable.GetBaseObject();
147 return static_cast<Internal::RenderableActor&>(handle);
150 inline const Internal::RenderableActor& GetImplementation(const Dali::RenderableActor& renderable)
152 DALI_ASSERT_ALWAYS(renderable && "RenderableActor handle is empty" );
154 const BaseObject& handle = renderable.GetBaseObject();
156 return static_cast<const Internal::RenderableActor&>(handle);
161 #endif // __DALI_INTERNAL_RENDERABLE_ACTOR_H__