Add ResourceReady for Control
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / control.cpp
index ec37028..f411d4d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -31,7 +31,12 @@ namespace Toolkit
 {
 Control Control::New()
 {
-  return Internal::Control::New();
+  return Toolkit::Internal::Control::New();
+}
+
+Control Control::New(ControlBehaviour additionalBehaviour)
+{
+  return Toolkit::Internal::Control::New(static_cast<Toolkit::Internal::Control::ControlBehaviour>(additionalBehaviour));
 }
 
 Control::Control()
@@ -112,10 +117,7 @@ void Control::ClearBackground()
 
 bool Control::IsResourceReady() const
 {
-  const Internal::Control&       internalControl = Toolkit::Internal::GetImplementation(*this);
-  const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get(internalControl);
-
-  return controlDataImpl.IsResourceReady();
+  return Internal::GetImplementation(*this).IsResourceReady();
 }
 
 Toolkit::Visual::ResourceStatus Control::GetVisualResourceStatus(Dali::Property::Index index)