22877bda152e47c4f727f6854c228b0f0248bfa8
[platform/core/uifw/dali-core.git] / dali / internal / event / object / custom-object-internal.h
1 #ifndef __DALI_INTERNAL_CUSTOM_OBJECT_H__
2 #define __DALI_INTERNAL_CUSTOM_OBJECT_H__
3
4 /*
5  * Copyright (c) 2017 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 // INTERNAL INCLUDES
22 #include <dali/internal/event/common/object-impl.h>
23
24 namespace Dali
25 {
26
27 namespace Internal
28 {
29
30 namespace SceneGraph
31 {
32 class PropertyOwner;
33 }
34
35 class CustomObject : public Object
36 {
37 public:
38
39   /**
40    * Create a new custom object.
41    * @return A pointer to the newly allocated object.
42    */
43   static CustomObject* New();
44
45   /**
46    * @copydoc Dali::Internal::Object::GetSceneObject()
47    */
48   virtual const SceneGraph::PropertyOwner* GetSceneObject() const;
49
50   /**
51    * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty()
52    */
53   virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const;
54
55   /**
56    * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty()
57    */
58   virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const;
59
60   /**
61    * @copydoc Dali::Internal::Object::SetDefaultProperty()
62    */
63   virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue);
64
65   /**
66    * @copydoc Dali::Internal::Object::GetDefaultProperty()
67    */
68   virtual Property::Value GetDefaultProperty( Property::Index index ) const;
69
70   /**
71    * @copydoc Dali::Internal::Object::GetDefaultPropertyCurrentValue()
72    */
73   virtual Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const;
74
75 protected:
76
77   /**
78    * A reference counted object may only be deleted by calling Unreference()
79    */
80   virtual ~CustomObject();
81
82   /**
83    * Private constructor; see also CustomObject::New()
84    */
85   CustomObject();
86
87   // Undefined
88   CustomObject(const CustomObject&);
89
90   // Undefined
91   CustomObject& operator=(const CustomObject& rhs);
92
93 protected:
94
95   SceneGraph::PropertyOwner* mUpdateObject;
96 };
97
98 } // namespace Internal
99
100 } // namespace Dali
101
102 #endif // __DALI_INTERNAL_CUSTOM_OBJECT_H__