Revert "[3.0] Move PageTurnView to Devel API" 28/97728/1
authordongsug.song <dongsug.song@samsung.com>
Tue, 15 Nov 2016 02:36:05 +0000 (11:36 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 15 Nov 2016 02:36:11 +0000 (11:36 +0900)
This reverts commit 74c8426408f4eccdb1520dd4a73d018279be2f23.

Change-Id: Ibba7b367a39d7d2268a1ec2f7d2d4f749d109881

22 files changed:
automated-tests/src/dali-toolkit/utc-Dali-PageTurnView.cpp
build/tizen/dali-toolkit/Makefile.am
dali-toolkit/dali-toolkit.h
dali-toolkit/devel-api/controls/page-turn-view/page-factory.h [deleted file]
dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.cpp [deleted file]
dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h [deleted file]
dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.cpp [deleted file]
dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h [deleted file]
dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.cpp [deleted file]
dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h [deleted file]
dali-toolkit/devel-api/file.list
dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.h
dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.h
dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h
dali-toolkit/public-api/controls/page-turn-view/page-factory.h [new file with mode: 0644]
dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.cpp [new file with mode: 0644]
dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h [new file with mode: 0644]
dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.cpp [new file with mode: 0644]
dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h [new file with mode: 0644]
dali-toolkit/public-api/controls/page-turn-view/page-turn-view.cpp [new file with mode: 0644]
dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h [new file with mode: 0644]
dali-toolkit/public-api/file.list

index ab4551f36b57c0f4d01e2c54d795274bee3179fb..1142c4c186dc9fe104ed9becd3634bbf9aa4337e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * 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.
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali/integration-api/events/pan-gesture-event.h>
 #include <dali/public-api/images/buffer-image.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-factory.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-factory.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
+
+
 
 using namespace Dali;
 using namespace Dali::Toolkit;
index ab272facdad8bb4a817210d495b6c138576466e5..84b0f6e1cedf93c441eaa877e57dbab93fd777ba 100644 (file)
@@ -103,7 +103,6 @@ develapibubbleemitterdir =      $(develapicontrolsdir)/bubble-effect
 develapieffectsviewdir =        $(develapicontrolsdir)/effects-view
 develapigaussianblurviewdir =   $(develapicontrolsdir)/gaussian-blur-view
 develapimagnifierdir =          $(develapicontrolsdir)/magnifier
-develapipageturnviewdir =       $(develapicontrolsdir)/page-turn-view
 develapipopupdir =              $(develapicontrolsdir)/popup
 develapishadowviewdir =         $(develapicontrolsdir)/shadow-view
 develapisuperblurviewdir =      $(develapicontrolsdir)/super-blur-view
@@ -127,7 +126,6 @@ develapifocusmanager_HEADERS =      $(devel_api_focus_manager_header_files)
 develapigaussianblurview_HEADERS =  $(devel_api_gaussian_blur_view_header_files)
 develapiimageatlas_HEADERS =        $(devel_api_image_atlas_header_files)
 develapimagnifier_HEADERS =         $(devel_api_magnifier_header_files)
-develapipageturnview_HEADERS =      $(devel_api_page_turn_view_header_files)
 develapipopup_HEADERS =             $(devel_api_popup_header_files)
 develapivisualfactory_HEADERS =     $(devel_api_visual_factory_header_files)
 develapiscripting_HEADERS =         $(devel_api_scripting_header_files)
@@ -149,6 +147,7 @@ publicapiflexcontainerdir =        $(publicapicontrolsdir)/flex-container
 publicapiimageviewdir =            $(publicapicontrolsdir)/image-view
 publicapivideoviewdir =            $(publicapicontrolsdir)/video-view
 publicapimodel3dviewdir =          $(publicapicontrolsdir)/model3d-view
+publicapipageturnviewdir =         $(publicapicontrolsdir)/page-turn-view
 publicapiscrollbardir =            $(publicapicontrolsdir)/scroll-bar
 publicapiscrollabledir =           $(publicapicontrolsdir)/scrollable
 publicapiscrollviewdir =           $(publicapicontrolsdir)/scrollable/scroll-view
@@ -173,6 +172,7 @@ publicapiimageview_HEADERS =            $(public_api_image_view_header_files)
 publicapivideoview_HEADERS =            $(public_api_video_view_header_files)
 publicapiitemview_HEADERS =             $(public_api_item_view_header_files)
 publicapimodel3dview_HEADERS =          $(public_api_model3d_view_header_files)
+publicapipageturnview_HEADERS =         $(public_api_page_turn_view_header_files)
 publicapiscrollbar_HEADERS =            $(public_api_scroll_bar_header_files)
 publicapiscrollable_HEADERS =           $(public_api_scrollable_header_files)
 publicapiscrollview_HEADERS =           $(public_api_scroll_view_header_files)
index e6f1eaa1f9887902b4f3dbecdf69ad848932dcb6..b25c853dac33e6a5f8932de45e473893cdef5724 100644 (file)
 #include <dali-toolkit/public-api/controls/flex-container/flex-container.h>
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <dali-toolkit/public-api/controls/model3d-view/model3d-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-factory.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
 #include <dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h>
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h>
diff --git a/dali-toolkit/devel-api/controls/page-turn-view/page-factory.h b/dali-toolkit/devel-api/controls/page-turn-view/page-factory.h
deleted file mode 100644 (file)
index cc12134..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#ifndef __DALI_TOOLKIT_PAGE_FACTORY_H__
-#define __DALI_TOOLKIT_PAGE_FACTORY_H__
-
-/*
- * Copyright (c) 2016 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/actors/actor.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-/**
- * @brief PageFactory is an abstract interface for providing images to PageTurnView
- * Each page is identified by a unique ID, and has a linear order from 0 to GetNumberOfPages()-1
- *
- * @SINCE_1_1.4
- */
-class DALI_IMPORT_API PageFactory
-{
-public:
-
-  class Extension; ///< Forward declare future extension interface
-
-  /**
-   * @brief Virtual destructor
-   * @SINCE_1_1.4
-   */
-  virtual ~PageFactory(){};
-
-  /**
-   * @brief Query the number of pages available from the factory.
-   *
-   * The maximum available page has an ID of GetNumberOfPages()-1.
-   * @SINCE_1_1.4
-   * @return The page count.
-   */
-  virtual unsigned int GetNumberOfPages() = 0;
-
-  /**
-   * @brief Create an actor to represent the page content.
-   * @SINCE_1_1.30
-   *
-   * If no valid image provided, a broken image is displayed.
-   * For double-sided page( PageTurnLandscapeView ), the left half of image is used as page front side, and the right half as page back side.
-   *
-   * @param[in] pageId The ID of the page to create.
-   * @return An actor, or an uninitialized pointer if the ID is out of range.
-   */
-  virtual Image NewPage( unsigned int pageId ) = 0;
-
-  /**
-   * @brief Retrieve the extension for this factory
-   * @SINCE_1_1.30
-   *
-   * @return The extension if available, NULL otherwise.
-   */
-  virtual Extension* GetExtension()
-  {
-    return NULL;
-  }
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-#endif /* __DALI_TOOLKIT_PAGE_FACTORY_H__ */
diff --git a/dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.cpp b/dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.cpp
deleted file mode 100644 (file)
index 60ffd31..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2016 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-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-PageTurnLandscapeView::PageTurnLandscapeView()
-: PageTurnView()
-{
-}
-
-PageTurnLandscapeView::PageTurnLandscapeView( const PageTurnLandscapeView& pageTurnLandscapeView )
-: PageTurnView( pageTurnLandscapeView )
-{
-}
-
-PageTurnLandscapeView::PageTurnLandscapeView( Internal::PageTurnLandscapeView& implementation )
-: PageTurnView( implementation )
-{
-}
-
-PageTurnLandscapeView::PageTurnLandscapeView( Dali::Internal::CustomActor* internal )
-: PageTurnView( internal )
-{
-  VerifyCustomActorPointer<Internal::PageTurnLandscapeView>( internal );
-}
-
-PageTurnLandscapeView& PageTurnLandscapeView::operator=( const PageTurnLandscapeView& pageTurnLandscapeView )
-{
-  if( &pageTurnLandscapeView != this)
-  {
-    PageTurnView::operator=( pageTurnLandscapeView );
-  }
-  return *this;
-}
-
-PageTurnLandscapeView::~PageTurnLandscapeView()
-{
-}
-
-PageTurnLandscapeView PageTurnLandscapeView::New( PageFactory& pageFactory, const Vector2& pageSize )
-{
-  return Internal::PageTurnLandscapeView::New(pageFactory, pageSize);
-}
-
-PageTurnLandscapeView PageTurnLandscapeView::DownCast( BaseHandle handle )
-{
-  return Control::DownCast<PageTurnLandscapeView, Internal::PageTurnLandscapeView>( handle );
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h b/dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h
deleted file mode 100644 (file)
index 1b4b218..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-#ifndef __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__
-#define __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__
-
-/*
- * Copyright (c) 2016 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.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal DALI_INTERNAL
-{
-// Forward declarations
-class PageTurnLandscapeView;
-}
-
-/**
- * @brief PageTurnLandscapeView provides a page turn view in landscape mode
- * @SINCE_1_0.0
- */
-class DALI_IMPORT_API PageTurnLandscapeView : public PageTurnView
-{
-public:
-  /**
-   * @brief Create an uninitialized PageTurnLandscapeView; this can be initialized with PageTurnLandscapeView::New()
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
-   * @SINCE_1_0.0
-   */
-  PageTurnLandscapeView();
-
-  /**
-   * @brief Copy constructor.
-   * @SINCE_1_0.0
-   */
-  PageTurnLandscapeView( const PageTurnLandscapeView& pageTurnLandscapeView );
-
-  /**
-   * @brief Assignment operator.
-   * @SINCE_1_0.0
-   */
-  PageTurnLandscapeView& operator=( const PageTurnLandscapeView& pageTurnLandscapeView );
-
-  /**
-   * @brief Destructor
-   *
-   * This is non-virtual since derived Handle types must not contain data or virtual methods.
-   * @SINCE_1_0.0
-   */
-  ~PageTurnLandscapeView();
-
-  /**
-   * @brief Create an initialized PageTurnLandscapeView control
-   * @SINCE_1_0.0
-   * @param[in] pageFactory The factory which provides PageTurnView with pages.
-   * @param[in] pageSize The size of the page
-   * @return A handle to the PageTurnLandscapeView control.
-   */
-  static PageTurnLandscapeView New( PageFactory& pageFactory, const Vector2& pageSize );
-
-  /**
-   * @brief Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnLandscapeView the
-   * downcast produces valid handle. If not the returned handle is left uninitialized.
-   * @SINCE_1_0.0
-   * @param[in] handle Handle to an object
-   * @return handle to a PageTurnLandscapeView or an uninitialized handle
-   */
-  static PageTurnLandscapeView DownCast( BaseHandle handle );
-
-public: // Not intended for application developers
-
-  /**
-   * @internal
-   * @brief Creates a handle using the Toolkit::Internal implementation.
-   * @SINCE_1_0.0
-   * @param[in]  implementation  The Control implementation.
-   */
-  DALI_INTERNAL PageTurnLandscapeView( Internal::PageTurnLandscapeView& implementation );
-
-  /**
-   * @internal
-   * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
-   * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
-   */
-  explicit DALI_INTERNAL PageTurnLandscapeView( Dali::Internal::CustomActor* internal );
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif /* __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__ */
diff --git a/dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.cpp b/dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.cpp
deleted file mode 100644 (file)
index 9b4825e..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2016 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-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-PageTurnPortraitView::PageTurnPortraitView()
-: PageTurnView()
-{
-}
-
-PageTurnPortraitView::PageTurnPortraitView( const PageTurnPortraitView& pageTurnPortraitView )
-: PageTurnView( pageTurnPortraitView )
-{
-}
-
-PageTurnPortraitView::PageTurnPortraitView( Internal::PageTurnPortraitView& implementation )
-: PageTurnView( implementation )
-{
-}
-
-PageTurnPortraitView::PageTurnPortraitView( Dali::Internal::CustomActor* internal )
-: PageTurnView( internal )
-{
-  VerifyCustomActorPointer<Internal::PageTurnPortraitView>( internal );
-}
-
-PageTurnPortraitView& PageTurnPortraitView::operator=( const PageTurnPortraitView& pageTurnPortraitView )
-{
-  if( &pageTurnPortraitView != this)
-  {
-    PageTurnView::operator=( pageTurnPortraitView );
-  }
-  return *this;
-}
-
-PageTurnPortraitView::~PageTurnPortraitView()
-{
-}
-
-PageTurnPortraitView PageTurnPortraitView::New( PageFactory& pageFactory, const Vector2& pageSize)
-{
-  return Internal::PageTurnPortraitView::New(pageFactory, pageSize);
-}
-
-PageTurnPortraitView PageTurnPortraitView::DownCast( BaseHandle handle )
-{
-  return Control::DownCast<PageTurnPortraitView, Internal::PageTurnPortraitView>( handle );
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h b/dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h
deleted file mode 100644 (file)
index 37104a6..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-#ifndef __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__
-#define __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__
-
-/*
- * Copyright (c) 2016 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.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal DALI_INTERNAL
-{
-// Forward declarations
-class PageTurnPortraitView;
-}
-
-/**
- * @brief PageTurnPortraitView provides a page turn view in portrait mode
- *
- * @SINCE_1_1.4
- */
-class DALI_IMPORT_API PageTurnPortraitView : public PageTurnView
-{
-public:
-  /**
-   * @brief Create an uninitialized PageTurnPortraitView; this can be initialized with PageTurnPortraitView::New()
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
-   * @SINCE_1_1.4
-   */
-  PageTurnPortraitView();
-
-  /**
-   * @brief Copy constructor.
-   * @SINCE_1_1.4
-   */
-  PageTurnPortraitView( const PageTurnPortraitView& pageTurnPortraitView );
-
-  /**
-   * @brief Assignment operator.
-   * @SINCE_1_1.4
-   */
-  PageTurnPortraitView& operator=( const PageTurnPortraitView& pageTurnPortraitView );
-
-  /**
-   * @brief Destructor
-   *
-   * This is non-virtual since derived Handle types must not contain data or virtual methods.
-   * @SINCE_1_1.4
-   */
-  ~PageTurnPortraitView();
-
-  /**
-   * @brief Create an initialized  PageTurnPortraitView control
-   * @SINCE_1_1.4
-   * @param[in] pageFactory The factory which provides PageTurnView with pages.
-   * @param[in] pageSize The size of the page
-   * @return A handle to the PageTurnPortraitView control.
-   */
-  static PageTurnPortraitView New( PageFactory& pageFactory, const Vector2& pageSize );
-
-  /**
-   * @brief Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnPortraitView the
-   * downcast produces valid handle. If not the returned handle is left uninitialized.
-   * @SINCE_1_1.4
-   * @param[in] handle Handle to an object
-   * @return handle to a PageTurnPortraitView or an uninitialized handle
-   */
-  static PageTurnPortraitView DownCast( BaseHandle handle );
-
-public: // Not intended for application developers
-
-  /**
-   * @internal
-   * @brief Creates a handle using the Toolkit::Internal implementation.
-   * @SINCE_1_1.4
-   * @param[in]  implementation  The Control implementation.
-   */
-  DALI_INTERNAL PageTurnPortraitView( Internal::PageTurnPortraitView& implementation );
-
-  /**
-   * @internal
-   * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
-   * @SINCE_1_1.4
-   * @param[in]  internal  A pointer to the internal CustomActor.
-   */
-  explicit DALI_INTERNAL PageTurnPortraitView( Dali::Internal::CustomActor* internal );
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif /* __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__ */
diff --git a/dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.cpp b/dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.cpp
deleted file mode 100644 (file)
index 1babe2b..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2016 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-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h>
-
-using namespace Dali;
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-PageTurnView::PageTurnView()
-{
-}
-
-PageTurnView::PageTurnView( const PageTurnView& handle )
-: Control( handle )
-{
-}
-
-PageTurnView& PageTurnView::operator=( const PageTurnView& handle )
-{
-  if( &handle != this )
-  {
-    Control::operator=( handle );
-  }
-  return *this;
-}
-
-PageTurnView::~PageTurnView()
-{
-}
-
-PageTurnView PageTurnView::DownCast( BaseHandle handle )
-{
-  return Control::DownCast<PageTurnView, Internal::PageTurnView>(handle);
-}
-
-PageTurnView::PageTurnView( Internal::PageTurnView& implementation )
-: Control( implementation )
-{
-}
-
-PageTurnView::PageTurnView( Dali::Internal::CustomActor* internal )
-: Control( internal )
-{
-  VerifyCustomActorPointer<Internal::PageTurnView>(internal);
-}
-
-PageTurnView::PageTurnSignal& PageTurnView::PageTurnStartedSignal()
-{
-  return Toolkit::GetImplementation( *this ).PageTurnStartedSignal();
-}
-
-PageTurnView::PageTurnSignal& PageTurnView::PageTurnFinishedSignal()
-{
-  return Toolkit::GetImplementation( *this ).PageTurnFinishedSignal();
-}
-
-PageTurnView::PagePanSignal& PageTurnView::PagePanStartedSignal()
-{
-  return Toolkit::GetImplementation( *this ).PagePanStartedSignal();
-}
-
-PageTurnView::PagePanSignal& PageTurnView::PagePanFinishedSignal()
-{
-  return Toolkit::GetImplementation( *this ).PagePanFinishedSignal();
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h b/dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h
deleted file mode 100644 (file)
index 3a67428..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-#ifndef __DALI_TOOLKIT_PAGE_TURN_VIEW_H__
-#define __DALI_TOOLKIT_PAGE_TURN_VIEW_H__
-
-/*
- * Copyright (c) 2016 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.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-// Forward declarations
-class PageFactory;
-
-namespace Internal DALI_INTERNAL
-{
-class PageTurnView;
-}
-
-/**
- * @brief PageTurnView is a base class of different mode of pageTurnViews ( portrait or landscape )
- *
- * Page actors are provided from an external PageFactory
- * PanGesture is used to activate the page bending, streching and tuning forward/backward
- *
- * Signal usage: There are four signals. Two matching pairs for panning and page turning:
- * PagePanStarted/PagePanFinished and PageTurnStarted/PageTurnFinished. Panning relates to user interaction with
- * the screen while page turning refers to animation of the page. There are three scenarios for these
- * events: normal page turn (forwards or backwards), aborted page turn (forwards or backwards)
- * and pan with no animation. The order of events is as follows:
- * 1) Normal page turn: PagePanStarted -> PageTurnStarted direction -> PagePanFinished -> PageTurnFinished direction
- * 2) Aborted page turn: PagePanStarted -> PageTurnStarted direction -> PageTurnStarted opposite direction
- *                       -> PagePanFinished -> PageTurnFinished opposite direction
- * 3) Pan with no animation: PagePanStarted -> PagePanFinished
- * Pan with no animation will occur when the user touches the page in an area that does not start the
- * page turning.
- *
- *  Signals
- * | %Signal Name     | Method                        |
- * |------------------|-------------------------------|
- * | pageTurnStarted  | @ref PageTurnStartedSignal()  |
- * | pageTurnFinished | @ref PageTurnFinishedSignal() |
- * | pagePanStarted   | @ref PagePanStartedSignal()   |
- * | pagePanFinished  | @ref PagePanFinishedSignal()  |
- *
- * @SINCE_1_1.4
- */
-class DALI_IMPORT_API PageTurnView : public Control
-{
-public:
-
-  /**
-   * @brief The start and end property ranges for this control.
-   * @SINCE_1_1.4
-   */
-  enum PropertyRange
-  {
-    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_1.4
-    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000              ///< Reserve property indices @SINCE_1_1.4
-  };
-
-  struct Property
-  {
-    enum
-    {
-      PAGE_SIZE = PROPERTY_START_INDEX, ///< name "pageSize",        type Vector2 @SINCE_1_1.4
-      CURRENT_PAGE_ID,                  ///< name "currentPageId",   type Integer @SINCE_1_1.4
-
-      /**
-       * The two values are the major&minor radius (in pixels) to form an ellipse shape.
-       * The top-left quarter of this ellipse is used to calculate spine normal for simulating shadow.
-       */
-      SPINE_SHADOW,                     ///< name "spineShadow",     type Vector2 @SINCE_1_1.4
-    };
-  };
-
-  /**
-   * @brief Creates an empty PageTurnView handle. Only derived versions can be instantiated.
-   * Calling member function with an uninitialized handle is not allowed.
-   * @SINCE_1_1.4
-   */
-  PageTurnView();
-
-  /**
-   * @brief Copy constructor. Creates another handle that points to the same real object
-   * @SINCE_1_1.4
-   * @param[in] handle Handle to copy from
-   */
-  PageTurnView( const PageTurnView& handle );
-
-  /**
-   * @brief Assignment operator. Changes this handle to point to another real object
-   * @SINCE_1_1.4
-   */
-  PageTurnView& operator=( const PageTurnView& handle );
-
-  /**
-   * @brief Destructor
-   *
-   * This is non-virtual since derived Handle types must not contain data or virtual methods.
-   * @SINCE_1_1.4
-   */
-  ~PageTurnView();
-
-  /**
-   * @brief Downcast an Object handle to PageTurnView.
-   * If handle points to an PageTurnView the downcast produces valid handle.
-   * If not the returned handle is left uninitialized.
-   * @SINCE_1_1.4
-   * @param[in] handle Handle to an object
-   * @return handle to a PageTurnView or an uninitialized handle
-   */
-  static PageTurnView DownCast( BaseHandle handle );
-
-public: //Signal
-
-  // Page Turned signal, with page index and boolean turning direction (true = forward, false = backward)
-  typedef Signal< void ( PageTurnView, unsigned int, bool ) > PageTurnSignal;
-  typedef Signal< void ( PageTurnView ) > PagePanSignal;
-
-  /**
-   * @brief Signal emitted when a page has started to turn over.
-   * A callback of the following type may be connected:
-   * @code
-   *   void YourCallBackName( PageTurnView pageTurnView, unsigned int pageIndex, bool isTurningForward );
-   * @endcode
-   * @SINCE_1_1.4
-   * @return The signal to connect to
-   */
-  PageTurnSignal& PageTurnStartedSignal();
-
-  /**
-   * @brief Signal emitted when a page has finished turning over.
-   * A callback of the following type may be connected:
-   * @code
-   *   void YourCallBackName( PageTurnView pageTurnView, unsigned int pageIndex, bool isTurningForward );
-   * @endcode
-   * @SINCE_1_1.4
-   * @return The signal to connect to
-   */
-  PageTurnSignal& PageTurnFinishedSignal();
-
-  /**
-   * @brief Signal emitted when a page pan has commenced
-   * A callback of the following type may be connected:
-   * @code
-   *   void YourCallBackName( PageTurnView pageTurnView );
-   * @endcode
-   * @SINCE_1_1.4
-   * @return The signal to connect to
-   */
-  PagePanSignal& PagePanStartedSignal();
-
-  /**
-   * @brief Signal emitted when a page pan has finished
-   * A callback of the following type may be connected:
-   * @code
-   *   void YourCallBackName( PageTurnView pageTurnView );
-   * @endcode
-   * @SINCE_1_1.4
-   * @return The signal to connect to
-   */
-  PagePanSignal& PagePanFinishedSignal();
-
-public: // Not intended for application developers
-
-  /**
-   * @internal
-   * @brief Creates a handle using the Toolkit::Internal implementation.
-   * @SINCE_1_1.4
-   * @param[in]  implementation  The Control implementation.
-   */
-  DALI_INTERNAL PageTurnView(Internal::PageTurnView& implementation);
-
-  /**
-   * @internal
-   * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
-   * @SINCE_1_1.4
-   * @param[in]  internal  A pointer to the internal CustomActor.
-   */
-  explicit DALI_INTERNAL PageTurnView(Dali::Internal::CustomActor* internal);
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif /* __DALI_TOOLKIT_PAGE_TURN_VIEW_H__ */
index 7e4dde4d41bbfba7aea116301da1fb48039a6947..08623174ab4621326a07486246d6bcea25f1803d 100755 (executable)
@@ -8,9 +8,6 @@ devel_api_src_files = \
   $(devel_api_src_dir)/controls/bubble-effect/bubble-emitter.cpp \
   $(devel_api_src_dir)/controls/effects-view/effects-view.cpp \
   $(devel_api_src_dir)/controls/magnifier/magnifier.cpp \
-  $(devel_api_src_dir)/controls/page-turn-view/page-turn-landscape-view.cpp \
-  $(devel_api_src_dir)/controls/page-turn-view/page-turn-portrait-view.cpp \
-  $(devel_api_src_dir)/controls/page-turn-view/page-turn-view.cpp \
   $(devel_api_src_dir)/controls/popup/confirmation-popup.cpp \
   $(devel_api_src_dir)/controls/popup/popup.cpp \
   $(devel_api_src_dir)/controls/shadow-view/shadow-view.cpp \
@@ -51,12 +48,6 @@ devel_api_effects_view_header_files = \
 devel_api_magnifier_header_files = \
   $(devel_api_src_dir)/controls/magnifier/magnifier.h
 
-devel_api_page_turn_view_header_files = \
-  $(devel_api_src_dir)/controls/page-turn-view/page-factory.h \
-  $(devel_api_src_dir)/controls/page-turn-view/page-turn-landscape-view.h \
-  $(devel_api_src_dir)/controls/page-turn-view/page-turn-portrait-view.h \
-  $(devel_api_src_dir)/controls/page-turn-view/page-turn-view.h
-
 devel_api_popup_header_files = \
   $(devel_api_src_dir)/controls/popup/confirmation-popup.h \
   $(devel_api_src_dir)/controls/popup/popup.h
index c28594b54f6f70dfa907c4fbe9febcddb5607388..6114f127b8fbfa82b39cd47598a05519466fbd4f 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_INTERNAL_PAGE_TURN_LANDSCAPE_VIEW_IMPL_H__
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * 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.
@@ -19,7 +19,7 @@
  */
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h>
 #include <dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h>
 
 namespace Dali
index 1a4b00139bba92d67b0e1b7c6eb107948ac41d61..2d07779cf7b7b6bedf09072f136ad467e88d4644 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_INTERNAL_PAGE_TURN_PORTRAIT_VIEW_IMPL_H__
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * 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.
@@ -19,7 +19,7 @@
  */
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h>
 #include <dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h>
 
 namespace Dali
index 2d4071767fa024b4d5ca1c1c746568e7954f12d0..078859d9f1bf681533102496492a90e321b4bd7b 100644 (file)
@@ -25,8 +25,8 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-factory.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
+#include <dali-toolkit/public-api/controls/page-turn-view/page-factory.h>
 #include <dali-toolkit/devel-api/controls/shadow-view/shadow-view.h>
 
 namespace Dali
diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-factory.h b/dali-toolkit/public-api/controls/page-turn-view/page-factory.h
new file mode 100644 (file)
index 0000000..2b7cd65
--- /dev/null
@@ -0,0 +1,84 @@
+#ifndef __DALI_TOOLKIT_PAGE_FACTORY_H__
+#define __DALI_TOOLKIT_PAGE_FACTORY_H__
+
+/*
+ * 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.
+ * 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/actors/actor.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+/**
+ * @brief PageFactory is an abstract interface for providing images to PageTurnView
+ * Each page is identified by a unique ID, and has a linear order from 0 to GetNumberOfPages()-1
+ *
+ * @SINCE_1_1.4
+ */
+class DALI_IMPORT_API PageFactory
+{
+public:
+
+  class Extension; ///< Forward declare future extension interface
+
+  /**
+   * @brief Virtual destructor
+   * @SINCE_1_1.4
+   */
+  virtual ~PageFactory(){};
+
+  /**
+   * @brief Query the number of pages available from the factory.
+   *
+   * The maximum available page has an ID of GetNumberOfPages()-1.
+   * @SINCE_1_1.4
+   * @return The page count.
+   */
+  virtual unsigned int GetNumberOfPages() = 0;
+
+  /**
+   * @brief Create an actor to represent the page content.
+   * @SINCE_1_1.30
+   *
+   * If no valid image provided, a broken image is displayed.
+   * For double-sided page( PageTurnLandscapeView ), the left half of image is used as page front side, and the right half as page back side.
+   *
+   * @param[in] pageId The ID of the page to create.
+   * @return An actor, or an uninitialized pointer if the ID is out of range.
+   */
+  virtual Image NewPage( unsigned int pageId ) = 0;
+
+  /**
+   * @brief Retrieve the extension for this factory
+   * @SINCE_1_1.30
+   *
+   * @return The extension if available, NULL otherwise.
+   */
+  virtual Extension* GetExtension()
+  {
+    return NULL;
+  }
+};
+
+} // namespace Toolkit
+
+} // namespace Dali
+#endif /* __DALI_TOOLKIT_PAGE_FACTORY_H__ */
diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.cpp b/dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.cpp
new file mode 100644 (file)
index 0000000..aadbffb
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ * 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-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+PageTurnLandscapeView::PageTurnLandscapeView()
+: PageTurnView()
+{
+}
+
+PageTurnLandscapeView::PageTurnLandscapeView( const PageTurnLandscapeView& pageTurnLandscapeView )
+: PageTurnView( pageTurnLandscapeView )
+{
+}
+
+PageTurnLandscapeView::PageTurnLandscapeView( Internal::PageTurnLandscapeView& implementation )
+: PageTurnView( implementation )
+{
+}
+
+PageTurnLandscapeView::PageTurnLandscapeView( Dali::Internal::CustomActor* internal )
+: PageTurnView( internal )
+{
+  VerifyCustomActorPointer<Internal::PageTurnLandscapeView>( internal );
+}
+
+PageTurnLandscapeView& PageTurnLandscapeView::operator=( const PageTurnLandscapeView& pageTurnLandscapeView )
+{
+  if( &pageTurnLandscapeView != this)
+  {
+    PageTurnView::operator=( pageTurnLandscapeView );
+  }
+  return *this;
+}
+
+PageTurnLandscapeView::~PageTurnLandscapeView()
+{
+}
+
+PageTurnLandscapeView PageTurnLandscapeView::New( PageFactory& pageFactory, const Vector2& pageSize )
+{
+  return Internal::PageTurnLandscapeView::New(pageFactory, pageSize);
+}
+
+PageTurnLandscapeView PageTurnLandscapeView::DownCast( BaseHandle handle )
+{
+  return Control::DownCast<PageTurnLandscapeView, Internal::PageTurnLandscapeView>( handle );
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h b/dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h
new file mode 100644 (file)
index 0000000..bd34929
--- /dev/null
@@ -0,0 +1,111 @@
+#ifndef __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__
+#define __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__
+
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal DALI_INTERNAL
+{
+// Forward declarations
+class PageTurnLandscapeView;
+}
+
+/**
+ * @brief PageTurnLandscapeView provides a page turn view in landscape mode
+ * @SINCE_1_0.0
+ */
+class DALI_IMPORT_API PageTurnLandscapeView : public PageTurnView
+{
+public:
+  /**
+   * @brief Create an uninitialized PageTurnLandscapeView; this can be initialized with PageTurnLandscapeView::New()
+   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * @SINCE_1_0.0
+   */
+  PageTurnLandscapeView();
+
+  /**
+   * @brief Copy constructor.
+   * @SINCE_1_0.0
+   */
+  PageTurnLandscapeView( const PageTurnLandscapeView& pageTurnLandscapeView );
+
+  /**
+   * @brief Assignment operator.
+   * @SINCE_1_0.0
+   */
+  PageTurnLandscapeView& operator=( const PageTurnLandscapeView& pageTurnLandscapeView );
+
+  /**
+   * @brief Destructor
+   *
+   * This is non-virtual since derived Handle types must not contain data or virtual methods.
+   * @SINCE_1_0.0
+   */
+  ~PageTurnLandscapeView();
+
+  /**
+   * @brief Create an initialized PageTurnLandscapeView control
+   * @SINCE_1_0.0
+   * @param[in] pageFactory The factory which provides PageTurnView with pages.
+   * @param[in] pageSize The size of the page
+   * @return A handle to the PageTurnLandscapeView control.
+   */
+  static PageTurnLandscapeView New( PageFactory& pageFactory, const Vector2& pageSize );
+
+  /**
+   * @brief Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnLandscapeView the
+   * downcast produces valid handle. If not the returned handle is left uninitialized.
+   * @SINCE_1_0.0
+   * @param[in] handle Handle to an object
+   * @return handle to a PageTurnLandscapeView or an uninitialized handle
+   */
+  static PageTurnLandscapeView DownCast( BaseHandle handle );
+
+public: // Not intended for application developers
+
+  /**
+   * @internal
+   * @brief Creates a handle using the Toolkit::Internal implementation.
+   * @SINCE_1_0.0
+   * @param[in]  implementation  The Control implementation.
+   */
+  DALI_INTERNAL PageTurnLandscapeView( Internal::PageTurnLandscapeView& implementation );
+
+  /**
+   * @internal
+   * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
+   * @SINCE_1_0.0
+   * @param[in]  internal  A pointer to the internal CustomActor.
+   */
+  explicit DALI_INTERNAL PageTurnLandscapeView( Dali::Internal::CustomActor* internal );
+};
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif /* __DALI_TOOLKIT_PAGE_TURN_LANDSCAPE_VIEW_H__ */
diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.cpp b/dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.cpp
new file mode 100644 (file)
index 0000000..bb30f23
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ * 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-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+PageTurnPortraitView::PageTurnPortraitView()
+: PageTurnView()
+{
+}
+
+PageTurnPortraitView::PageTurnPortraitView( const PageTurnPortraitView& pageTurnPortraitView )
+: PageTurnView( pageTurnPortraitView )
+{
+}
+
+PageTurnPortraitView::PageTurnPortraitView( Internal::PageTurnPortraitView& implementation )
+: PageTurnView( implementation )
+{
+}
+
+PageTurnPortraitView::PageTurnPortraitView( Dali::Internal::CustomActor* internal )
+: PageTurnView( internal )
+{
+  VerifyCustomActorPointer<Internal::PageTurnPortraitView>( internal );
+}
+
+PageTurnPortraitView& PageTurnPortraitView::operator=( const PageTurnPortraitView& pageTurnPortraitView )
+{
+  if( &pageTurnPortraitView != this)
+  {
+    PageTurnView::operator=( pageTurnPortraitView );
+  }
+  return *this;
+}
+
+PageTurnPortraitView::~PageTurnPortraitView()
+{
+}
+
+PageTurnPortraitView PageTurnPortraitView::New( PageFactory& pageFactory, const Vector2& pageSize)
+{
+  return Internal::PageTurnPortraitView::New(pageFactory, pageSize);
+}
+
+PageTurnPortraitView PageTurnPortraitView::DownCast( BaseHandle handle )
+{
+  return Control::DownCast<PageTurnPortraitView, Internal::PageTurnPortraitView>( handle );
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h b/dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h
new file mode 100644 (file)
index 0000000..dfd9a86
--- /dev/null
@@ -0,0 +1,112 @@
+#ifndef __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__
+#define __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__
+
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal DALI_INTERNAL
+{
+// Forward declarations
+class PageTurnPortraitView;
+}
+
+/**
+ * @brief PageTurnPortraitView provides a page turn view in portrait mode
+ *
+ * @SINCE_1_1.4
+ */
+class DALI_IMPORT_API PageTurnPortraitView : public PageTurnView
+{
+public:
+  /**
+   * @brief Create an uninitialized PageTurnPortraitView; this can be initialized with PageTurnPortraitView::New()
+   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * @SINCE_1_1.4
+   */
+  PageTurnPortraitView();
+
+  /**
+   * @brief Copy constructor.
+   * @SINCE_1_1.4
+   */
+  PageTurnPortraitView( const PageTurnPortraitView& pageTurnPortraitView );
+
+  /**
+   * @brief Assignment operator.
+   * @SINCE_1_1.4
+   */
+  PageTurnPortraitView& operator=( const PageTurnPortraitView& pageTurnPortraitView );
+
+  /**
+   * @brief Destructor
+   *
+   * This is non-virtual since derived Handle types must not contain data or virtual methods.
+   * @SINCE_1_1.4
+   */
+  ~PageTurnPortraitView();
+
+  /**
+   * @brief Create an initialized  PageTurnPortraitView control
+   * @SINCE_1_1.4
+   * @param[in] pageFactory The factory which provides PageTurnView with pages.
+   * @param[in] pageSize The size of the page
+   * @return A handle to the PageTurnPortraitView control.
+   */
+  static PageTurnPortraitView New( PageFactory& pageFactory, const Vector2& pageSize );
+
+  /**
+   * @brief Downcast an Object handle to PageTurnPortraitView. If handle points to a PageTurnPortraitView the
+   * downcast produces valid handle. If not the returned handle is left uninitialized.
+   * @SINCE_1_1.4
+   * @param[in] handle Handle to an object
+   * @return handle to a PageTurnPortraitView or an uninitialized handle
+   */
+  static PageTurnPortraitView DownCast( BaseHandle handle );
+
+public: // Not intended for application developers
+
+  /**
+   * @internal
+   * @brief Creates a handle using the Toolkit::Internal implementation.
+   * @SINCE_1_1.4
+   * @param[in]  implementation  The Control implementation.
+   */
+  DALI_INTERNAL PageTurnPortraitView( Internal::PageTurnPortraitView& implementation );
+
+  /**
+   * @internal
+   * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
+   * @SINCE_1_1.4
+   * @param[in]  internal  A pointer to the internal CustomActor.
+   */
+  explicit DALI_INTERNAL PageTurnPortraitView( Dali::Internal::CustomActor* internal );
+};
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif /* __DALI_TOOLKIT_PAGE_TURN_PORTRAIT_VIEW_H__ */
diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.cpp b/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.cpp
new file mode 100644 (file)
index 0000000..93c5c9f
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ * 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-toolkit/public-api/controls/page-turn-view/page-turn-view.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h>
+
+using namespace Dali;
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+PageTurnView::PageTurnView()
+{
+}
+
+PageTurnView::PageTurnView( const PageTurnView& handle )
+: Control( handle )
+{
+}
+
+PageTurnView& PageTurnView::operator=( const PageTurnView& handle )
+{
+  if( &handle != this )
+  {
+    Control::operator=( handle );
+  }
+  return *this;
+}
+
+PageTurnView::~PageTurnView()
+{
+}
+
+PageTurnView PageTurnView::DownCast( BaseHandle handle )
+{
+  return Control::DownCast<PageTurnView, Internal::PageTurnView>(handle);
+}
+
+PageTurnView::PageTurnView( Internal::PageTurnView& implementation )
+: Control( implementation )
+{
+}
+
+PageTurnView::PageTurnView( Dali::Internal::CustomActor* internal )
+: Control( internal )
+{
+  VerifyCustomActorPointer<Internal::PageTurnView>(internal);
+}
+
+PageTurnView::PageTurnSignal& PageTurnView::PageTurnStartedSignal()
+{
+  return Toolkit::GetImplementation( *this ).PageTurnStartedSignal();
+}
+
+PageTurnView::PageTurnSignal& PageTurnView::PageTurnFinishedSignal()
+{
+  return Toolkit::GetImplementation( *this ).PageTurnFinishedSignal();
+}
+
+PageTurnView::PagePanSignal& PageTurnView::PagePanStartedSignal()
+{
+  return Toolkit::GetImplementation( *this ).PagePanStartedSignal();
+}
+
+PageTurnView::PagePanSignal& PageTurnView::PagePanFinishedSignal()
+{
+  return Toolkit::GetImplementation( *this ).PagePanFinishedSignal();
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h b/dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h
new file mode 100644 (file)
index 0000000..2f044bd
--- /dev/null
@@ -0,0 +1,206 @@
+#ifndef __DALI_TOOLKIT_PAGE_TURN_VIEW_H__
+#define __DALI_TOOLKIT_PAGE_TURN_VIEW_H__
+
+/*
+ * 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.
+ * 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.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/control.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+// Forward declarations
+class PageFactory;
+
+namespace Internal DALI_INTERNAL
+{
+class PageTurnView;
+}
+
+/**
+ * @brief PageTurnView is a base class of different mode of pageTurnViews ( portrait or landscape )
+ *
+ * Page actors are provided from an external PageFactory
+ * PanGesture is used to activate the page bending, streching and tuning forward/backward
+ *
+ * Signal usage: There are four signals. Two matching pairs for panning and page turning:
+ * PagePanStarted/PagePanFinished and PageTurnStarted/PageTurnFinished. Panning relates to user interaction with
+ * the screen while page turning refers to animation of the page. There are three scenarios for these
+ * events: normal page turn (forwards or backwards), aborted page turn (forwards or backwards)
+ * and pan with no animation. The order of events is as follows:
+ * 1) Normal page turn: PagePanStarted -> PageTurnStarted direction -> PagePanFinished -> PageTurnFinished direction
+ * 2) Aborted page turn: PagePanStarted -> PageTurnStarted direction -> PageTurnStarted opposite direction
+ *                       -> PagePanFinished -> PageTurnFinished opposite direction
+ * 3) Pan with no animation: PagePanStarted -> PagePanFinished
+ * Pan with no animation will occur when the user touches the page in an area that does not start the
+ * page turning.
+ *
+ *  Signals
+ * | %Signal Name     | Method                        |
+ * |------------------|-------------------------------|
+ * | pageTurnStarted  | @ref PageTurnStartedSignal()  |
+ * | pageTurnFinished | @ref PageTurnFinishedSignal() |
+ * | pagePanStarted   | @ref PagePanStartedSignal()   |
+ * | pagePanFinished  | @ref PagePanFinishedSignal()  |
+ *
+ * @SINCE_1_1.4
+ */
+class DALI_IMPORT_API PageTurnView : public Control
+{
+public:
+
+  /**
+   * @brief The start and end property ranges for this control.
+   * @SINCE_1_1.4
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_1.4
+    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000              ///< Reserve property indices @SINCE_1_1.4
+  };
+
+  struct Property
+  {
+    enum
+    {
+      PAGE_SIZE = PROPERTY_START_INDEX, ///< name "pageSize",        type Vector2 @SINCE_1_1.4
+      CURRENT_PAGE_ID,                  ///< name "currentPageId",   type Integer @SINCE_1_1.4
+
+      /**
+       * The two values are the major&minor radius (in pixels) to form an ellipse shape.
+       * The top-left quarter of this ellipse is used to calculate spine normal for simulating shadow.
+       */
+      SPINE_SHADOW,                     ///< name "spineShadow",     type Vector2 @SINCE_1_1.4
+    };
+  };
+
+  /**
+   * @brief Creates an empty PageTurnView handle. Only derived versions can be instantiated.
+   * Calling member function with an uninitialized handle is not allowed.
+   * @SINCE_1_1.4
+   */
+  PageTurnView();
+
+  /**
+   * @brief Copy constructor. Creates another handle that points to the same real object
+   * @SINCE_1_1.4
+   * @param[in] handle Handle to copy from
+   */
+  PageTurnView( const PageTurnView& handle );
+
+  /**
+   * @brief Assignment operator. Changes this handle to point to another real object
+   * @SINCE_1_1.4
+   */
+  PageTurnView& operator=( const PageTurnView& handle );
+
+  /**
+   * @brief Destructor
+   *
+   * This is non-virtual since derived Handle types must not contain data or virtual methods.
+   * @SINCE_1_1.4
+   */
+  ~PageTurnView();
+
+  /**
+   * @brief Downcast an Object handle to PageTurnView.
+   * If handle points to an PageTurnView the downcast produces valid handle.
+   * If not the returned handle is left uninitialized.
+   * @SINCE_1_1.4
+   * @param[in] handle Handle to an object
+   * @return handle to a PageTurnView or an uninitialized handle
+   */
+  static PageTurnView DownCast( BaseHandle handle );
+
+public: //Signal
+
+  // Page Turned signal, with page index and boolean turning direction (true = forward, false = backward)
+  typedef Signal< void ( PageTurnView, unsigned int, bool ) > PageTurnSignal;
+  typedef Signal< void ( PageTurnView ) > PagePanSignal;
+
+  /**
+   * @brief Signal emitted when a page has started to turn over.
+   * A callback of the following type may be connected:
+   * @code
+   *   void YourCallBackName( PageTurnView pageTurnView, unsigned int pageIndex, bool isTurningForward );
+   * @endcode
+   * @SINCE_1_1.4
+   * @return The signal to connect to
+   */
+  PageTurnSignal& PageTurnStartedSignal();
+
+  /**
+   * @brief Signal emitted when a page has finished turning over.
+   * A callback of the following type may be connected:
+   * @code
+   *   void YourCallBackName( PageTurnView pageTurnView, unsigned int pageIndex, bool isTurningForward );
+   * @endcode
+   * @SINCE_1_1.4
+   * @return The signal to connect to
+   */
+  PageTurnSignal& PageTurnFinishedSignal();
+
+  /**
+   * @brief Signal emitted when a page pan has commenced
+   * A callback of the following type may be connected:
+   * @code
+   *   void YourCallBackName( PageTurnView pageTurnView );
+   * @endcode
+   * @SINCE_1_1.4
+   * @return The signal to connect to
+   */
+  PagePanSignal& PagePanStartedSignal();
+
+  /**
+   * @brief Signal emitted when a page pan has finished
+   * A callback of the following type may be connected:
+   * @code
+   *   void YourCallBackName( PageTurnView pageTurnView );
+   * @endcode
+   * @SINCE_1_1.4
+   * @return The signal to connect to
+   */
+  PagePanSignal& PagePanFinishedSignal();
+
+public: // Not intended for application developers
+
+  /**
+   * @internal
+   * @brief Creates a handle using the Toolkit::Internal implementation.
+   * @SINCE_1_1.4
+   * @param[in]  implementation  The Control implementation.
+   */
+  DALI_INTERNAL PageTurnView(Internal::PageTurnView& implementation);
+
+  /**
+   * @internal
+   * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
+   * @SINCE_1_1.4
+   * @param[in]  internal  A pointer to the internal CustomActor.
+   */
+  explicit DALI_INTERNAL PageTurnView(Dali::Internal::CustomActor* internal);
+};
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif /* __DALI_TOOLKIT_PAGE_TURN_VIEW_H__ */
index de5e00632683d03678fca5222988aa37c449a05f..7e7268f03341849928b4d32b067430992a5ef971 100755 (executable)
@@ -11,6 +11,9 @@ public_api_src_files = \
   $(public_api_src_dir)/controls/flex-container/flex-container.cpp \
   $(public_api_src_dir)/controls/image-view/image-view.cpp \
   $(public_api_src_dir)/controls/model3d-view/model3d-view.cpp \
+  $(public_api_src_dir)/controls/page-turn-view/page-turn-landscape-view.cpp \
+  $(public_api_src_dir)/controls/page-turn-view/page-turn-portrait-view.cpp \
+  $(public_api_src_dir)/controls/page-turn-view/page-turn-view.cpp \
   $(public_api_src_dir)/controls/scroll-bar/scroll-bar.cpp \
   $(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.cpp \
   $(public_api_src_dir)/controls/scrollable/item-view/item-layout.cpp \
@@ -61,6 +64,12 @@ public_api_flex_container_header_files = \
 public_api_image_view_header_files = \
   $(public_api_src_dir)/controls/image-view/image-view.h
 
+public_api_page_turn_view_header_files = \
+  $(public_api_src_dir)/controls/page-turn-view/page-factory.h \
+  $(public_api_src_dir)/controls/page-turn-view/page-turn-landscape-view.h \
+  $(public_api_src_dir)/controls/page-turn-view/page-turn-portrait-view.h \
+  $(public_api_src_dir)/controls/page-turn-view/page-turn-view.h
+
 public_api_item_view_header_files = \
   $(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.h \
   $(public_api_src_dir)/controls/scrollable/item-view/item-factory.h \