[widget-viewer-dali] Add WidgetView::CancelTouchEvent()
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 28 Apr 2016 08:01:53 +0000 (17:01 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 28 Apr 2016 08:01:53 +0000 (17:01 +0900)
Change-Id: I0b949fe23ee5f3ca2de8f8c7f5177c12ae0b158c

internal/widget_view/widget_view_impl.cpp
internal/widget_view/widget_view_impl.h
public_api/widget_view/widget_view.cpp
public_api/widget_view/widget_view.h

index 7f56828..5582fc9 100644 (file)
@@ -190,6 +190,16 @@ double WidgetView::GetPeriod() const
   return mPeriod;
 }
 
+bool WidgetView::CancelTouchEvent()
+{
+  if( mObjectView )
+  {
+    return mObjectView.CancelTouchEvent();
+  }
+
+  return false;
+}
+
 void WidgetView::SetPreviewEnabled( bool enabled )
 {
   mPreviewEnabled = enabled;
index d490e07..0e40578 100644 (file)
@@ -72,6 +72,11 @@ public:
   double GetPeriod() const;
 
   /**
+   * @copydoc Dali::WidgetView::WidgetView::CancelTouchEvent
+   */
+  bool CancelTouchEvent();
+
+  /**
    * @copydoc Dali::WidgetView::WidgetView::SetPreviewEnabled
    */
   void SetPreviewEnabled( bool enabled );
index 8e992b8..d3f9c5b 100644 (file)
@@ -84,6 +84,11 @@ double WidgetView::GetPeriod() const
   return Dali::WidgetView::GetImplementation( *this ).GetPeriod();
 }
 
+bool WidgetView::CancelTouchEvent()
+{
+  return Dali::WidgetView::GetImplementation( *this ).CancelTouchEvent();
+}
+
 void WidgetView::SetPreviewEnabled( bool enabled )
 {
   Dali::WidgetView::GetImplementation( *this ).SetPreviewEnabled( enabled );
index 5a201a0..009db46 100644 (file)
@@ -158,6 +158,18 @@ public:
   double GetPeriod() const;
 
   /**
+   * @brief Cancels touch event procedure.
+   * If you call this function after feed the touch down event, the widget will get ON_HOLD events.
+   * If a widget gets ON_HOLD event, it will not do anything even if you feed touch up event.
+   *
+   * @since_tizen 3.0
+   * @privlevel public
+   * @privilege %http://tizen.org/privilege/widget.viewer
+   * @return true on success, false otherwise.
+   */
+  bool CancelTouchEvent();
+
+  /**
    * @brief Sets whether to enable or disable the preview of the widget
    *
    * @since_tizen 3.0