/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/public-api/object/handle.h>
// INTERNAL INCLUDES
+#include <dali/public-api/animation/constraint.h>
#include <dali/public-api/object/property-conditions.h>
#include <dali/public-api/object/property-notification.h>
+#include <dali/internal/event/animation/constraint-impl.h>
#include <dali/internal/event/common/object-impl.h>
+#include <dali/internal/event/object/custom-object-internal.h>
#include <dali/integration-api/debug.h>
namespace Dali
{
-Handle::Handle(Dali::Internal::Object* handle)
- : BaseHandle(handle)
+Handle::Handle( Dali::Internal::Object* handle )
+: BaseHandle(handle)
{
}
+
Handle::Handle()
{
}
+Handle Handle::New()
+{
+ return Handle( Internal::CustomObject::New() );
+}
+
Handle::~Handle()
{
}
return GetImplementation(*this).GetPropertyIndex( name );
}
+Property::Index Handle::GetPropertyIndex( Property::Index key ) const
+{
+ return GetImplementation(*this).GetPropertyIndex( key );
+}
+
+Property::Index Handle::GetPropertyIndex( Property::Key key ) const
+{
+ return GetImplementation(*this).GetPropertyIndex( key );
+}
+
bool Handle::IsPropertyWritable( Property::Index index ) const
{
return GetImplementation(*this).IsPropertyWritable( index );
return GetImplementation(*this).RegisterProperty( name, propertyValue );
}
+Property::Index Handle::RegisterProperty( Property::Index key, const std::string& name, const Property::Value& propertyValue )
+{
+ return GetImplementation(*this).RegisterProperty( name, key, propertyValue );
+}
+
Property::Index Handle::RegisterProperty( const std::string& name, const Property::Value& propertyValue, Property::AccessMode accessMode )
{
return GetImplementation(*this).RegisterProperty( name, propertyValue, accessMode );
GetImplementation(*this).RemovePropertyNotifications();
}
+void Handle::RemoveConstraints()
+{
+ GetImplementation(*this).RemoveConstraints();
+}
+
+void Handle::RemoveConstraints( unsigned int tag )
+{
+ GetImplementation(*this).RemoveConstraints( tag );
+}
+
+namespace WeightObject
+{
+
+const Property::Index WEIGHT = PROPERTY_CUSTOM_START_INDEX;
+
+Handle New()
+{
+ Handle handle = Handle::New();
+
+ handle.RegisterProperty( "weight", 0.0f );
+
+ return handle;
+}
+
+} // namespace WeightObject
+
} // namespace Dali