bool
_Gallery::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
{
- bool r = false;
+ bool returnValue = false;
bool keyPressed = false;
if (keyInfo.GetKeyCode() == _KEY_ENTER
{
if (__keyEventProcessing == true)
{
+ Invalidate();
return true;
}
keyPressed = true;
_GalleryViewEventInfo viewEventInfo;
_GalleryViewEvent pressedEvent(GALLERY_VIEW_EVENT_TOUCH_PRESSED, &viewEventInfo);
- r = GetPresenter().PostEvent(pressedEvent);
- SysTryReturn(NID_UI_CTRL, r == true, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ returnValue = GetPresenter().PostEvent(pressedEvent);
+ SysTryReturn(NID_UI_CTRL, returnValue == true, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
__keyEventProcessing = true;
}
viewEventInfo.SetFlicked(true);
viewEventInfo.SetFlickTime(1);
_GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_FLICK, &viewEventInfo);
- r = GetPresenter().PostEvent(viewEvent);
- SysTryReturn(NID_UI_CTRL, r == true, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ returnValue = GetPresenter().PostEvent(viewEvent);
+ if (returnValue == false)
+ {
+ __keyEventProcessing = false;
+ }
break;
}
viewEventInfo.SetFlicked(true);
viewEventInfo.SetFlickTime(1);
_GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_FLICK, &viewEventInfo);
- r = GetPresenter().PostEvent(viewEvent);
- SysTryReturn(NID_UI_CTRL, r == true, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ returnValue = GetPresenter().PostEvent(viewEvent);
+ if (returnValue == false)
+ {
+ __keyEventProcessing = false;
+ }
break;
}
viewEventInfo.SetFlicked(true);
viewEventInfo.SetFlickTime(1);
_GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_FLICK, &viewEventInfo);
- r = GetPresenter().PostEvent(viewEvent);
- SysTryReturn(NID_UI_CTRL, r == true, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ returnValue = GetPresenter().PostEvent(viewEvent);
+ if (returnValue == false)
+ {
+ __keyEventProcessing = false;
+ }
break;
}
viewEventInfo.SetFlicked(true);
viewEventInfo.SetFlickTime(1);
_GalleryViewEvent viewEvent(GALLERY_VIEW_EVENT_TOUCH_FLICK, &viewEventInfo);
- r = GetPresenter().PostEvent(viewEvent);
- SysTryReturn(NID_UI_CTRL, r == true, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ returnValue = GetPresenter().PostEvent(viewEvent);
+ if (returnValue == false)
+ {
+ __keyEventProcessing = false;
+ }
break;
}
{
_GalleryViewEventInfo viewEventInfo;
_GalleryViewEvent releaseEvent(GALLERY_VIEW_EVENT_TOUCH_RELEASED, &viewEventInfo);
- r = GetPresenter().PostEvent(releaseEvent);
- SysTryReturn(NID_UI_CTRL, r == true, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+ bool releaseReturnValue = GetPresenter().PostEvent(releaseEvent);
+ SysTryReturn(NID_UI_CTRL, releaseReturnValue == true, false, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
}
- return r;
+ return returnValue;
}
bool
{
SysTryReturnResult(NID_UI_CTRL, bounds.width >= 0.0 && bounds.height >= 0.0, E_INVALID_ARG,
"The bounds width or height is negative value.");
+
__bounds = bounds;
if (GetFrameVisualElement().IsClipChildrenEnabled() == true)
{
result
_GalleryCanvas::SetVisibility(bool visibility)
{
+ if (IsVisibility() == visibility)
+ {
+ return E_SUCCESS;
+ }
+
GetImageVisualElement().SetImplicitAnimationEnabled(false);
GetImageVisualElement().SetShowState(visibility);
GetFrameVisualElement().SetImplicitAnimationEnabled(false);
result
_GalleryCanvas::SetVisualElementBounds(const FloatRectangle& bounds)
{
+ if (GetImageVisualElementBounds() == bounds)
+ {
+ return E_SUCCESS;
+ }
+
__visualElementBoundsChanged = true;
return GetImageVisualElement().SetBounds(bounds);
}
result
_GalleryCanvas::SetAnimationDelegator(_GalleryAnimationProvider* pVEDelegator)
{
+ if (GetImageVisualElement().GetAnimationProvider() == pVEDelegator
+ && GetFrameVisualElement().GetAnimationProvider() == pVEDelegator)
+ {
+ return E_SUCCESS;
+ }
+
result r = GetImageVisualElement().SetAnimationProvider(pVEDelegator);
SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
result
_GalleryRootCanvas::SetBounds(const FloatRectangle& bounds)
{
+ if (GetBounds() == bounds)
+ {
+ return E_SUCCESS;
+ }
+
return GetControl().SetBounds(bounds);
}
result
_GalleryRootCanvas::SetVisibility(bool visibility)
{
+ if (IsVisibility() == visibility)
+ {
+ return E_SUCCESS;
+ }
+
GetControl().SetVisibleState(visibility);
return E_SUCCESS;
result
_GalleryRenderer::SetCanvasMaxCount(int maxCount)
{
+ if (GetCanvasMaxCount() == maxCount)
+ {
+ return E_SUCCESS;
+ }
+
result r = E_SUCCESS;
_GalleryCanvasManager& canvasManager = GetCanvasManager();
FloatRectangle viewRect = GetViewRect();
_GalleryRenderer::SetCanvasVisibility(int canvasIndex, bool visibility)
{
_GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex);
+ if (pCanvas->IsVisibility() == visibility)
+ {
+ return E_SUCCESS;
+ }
+
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
_GalleryRenderer::SetCanvasShowState(int canvasIndex, bool showState)
{
_GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex);
+ if (pCanvas->IsVisibility() == showState)
+ {
+ return E_SUCCESS;
+ }
+
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
const _GalleryAnimationTiming* pAnimation)
{
_GalleryCanvas* pCanvas = GetCanvasManager().GetCanvas(canvasIndex);
+
result r = GetLastResult();
SysTryReturn(NID_UI_CTRL, pCanvas != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
_GalleryRenderer::SetEffect(Effect* pEffect)
{
SysTryReturnVoidResult(NID_UI_CTRL, pEffect != null, E_INVALID_ARG, "[E_INVALID_ARG] The effect object is null.");
+ SetLastResult(E_SUCCESS);
+
+ if (pEffect == __pEffect)
+ {
+ return;
+ }
pEffect->SetEffectEventListener(this);
result r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__pEffect = pEffect;
-
- SetLastResult(E_SUCCESS);
}
Tizen::Ui::Effects::Effect*