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;
89 /* appcore measure time example */
90 printf("from AUL to %s(): %d msec\n", __func__,
91 appcore_measure_time_from("APP_START_TIME"));
92 printf("from create to %s(): %d msec\n", __func__,
93 appcore_measure_time());
96 elm_win_activate(ad->win);
98 ad->flag_launching = EINA_FALSE;
103 int main(int argc, char *argv[])
106 struct appcore_ops ops = {
107 .create = app_create,
108 .terminate = app_terminate,
110 .resume = app_resume,
114 /* appcore measure time example */
115 printf("from AUL to %s(): %d msec\n", __func__,
116 appcore_measure_time_from("APP_START_TIME"));
118 memset(&ad, 0x0, sizeof(struct appdata));
121 return appcore_efl_main(PACKAGE, &argc, &argv, &ops);