Merge "Empty Implementation for INPUT_METHOD_SETTINGS property" into tizen
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / transition-effects / cube-transition-effect-impl.h
index 3a69422..5642749 100644 (file)
@@ -1,27 +1,34 @@
 #ifndef __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_EFFECT_H__
 #define __DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_EFFECT_H__
 
-//
-// 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) 2014 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.
+ *
+ */
 
 // EXTERNAL INCLUDES
+#include <dali/public-api/animation/animation.h>
+
+#include <dali/public-api/images/frame-buffer-image.h>
+#include <dali/public-api/object/base-object.h>
+#include <dali/public-api/render-tasks/render-task.h>
+#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/public-api/images/resource-image.h>
 
 // INTERNAL INCLUDES
-#include <dali/dali.h>
-#include <dali-toolkit/public-api/transition-effects/cube-transition-effect.h>
+#include <dali-toolkit/devel-api/transition-effects/cube-transition-effect.h>
 
 namespace Dali
 {
@@ -50,9 +57,11 @@ public:
   FullAreaImageCreator(){}
 
   /**
-   * virtual destructor
+   * @brief Destructor
+   *
+   * This is non-virtual since derived Handle types must not contain data or virtual methods.
    */
-  virtual ~FullAreaImageCreator(){}
+  ~FullAreaImageCreator(){}
 
   /**
    * Create an initialized FullAreaImageCreator.
@@ -61,7 +70,7 @@ public:
   static FullAreaImageCreator New()
   {
     std::string vertexShader(
-      "uniform vec4 uRegion; \n"
+      "uniform mediump vec4 uRegion; \n"
        "void main() \n"
       "{\n"
       "  gl_Position = uProjection * uModelView * vec4(aPosition, 1.0);\n"
@@ -71,7 +80,7 @@ public:
     );
 
     std::string fragmentShader(
-      "uniform vec4 uRegion; \n"
+      "uniform mediump vec4 uRegion; \n"
       "void main() \n"
       "{\n"
       "  if( vTexCoord.s > 0.0 && vTexCoord.s < 1.0 && vTexCoord.t > 0.0 && vTexCoord.t < 1.0) \n"
@@ -199,7 +208,18 @@ public: //Signal
   /**
    * @copydoc Toolkit::CubeTransitionEffect::TransitionCompletedSignal()
    */
-  Toolkit::CubeTransitionEffect::TransitionCompletedSignalV2& TransitionCompletedSignal();
+  Toolkit::CubeTransitionEffect::TransitionCompletedSignalType& TransitionCompletedSignal();
+
+  /**
+   * Connects a callback function with the object's signals.
+   * @param[in] object The object providing the signal.
+   * @param[in] tracker Used to disconnect the signal.
+   * @param[in] signalName The signal to connect to.
+   * @param[in] functor A newly allocated FunctorDelegate.
+   * @return True if the signal was connected.
+   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
+   */
+  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
 
 protected:
 
@@ -241,7 +261,13 @@ private:
    * Set image and pixelArea to tiles
    * @param[in] image The image content of the imageActor for transition
    */
-  void OnImageLoaded(Image image);
+  void OnImageLoaded(ResourceImage image);
+
+  /**
+   * Set sub-image to each tile.
+   * @param[in] image The image content of the imageActor for transition
+   */
+  void PrepareTiles( Image image );
 
   /**
    * Callback function of transition animation finished
@@ -277,7 +303,7 @@ protected:
   unsigned int               mNumRows;
   unsigned int               mNumColumns;
   Size                       mViewAreaSize;
-  ActorContainer             mBoxes;
+  std::vector< Actor >       mBoxes;
   std::vector< ImageActor >  mTiles[2];
   int                        mRotateIndex;
   Size                       mTileSize;
@@ -310,7 +336,7 @@ protected:
 
 private:
 
-  Toolkit::CubeTransitionEffect::TransitionCompletedSignalV2 mTransitionCompletedSignalV2;
+  Toolkit::CubeTransitionEffect::TransitionCompletedSignalType mTransitionCompletedSignal;
 
 };