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 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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/actors/renderable-actor.h>
23 #include <dali/public-api/common/dali-common.h>
24 #include <dali/internal/event/actors/actor-impl.h>
32 class RenderableAttachment;
35 * An abstract base class for renderable actors
37 class RenderableActor : public Actor
42 * @copydoc Dali::RenderableActor::SetSortModifier()
44 void SetSortModifier(float modifier);
47 * @copydoc Dali::RenderableActor::GetSortModifier()
49 float GetSortModifier() const;
52 * @copydoc Dali::RenderableActor::SetCullFace()
54 void SetCullFace(CullFaceMode mode);
57 * @copydoc Dali::RenderableActor::GetCullFace()
59 CullFaceMode GetCullFace() const;
62 * @copydoc Dali::RenderableActor::SetBlendMode()
64 void SetBlendMode( BlendingMode::Type mode );
67 * @copydoc Dali::RenderableActor::GetBlendMode()
69 BlendingMode::Type GetBlendMode() const;
72 * @copydoc Dali::RenderableActor::SetBlendFunc()
74 void SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba );
77 * @copydoc Dali::RenderableActor::SetBlendFunc()
79 void SetBlendFunc( BlendingFactor::Type srcFactorRgb, BlendingFactor::Type destFactorRgb,
80 BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha );
83 * @copydoc Dali::RenderableActor::GetBlendFunc()
85 void GetBlendFunc( BlendingFactor::Type& srcFactorRgb, BlendingFactor::Type& destFactorRgb,
86 BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const;
89 * @copydoc Dali::RenderableActor::SetBlendEquation()
91 void SetBlendEquation( BlendingEquation::Type equationRgba );
94 * @copydoc Dali::RenderableActor::SetBlendEquation()
96 void SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha );
99 * @copydoc Dali::RenderableActor::GetBlendEquation()
101 void GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const;
104 * @copydoc Dali::RenderableActor::SetBlendColor()
106 void SetBlendColor( const Vector4& color );
109 * @copydoc Dali::RenderableActor::GetBlendColor()
111 const Vector4& GetBlendColor() const;
116 * Protected constructor; only derived classes are instantiatable.
121 * A reference counted object may only be deleted by calling Unreference()
123 virtual ~RenderableActor();
128 * @return a reference to the renderable attachment
130 virtual RenderableAttachment& GetRenderableAttachment() const = 0;
133 RenderableActor(const RenderableActor&);
135 RenderableActor& operator=(const RenderableActor& rhs);
138 } // namespace Internal
140 // Helpers for public-api forwarding methods
142 inline Internal::RenderableActor& GetImplementation(Dali::RenderableActor& renderable)
144 DALI_ASSERT_ALWAYS( renderable && "RenderableActor handle is empty" );
146 BaseObject& handle = renderable.GetBaseObject();
148 return static_cast<Internal::RenderableActor&>(handle);
151 inline const Internal::RenderableActor& GetImplementation(const Dali::RenderableActor& renderable)
153 DALI_ASSERT_ALWAYS(renderable && "RenderableActor handle is empty" );
155 const BaseObject& handle = renderable.GetBaseObject();
157 return static_cast<const Internal::RenderableActor&>(handle);
162 #endif // __DALI_INTERNAL_RENDERABLE_ACTOR_H__