e_comp_wl: add aux_hint to E_Comp_Wl_Client_Data 98/48498/4 accepted/tizen/mobile/20151006.224756 accepted/tizen/tv/20151006.224810 accepted/tizen/wearable/20151006.224829 submit/tizen/20151006.071535
authorDuna Oh <duna.oh@samsung.com>
Tue, 22 Sep 2015 07:43:56 +0000 (16:43 +0900)
committerDuna Oh <duna.oh@samsung.com>
Tue, 6 Oct 2015 05:47:04 +0000 (14:47 +0900)
Change-Id: Ib4f3aca1d4df081877bd20161415c5f84acc2aa3
Signed-off-by: Duna Oh <duna.oh@samsung.com>
src/bin/e_comp_wl.c
src/bin/e_comp_wl.h
src/bin/e_hints.c
src/bin/e_hints.h

index d06e544..c081fe7 100755 (executable)
@@ -3005,6 +3005,7 @@ _e_comp_wl_client_cb_new(void *data EINA_UNUSED, E_Client *ec)
    EINA_SAFETY_ON_NULL_RETURN(p_cdata);
    ec->comp_data->accepts_focus = p_cdata->accepts_focus;
    ec->comp_data->conformant = p_cdata->conformant;
+   ec->comp_data->aux_hint.hints = p_cdata->aux_hint.hints;
 
    /* add this client to the hash */
    /* eina_hash_add(clients_win_hash, &win, ec); */
@@ -3078,6 +3079,17 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec)
    if (ec->comp_data->surface)
      wl_resource_set_user_data(ec->comp_data->surface, NULL);
 
+   if (ec->comp_data->aux_hint.hints)
+     {
+        E_Comp_Wl_Aux_Hint *hint;
+        EINA_LIST_FREE(ec->comp_data->aux_hint.hints, hint)
+          {
+             eina_stringshare_del(hint->hint);
+             eina_stringshare_del(hint->val);
+             E_FREE(hint);
+          }
+     }
+
    e_pixmap_cdata_set(ec->pixmap, NULL);
 
    E_FREE(ec->comp_data);
index e57d09f..2085d92 100755 (executable)
@@ -38,6 +38,7 @@
 
 #include <Evas_GL.h>
 
+typedef struct _E_Comp_Wl_Aux_Hint  E_Comp_Wl_Aux_Hint;
 typedef struct _E_Comp_Wl_Buffer E_Comp_Wl_Buffer;
 typedef struct _E_Comp_Wl_Buffer_Ref E_Comp_Wl_Buffer_Ref;
 typedef struct _E_Comp_Wl_Buffer_Viewport E_Comp_Wl_Buffer_Viewport;
@@ -55,6 +56,13 @@ typedef enum _E_Comp_Wl_Buffer_Type
    E_COMP_WL_BUFFER_TYPE_TBM = 3
 } E_Comp_Wl_Buffer_Type;
 
+struct _E_Comp_Wl_Aux_Hint
+{
+   unsigned int id;
+   const char *hint;
+   const char *val;
+};
+
 struct _E_Comp_Wl_Buffer
 {
    E_Comp_Wl_Buffer_Type type;
@@ -327,6 +335,11 @@ struct _E_Comp_Wl_Client_Data
         int prev_degree, cur_degree;
      } transform;
 
+   struct
+     {
+        Eina_List *hints;
+     } aux_hint;
+
    /* before applying viewport */
    int width_from_buffer;
    int height_from_buffer;
index 5fd73cb..00bad88 100644 (file)
@@ -17,6 +17,8 @@ EAPI Ecore_X_Atom ATM_NETWM_SHOW_WINDOW_MENU = 0;
 EAPI Ecore_X_Atom ATM_NETWM_PERFORM_BUTTON_ACTION = 0;
 #endif
 
+static Eina_List *aux_hints_supported = NULL;
+
 EINTERN void
 e_hints_init(Ecore_Window root, Ecore_Window propwin)
 {
@@ -1730,3 +1732,43 @@ e_hints_scale_update(void)
 #endif
 }
 
+EAPI const Eina_List *
+e_hints_aux_hint_supported_add(const char *hint)
+{
+   Eina_List *l;
+   const char *supported;
+
+   EINA_LIST_FOREACH(aux_hints_supported, l, supported)
+     {
+        if (!strcmp(supported, hint))
+          return aux_hints_supported;
+     }
+
+   aux_hints_supported = eina_list_append(aux_hints_supported, hint);
+
+   return aux_hints_supported;
+}
+
+EAPI const Eina_List *
+e_hints_aux_hint_supported_del(const char *hint)
+{
+   Eina_List *l;
+   const char *supported;
+
+   EINA_LIST_FOREACH(aux_hints_supported, l, supported)
+     {
+        if (!strcmp(supported, hint))
+          {
+             aux_hints_supported = eina_list_remove(aux_hints_supported, hint);
+             break;
+          }
+     }
+
+   return aux_hints_supported;
+}
+
+EAPI const Eina_List *
+e_hints_aux_hint_supported_get(void)
+{
+   return aux_hints_supported;
+}
index 8e3c9c7..d10d96f 100644 (file)
@@ -45,9 +45,10 @@ EAPI void e_hints_window_qtopia_soft_menus_get(E_Client *ec);
 EAPI void e_hints_window_virtual_keyboard_state_get(E_Client *ec);
 EAPI void e_hints_window_virtual_keyboard_get(E_Client *ec);
 
-
 EAPI void e_hints_scale_update(void);
-
+EAPI const Eina_List * e_hints_aux_hint_supported_add(const char *hint);
+EAPI const Eina_List * e_hints_aux_hint_supported_del(const char *hint);
+EAPI const Eina_List * e_hints_aux_hint_supported_get(void);
 
 #ifdef E_COMP_X_H
 EAPI void e_hints_window_state_update(E_Client *ec, int state, int action);