2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 #include "_util_log.h"
22 #include "_util_efl.h"
30 static int lang_changed(void *data)
32 return _lang_changed(data);
35 static int app_create(void *data)
37 struct appdata *ad = data;
39 retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
45 /* add system event callback */
46 appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE,
49 /* appcore measure time example */
50 printf("from AUL to %s(): %d msec\n", __func__,
51 appcore_measure_time_from("APP_START_TIME"));
53 appcore_measure_start();
57 static int app_terminate(void *data)
59 struct appdata *ad = data;
62 evas_object_del(ad->win);
67 static int app_pause(void *data)
73 static int app_resume(void *data)
78 static int app_reset(bundle *b, void *data)
80 struct appdata *ad = data;
82 if (ad->flag_launching == EINA_TRUE) {
85 ad->flag_launching = EINA_TRUE;
87 if (syspopup_has_popup(b)) {
91 _D("has not popup\n");
94 /* appcore measure time example */
95 printf("from AUL to %s(): %d msec\n", __func__,
96 appcore_measure_time_from("APP_START_TIME"));
97 printf("from create to %s(): %d msec\n", __func__,
98 appcore_measure_time());
101 elm_win_activate(ad->win);
103 ad->flag_launching = EINA_FALSE;
108 int main(int argc, char *argv[])
111 struct appcore_ops ops = {
112 .create = app_create,
113 .terminate = app_terminate,
115 .resume = app_resume,
119 /* appcore measure time example */
120 printf("from AUL to %s(): %d msec\n", __func__,
121 appcore_measure_time_from("APP_START_TIME"));
123 memset(&ad, 0x0, sizeof(struct appdata));
126 return appcore_efl_main(PACKAGE, &argc, &argv, &ops);