summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rwxr-xr-xsrc/main.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
new file mode 100755
index 0000000..ee057f7
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2013 - 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "common/log.h"
+#include "home/home_manager.h"
+
+int main(int argc, char *argv[])
+{
+ _I("Starting w-home");
+
+ ui_app_lifecycle_callback_s lifecycle_callback = {0, };
+ app_event_handler_h event_handlers[5] = {NULL, };
+
+ lifecycle_callback.create = home_create_cb;
+ lifecycle_callback.app_control = home_app_control_cb;
+ lifecycle_callback.resume = home_resume_cb;
+ lifecycle_callback.pause = home_pause_cb;
+ lifecycle_callback.terminate = home_terminate_cb;
+
+ ui_app_add_event_handler(&event_handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, NULL, NULL);
+ ui_app_add_event_handler(&event_handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, NULL, NULL);
+ ui_app_add_event_handler(&event_handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, NULL, NULL);
+ ui_app_add_event_handler(&event_handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, home_language_changed_cb, NULL);
+ ui_app_add_event_handler(&event_handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, NULL, NULL);
+
+ int ret = ui_app_main(argc, argv, &lifecycle_callback, NULL);
+ if (ret) {
+ _E("app_main() is failed. err = %d", ret);
+ }
+ return ret;
+}