(ItemFactory) Add GetExtension 47/39947/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 26 May 2015 18:15:28 +0000 (19:15 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 26 May 2015 18:18:00 +0000 (19:18 +0100)
Change-Id: I6c6be97dde2ee285e2947000b4be2cd5d80c53d8

automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h

index 9efd53f..3dcc6e8 100644 (file)
@@ -763,3 +763,11 @@ int UtcDaliItemViewSetItemsParentOriginP(void)
   DALI_TEST_CHECK(view.GetItem(0).GetCurrentParentOrigin() == parentOrigin);
   END_TEST;
 }
+
+int UtcDaliItemFactoryGetExtention(void)
+{
+  ToolkitTestApplication application;
+  TestItemFactory factory;
+  DALI_TEST_CHECK( factory.GetExtension() == NULL );
+  END_TEST;
+}
index e02c62b..97d12f6 100644 (file)
@@ -35,6 +35,8 @@ class ItemFactory
 {
 public:
 
+  class Extension; ///< Forward declare future extension interface
+
   /**
    * @brief Virtual destructor.
    */
@@ -63,6 +65,16 @@ public:
    * @param[in] actor The actor that represents the released item.
    */
   virtual void ItemReleased(unsigned int itemId, Actor actor) {};
+
+  /**
+   * Retrieve the extension for this control
+   *
+   * @return The extension if available, NULL otherwise
+   */
+  virtual Extension* GetExtension()
+  {
+    return NULL;
+  }
 };
 
 } // namespace Toolkit