1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 #if defined(OS_TIZEN_MOBILE)
8 #include <appcore/appcore-common.h>
10 #include "xwalk/application/tools/linux/xwalk_launcher_tizen.h"
24 // Private struct from appcore-internal, necessary to get events from
28 void (*cb_app)(enum app_event evnt, void* data, bundle* b);
31 static struct ui_ops appcore_ops;
33 static const char* event2str(enum app_event event) {
40 return "AE_TERMINATE";
48 return "AE_LOWMEM_POST";
50 return "AE_MEM_FLUSH";
55 return "INVALID EVENT";
58 static void application_event_cb(enum app_event event, void* data, bundle* b) {
59 fprintf(stderr, "event %s\n", event2str(event));
62 int xwalk_appcore_init(int argc, char** argv, const char* name) {
63 appcore_ops.cb_app = application_event_cb;
64 appcore_ops.data = NULL;
66 return appcore_init(name, &appcore_ops, argc, argv);