Support "role_set" request for wayland surface 05/42605/1
authorMinJeong Kim <minjjj.kim@samsung.com>
Tue, 30 Jun 2015 12:22:06 +0000 (21:22 +0900)
committerMinJeong Kim <minjjj.kim@samsung.com>
Tue, 30 Jun 2015 12:22:06 +0000 (21:22 +0900)
Change-Id: I112249c11f37733b5239c7b360f39985e49334e9
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/e_mod_wl.c
src/e_tizen_policy_server_protocol.c
src/e_tizen_policy_server_protocol.h

index 78cbbe1..d116df9 100644 (file)
@@ -290,6 +290,24 @@ _e_tizen_policy_cb_focus_skip_unset(struct wl_client *client,
      }
 }
 
+static void
+_e_tizen_policy_cb_role_set(struct wl_client *client EINA_UNUSED,
+                            struct wl_resource *tizen_policy EINA_UNUSED,
+                            struct wl_resource *surface_resource,
+                            const char *role)
+{
+   E_Pixmap *ep;
+   E_Client *ec;
+
+   ep = wl_resource_get_user_data(surface_resource);
+   EINA_SAFETY_ON_NULL_RETURN(ep);
+
+   ec = e_pixmap_client_get(ep);
+   EINA_SAFETY_ON_NULL_RETURN(ec);
+
+   eina_stringshare_replace(&ec->icccm.window_role, role);
+}
+
 static const struct tizen_policy_interface _e_tizen_policy_interface =
 {
    _e_tizen_policy_cb_visibility_get,
@@ -298,6 +316,7 @@ static const struct tizen_policy_interface _e_tizen_policy_interface =
    _e_tizen_policy_cb_lower,
    _e_tizen_policy_cb_focus_skip_set,
    _e_tizen_policy_cb_focus_skip_unset,
+   _e_tizen_policy_cb_role_set,
 };
 
 static void
index 567bf81..33bb698 100644 (file)
@@ -17,6 +17,8 @@ static const struct wl_interface *types[] = {
        &wl_surface_interface,
        &wl_surface_interface,
        &wl_surface_interface,
+       &wl_surface_interface,
+       NULL,
 };
 
 static const struct wl_message tizen_policy_requests[] = {
@@ -26,11 +28,12 @@ static const struct wl_message tizen_policy_requests[] = {
        { "lower", "o", types + 7 },
        { "focus_skip_set", "o", types + 8 },
        { "focus_skip_unset", "o", types + 9 },
+       { "role_set", "os", types + 10 },
 };
 
 WL_EXPORT const struct wl_interface tizen_policy_interface = {
        "tizen_policy", 1,
-       6, tizen_policy_requests,
+       7, tizen_policy_requests,
        0, NULL,
 };
 
index bec7caa..06ac0b8 100644 (file)
@@ -68,6 +68,15 @@ struct tizen_policy_interface {
        void (*focus_skip_unset)(struct wl_client *client,
                                 struct wl_resource *resource,
                                 struct wl_resource *surface);
+       /**
+        * role_set - (none)
+        * @surface: surface object
+        * @role: (none)
+        */
+       void (*role_set)(struct wl_client *client,
+                        struct wl_resource *resource,
+                        struct wl_resource *surface,
+                        const char *role);
 };