tizen 2.3 release
[framework/system/swap-probe.git] / probe_ui / da_ui.h
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 #ifndef __DA_SNAPSHOT_H__
32 #define __DA_SNAPSHOT_H__
33
34 #include "daprobe.h"
35 #include "dahelper.h"
36
37 /********************************************************************
38  * SNAPSHOT PROBE MACRO
39  *
40  * log format
41  *              SeqNumber`,ApiName`,Time`,Pid`,Tid`,InputParm`,Return`,PCAddr`,Error`,Size`,FUNCTYPE`,\n
42  *              callstack_start`,callstack`,callstack_end
43  *
44  * FUNCTYPE
45  *              SNAPSHOT_API_TYPE_PAGER,
46  *              SNAPSHOT_API_TYPE_CONTROLBAR,
47  *              SNAPSHOT_API_TYPE_NAVIFRAME,
48  *              SNAPSHOT_API_TYPE_OTHER
49  *
50  **********************************************************************/
51
52 #define BEFORE_ORIGINAL_SNAPSHOT(FUNCNAME, LIBNAME)             \
53         Evas_Object* ret;                                                                       \
54         GET_REAL_FUNC(FUNCNAME, LIBNAME)
55
56 #define AFTER_ORIGINAL_SNAPSHOT(EVASOBJECT)                                                     \
57         do {                                                                                                                    \
58                 probeBlockStart();                                                                                      \
59                 evas_event_callback_add(evas_object_evas_get(EVASOBJECT),       \
60                         EVAS_CALLBACK_RENDER_FLUSH_POST,                                                \
61                         _cb_render_post, NULL);                                                                 \
62                 probeBlockEnd();                                                                                        \
63         } while(0)
64
65 #endif // __DA_SNAPSHOT_H__