1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// taken from https://wiki.tizen.org/wiki/IVI/Tizen-Core-development-EFL
#include <stdio.h>
#include <appcore-efl.h>
#include "amhelloworld.h"
static int app_create(void *data) {
// appcore measure time example
printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME"));
appcore_measure_start();
return 0;
}
static int app_terminate(void *data) { // terminate callback
printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME"));
return 0;
}
static int app_pause(void *data) { // pause callback
printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME"));
return 0;
}
static int app_resume(void *data) { // resume callback
printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME"));
return 0;
}
static int app_reset(bundle *b, void *data) { // reset callback
// appcore measure time example
printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME"));
printf("from create to %s(): %d msec\n", __func__,appcore_measure_time());
return 0;
}
int main(int argc, char *argv[]) {
struct appcore_ops ops = { // fill the appcore_ops with callback functions
.create = app_create,
.terminate = app_terminate,
.pause = app_pause,
.resume = app_resume,
.reset = app_reset,
};
// appcore measure time example
printf("from AUL to %s(): %d msec\n", __func__,appcore_measure_time_from("APP_START_TIME"));
return appcore_efl_main(PACKAGE, &argc, &argv, &ops); // start mainloop
}
|