2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiCtrl_AnimationFrameImpl.cpp
20 * @brief This is the implementation file for the _AnimationFrameImpl class.
23 #include <FUiCtrlAnimationFrame.h>
24 #include <FBaseSysLog.h>
25 #include <FGrp_BitmapImpl.h>
26 #include "FUiCtrl_AnimationFrameImpl.h"
28 using namespace Tizen::Graphics;
30 namespace Tizen { namespace Ui { namespace Controls
33 _AnimationFrameImpl::_AnimationFrameImpl(void)
39 _AnimationFrameImpl::_AnimationFrameImpl(const Bitmap& frame, long duration)
46 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
47 r = SetDuration(duration);
48 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
59 _AnimationFrameImpl::~_AnimationFrameImpl(void)
66 _AnimationFrameImpl::SetFrame(const Bitmap& frame)
68 Bitmap* pNewFrame = _BitmapImpl::CloneN(frame);
69 result r = GetLastResult();
71 SysTryReturn(NID_UI_CTRL, pNewFrame != null, r, r, "[%s] Propagating.", GetErrorMessage(r));
80 _AnimationFrameImpl::GetFrame(void) const
86 _AnimationFrameImpl::SetDuration(long duration)
88 SysTryReturnResult(NID_UI_CTRL, duration > 0, E_INVALID_ARG, "Invalid argument(s) is used. Duration must be a positive integer.");
90 __duration = duration;
96 _AnimationFrameImpl::GetDuration(void) const
101 }}} // Tizen::Ui::Controls