appcore_ui_base: change version of tizen_policy from 1 to 7.
[platform/core/appfw/app-core.git] / src / ui_base / appcore_ui_base.c
index 7e88080..90d85a0 100644 (file)
@@ -89,13 +89,119 @@ static struct wl_display *dsp;
 static struct wl_registry *reg;
 static struct tizen_policy *tz_policy;
 
+static void _wl_cb_conformant(void *data,
+               struct tizen_policy *tizen_policy,
+               struct wl_surface *surface_resource,
+               uint32_t is_conformant)
+{
+       ; // nothing to do.
+}
+
+static void _wl_cb_conformant_area(void *data,
+               struct tizen_policy *tizen_policy,
+               struct wl_surface *surface_resource,
+               uint32_t conformant_part,
+               uint32_t state,
+               int32_t x, int32_t y, int32_t w, int32_t h)
+{
+       ; // nothing to do.
+}
+
+static void _wl_cb_notification_done(void *data,
+               struct tizen_policy *tizen_policy,
+               struct wl_surface *surface,
+               int32_t level,
+               uint32_t state)
+{
+       ; // nothing to do.
+}
+
+static void _wl_cb_transient_for_done(void *data,
+               struct tizen_policy *tizen_policy,
+               uint32_t child_id)
+{
+       ; // nothing to do.
+}
+
+static void _wl_cb_scr_mode_done(void *data,
+               struct tizen_policy *tizen_policy,
+               struct wl_surface *surface,
+               uint32_t mode,
+               uint32_t state)
+{
+       ; // nothing to do.
+}
+
+static void _wl_cb_iconify_state_changed(void *data,
+               struct tizen_policy *tizen_policy,
+               struct wl_surface *surface_resource,
+               uint32_t iconified,
+               uint32_t force)
+{
+       ; // nothing to do.
+}
+
+static void _wl_cb_supported_aux_hints(void *data,
+               struct tizen_policy *tizen_policy,
+               struct wl_surface *surface_resource,
+               struct wl_array *hints,
+               uint32_t num_hints)
+{
+       ; // nothing to do.
+}
+
+static void _wl_cb_allowed_aux_hint(void *data,
+               struct tizen_policy *tizen_policy,
+               struct wl_surface *surface_resource,
+               int id)
+{
+       ; // nothing to do.
+}
+
+static void _wl_cb_aux_message(void *data,
+               struct tizen_policy *tizen_policy,
+               struct wl_surface *surface_resource,
+               const char *key,
+               const char *val,
+               struct wl_array *options)
+{
+       ; // nothing to do.
+}
+
+static void _wl_cb_conformant_region(void *data,
+               struct tizen_policy *tizen_policy,
+               struct wl_surface *surface,
+               uint32_t conformant_part,
+               uint32_t state,
+               int32_t x, int32_t y, int32_t w, int32_t h,
+               uint32_t serial)
+{
+       ; // nothing to do.
+}
+
+static const struct tizen_policy_listener _tizen_policy_listener = {
+       _wl_cb_conformant,
+       _wl_cb_conformant_area,
+       _wl_cb_notification_done,
+       _wl_cb_transient_for_done,
+       _wl_cb_scr_mode_done,
+       _wl_cb_iconify_state_changed,
+       _wl_cb_supported_aux_hints,
+       _wl_cb_allowed_aux_hint,
+       _wl_cb_aux_message,
+       _wl_cb_conformant_region,
+};
+
 static void __wl_listener_cb(void *data, struct wl_registry *reg,
                uint32_t id, const char *interface, uint32_t ver)
 {
        if (interface && !strcmp(interface, "tizen_policy")) {
                if (!tz_policy)
                        tz_policy = wl_registry_bind(reg, id,
-                                       &tizen_policy_interface, 1);
+                                       &tizen_policy_interface, 7);
+               if (tz_policy) {
+                       tizen_policy_add_listener(tz_policy, &_tizen_policy_listener, dsp);
+               }
        }
 }
 
@@ -195,7 +301,6 @@ static void __do_resume(void)
                        __context.ops.resume(__context.data);
                        traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
                        LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:resume:done]", __context.appid);
-                       LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:Launching:done]", __context.appid);
                }
                if ((__context.hint & APPCORE_UI_BASE_HINT_WINDOW_STACK_CONTROL) &&
                                __context.below_app) {
@@ -830,8 +935,8 @@ EXPORT_API void appcore_ui_base_fini(void)
        free(__context.appid);
        __context.appid = NULL;
 
-       appcore_ui_plugin_fini();
        appcore_base_fini();
+       appcore_ui_plugin_fini();
        ecore_wl_shutdown();
 }