[dali_1.4.53] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / public-api / actors / layer.cpp
index 4f7cbe4..5e31ff7 100644 (file)
@@ -1,18 +1,19 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2018 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // CLASS HEADER
 #include <dali/public-api/actors/layer.h>
@@ -26,12 +27,6 @@ namespace Dali
 
 using Dali::Layer;
 
-const char* const Layer::ACTION_RAISE = "raise";
-const char* const Layer::ACTION_LOWER = "lower";
-const char* const Layer::ACTION_RAISE_TO_TOP = "raise-to-top";
-const char* const Layer::ACTION_LOWER_TO_BOTTOM = "lower-to-bottom";
-
-
 Layer::Layer()
 {
 }
@@ -52,7 +47,18 @@ Layer::~Layer()
 {
 }
 
-unsigned int Layer::GetDepth() const
+Layer::Layer(const Layer& copy)
+: Actor(copy)
+{
+}
+
+Layer& Layer::operator=(const Layer& rhs)
+{
+  BaseHandle::operator=(rhs);
+  return *this;
+}
+
+uint32_t Layer::GetDepth() const
 {
   return GetImplementation(*this).GetDepth();
 }
@@ -97,6 +103,16 @@ void Layer::MoveBelow( Layer target )
   GetImplementation(*this).MoveBelow( GetImplementation( target ) );
 }
 
+void Layer::SetBehavior( Behavior behavior )
+{
+  GetImplementation(*this).SetBehavior( behavior );
+}
+
+Layer::Behavior Layer::GetBehavior() const
+{
+  return GetImplementation(*this).GetBehavior();
+}
+
 void Layer::SetClipping(bool enabled)
 {
   GetImplementation(*this).SetClipping(enabled);
@@ -107,7 +123,7 @@ bool Layer::IsClipping() const
   return GetImplementation(*this).IsClipping();
 }
 
-void Layer::SetClippingBox(int x, int y, int width, int height)
+void Layer::SetClippingBox(int32_t x, int32_t y, int32_t width, int32_t height)
 {
   GetImplementation(*this).SetClippingBox(x, y, width, height);
 }
@@ -132,14 +148,29 @@ bool Layer::IsDepthTestDisabled() const
   return GetImplementation(*this).IsDepthTestDisabled();
 }
 
-float Layer::ZValue(const Vector3& position, float sortModifier)
+void Layer::SetSortFunction(SortFunctionType function)
 {
-  return Internal::Layer::ZValue( position, sortModifier );
+  GetImplementation(*this).SetSortFunction(function);
 }
 
-void Layer::SetSortFunction(SortFunctionType function)
+void Layer::SetTouchConsumed( bool consume )
 {
-  GetImplementation(*this).SetSortFunction(function);
+  GetImplementation( *this ).SetTouchConsumed( consume );
+}
+
+bool Layer::IsTouchConsumed() const
+{
+  return GetImplementation( *this ).IsTouchConsumed();
+}
+
+void Layer::SetHoverConsumed( bool consume )
+{
+  GetImplementation( *this ).SetHoverConsumed( consume );
+}
+
+bool Layer::IsHoverConsumed() const
+{
+  return GetImplementation( *this ).IsHoverConsumed();
 }
 
 Layer::Layer(Internal::Layer* internal)
@@ -148,4 +179,3 @@ Layer::Layer(Internal::Layer* internal)
 }
 
 } // namespace Dali
-