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.
8 #if defined(OS_TIZEN_MOBILE)
9 #include <appcore/appcore-common.h>
11 #include "xwalk/application/tools/linux/xwalk_launcher_tizen.h"
25 // Private struct from appcore-internal, necessary to get events from
29 void (*cb_app)(enum app_event evnt, void* data, bundle* b);
32 static struct ui_ops appcore_ops;
34 static const char* event2str(enum app_event event) {
41 return "AE_TERMINATE";
49 return "AE_LOWMEM_POST";
51 return "AE_MEM_FLUSH";
56 return "INVALID EVENT";
59 static void application_event_cb(enum app_event event, void* data, bundle* b) {
60 fprintf(stderr, "event '%s'\n", event2str(event));
62 if (event == AE_TERMINATE) {
67 int xwalk_appcore_init(int argc, char** argv, const char* name) {
68 appcore_ops.cb_app = application_event_cb;
69 appcore_ops.data = NULL;
71 return appcore_init(name, &appcore_ops, argc, argv);