e485db79a7f530e8b94f527ea188251bc1f0993e
[platform/core/system/swap-probe.git] / probe_ui / tizen_frameani.cpp
1 /*
2  *  DA probe
3  *
4  * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:
7  *
8  * Jaewon Lim <jaewon81.lim@samsung.com>
9  * Woojin Jung <woojin2.jung@samsung.com>
10  * Juyoung Kim <j0.kim@samsung.com>
11  *
12  * This library is free software; you can redistribute it and/or modify it under
13  * the terms of the GNU Lesser General Public License as published by the
14  * Free Software Foundation; either version 2.1 of the License, or (at your option)
15  * any later version.
16  *
17  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
18  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
19  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
20  * License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * along with this library; if not, write to the Free Software Foundation, Inc., 51
24  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25  *
26  * Contributors:
27  * - S-Core Co., Ltd
28  *
29  */
30
31 #include "daprobe.h"
32 #include "dahelper.h"
33 #include "tizen_frameani.h"
34
35 DAFrameAnimationEventListener DAFrameAnimationEventListener::rInstance;
36
37 DAFrameAnimationEventListener::DAFrameAnimationEventListener()
38 {
39 }
40
41 DAFrameAnimationEventListener::~DAFrameAnimationEventListener()
42 {
43 }
44
45 void DAFrameAnimationEventListener::OnFormTransitionAnimationFinished(FrameAnimator&,
46                                                                       Frame &, Form &, Form&)
47 {
48         probeBlockStart();
49         SCREENSHOT_SET();
50 //      SCREENSHOT_DONE();
51         probeBlockEnd();
52 }
53
54 void DAFrameAnimationEventListener::OnFormTransitionAnimationStarted(FrameAnimator&,
55                                                                      Frame&, Form&, Form&)
56 {
57         probeBlockStart();
58         SCREENSHOT_UNSET();
59         probeBlockEnd();
60 }
61
62 void DAFrameAnimationEventListener::OnFormTransitionAnimationStopped(FrameAnimator&,
63                                                                      Frame&, Form&, Form&)
64 {
65         probeBlockStart();
66         SCREENSHOT_SET();
67 //      SCREENSHOT_DONE();
68         probeBlockEnd();
69 }
70
71 DAFrameAnimationEventListener& DAFrameAnimationEventListener::GetInstance(void)
72 {
73         return rInstance;
74 }
75
76 IFrameAnimatorEventListener& GetFrameAnimatorEventListener()
77 {
78         DAFrameAnimationEventListener& listener = DAFrameAnimationEventListener::GetInstance();
79         return static_cast<IFrameAnimatorEventListener&>(listener);
80 }