summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/ecore_evas/Ecore_Evas.h69
-rw-r--r--src/lib/ecore_evas/ecore_evas.c204
-rw-r--r--src/lib/ecore_evas/ecore_evas_buffer.c4
-rw-r--r--src/lib/ecore_evas/ecore_evas_ews.c4
-rw-r--r--src/lib/ecore_evas/ecore_evas_private.h20
-rw-r--r--src/lib/ecore_x/Ecore_X_Atoms.h6
-rw-r--r--src/lib/ecore_x/ecore_x_atoms_decl.h13
-rw-r--r--src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c4
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c4
-rw-r--r--src/modules/ecore_evas/engines/extn/ecore_evas_extn.c8
-rw-r--r--src/modules/ecore_evas/engines/fb/ecore_evas_fb.c4
-rw-r--r--src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c4
-rw-r--r--src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c4
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c4
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c4
-rw-r--r--src/modules/ecore_evas/engines/win32/ecore_evas_win32.c4
-rw-r--r--src/modules/ecore_evas/engines/x/ecore_evas_x.c96
17 files changed, 442 insertions, 14 deletions
diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index 2ef08e50f3..bdc187a6ff 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -765,6 +765,75 @@ EAPI Eina_Bool ecore_evas_wm_rotation_manual_rotation_done_get(const Ecore_Eva
765 */ 765 */
766EAPI void ecore_evas_wm_rotation_manual_rotation_done(Ecore_Evas *ee); 766EAPI void ecore_evas_wm_rotation_manual_rotation_done(Ecore_Evas *ee);
767/** 767/**
768 * @brief Get the list of supported auxiliary hint strings.
769 *
770 * @param ee The Ecore_Evas
771 * @return List of supported auxiliary hint strings.
772 * @note Do not change the returned list of its contents. Auxiliary hint
773 * strings are internal and should be considered constants, do not free or
774 * modify them.
775 * @warning Support for this depends on the underlying windowing system.
776 *
777 * The window auxiliary hint is the value which is used to decide which actions should
778 * be made available to the user by the window manager. If you want to set specific hint
779 * to your window, then you should check whether it exists in the supported auxiliary
780 * hints that are registered in the root window by the window manager. Once you've added
781 * an auxiliary hint, you can get a new ID which is used to change value and delete hint.
782 * The window manager sends the response message to the application on receiving auxiliary
783 * hint change event. A list of auxiliary hint within the Ecore_Evas has this format:
784 * ID:HINT:VALUE,ID:HINT:VALUE,...
785 *
786 * @since 1.9.0
787 */
788EAPI const Eina_List *ecore_evas_aux_hints_supported_get(const Ecore_Evas *ee);
789/**
790 * @brief Get the list of allowed auxiliary hint ID.
791 *
792 * @param ee The Ecore_Evas
793 * @return List of allowed auxiliary hint ID.
794 * @note This function is low level. Instead of using it directly, consider
795 * using the callback mechanism in Elementary such as "aux,hint,allowed".
796 * @warning Support for this depends on the underlying windowing system.
797 *
798 * @since 1.9.0
799 */
800EAPI Eina_List *ecore_evas_aux_hints_allowed_get(const Ecore_Evas *ee);
801/**
802 * @brief Create an auxiliary hint of the Ecore_Evas.
803 *
804 * @param ee The Ecore_Evas
805 * @param hint The auxiliary hint string.
806 * @param val The value string.
807 * @return The ID of created auxiliary hint, or -1 on failure.
808 * @warning Support for this depends on the underlying windowing system.
809 *
810 * @since 1.9.0
811 */
812EAPI int ecore_evas_aux_hint_add(Ecore_Evas *ee, const char *hint, const char *val);
813/**
814 * @brief Delete an auxiliary hint of the Ecore_Evas.
815 *
816 * @param ee The Ecore_Evas
817 * @param id The ID of the auxiliary hint.
818 * @return EINA_TRUE if no error occurred, EINA_FALSE otherwise.
819 * @warning Support for this depends on the underlying windowing system.
820 *
821 * @since 1.9.0
822 */
823EAPI Eina_Bool ecore_evas_aux_hint_del(Ecore_Evas *ee, const int id);
824/**
825 * @brief Change a value of the auxiliary hint.
826 *
827 * @param ee The Ecore_Evas
828 * @param id The auxiliary hint ID.
829 * @param val The value string to be set.
830 * @return EINA_TRUE if no error occurred, EINA_FALSE otherwise.
831 * @warning Support for this depends on the underlying windowing system.
832 *
833 * @since 1.9.0
834 */
835EAPI Eina_Bool ecore_evas_aux_hint_val_set(Ecore_Evas *ee, const int id, const char *val);
836/**
768 * @brief Send message to parent ecore 837 * @brief Send message to parent ecore
769 * 838 *
770 * @param ee The Ecore_Evas to set 839 * @param ee The Ecore_Evas to set
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 43e4b8691f..42564bd0dc 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2093,6 +2093,167 @@ ecore_evas_wm_rotation_manual_rotation_done(Ecore_Evas *ee)
2093 IFE; 2093 IFE;
2094} 2094}
2095 2095
2096EAPI const Eina_List *
2097ecore_evas_aux_hints_supported_get(const Ecore_Evas *ee)
2098{
2099 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2100 {
2101 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2102 "ecore_evas_aux_hints_supported_get");
2103 return NULL;
2104 }
2105 return ee->prop.aux_hint.supported_list;
2106}
2107
2108EAPI Eina_List *
2109ecore_evas_aux_hints_allowed_get(const Ecore_Evas *ee)
2110{
2111 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2112 {
2113 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2114 "ecore_evas_aux_hints_allowed_get");
2115 return NULL;
2116 }
2117
2118 Eina_List *list = NULL, *ll;
2119 Ecore_Evas_Aux_Hint *aux;
2120 EINA_LIST_FOREACH(ee->prop.aux_hint.hints, ll, aux)
2121 {
2122 if ((aux->allowed) && !(aux->notified))
2123 {
2124 list = eina_list_append(list, aux->id);
2125 }
2126 }
2127
2128 return list;
2129}
2130
2131EAPI int
2132ecore_evas_aux_hint_add(Ecore_Evas *ee, const char *hint, const char *val)
2133{
2134 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2135 {
2136 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2137 "ecore_evas_aux_hint_add");
2138 return -1;
2139 }
2140
2141 Eina_List *ll;
2142 char *supported_hint;
2143 EINA_LIST_FOREACH(ee->prop.aux_hint.supported_list, ll, supported_hint)
2144 {
2145 if (!strncmp(supported_hint, hint, strlen(hint)))
2146 {
2147 Ecore_Evas_Aux_Hint *aux= (Ecore_Evas_Aux_Hint *)calloc(1, sizeof(Ecore_Evas_Aux_Hint));
2148 if (aux)
2149 {
2150 aux->id = ee->prop.aux_hint.id;
2151 aux->hint = eina_stringshare_add(hint);
2152 aux->val = eina_stringshare_add(val);
2153
2154 ee->prop.aux_hint.hints = eina_list_append(ee->prop.aux_hint.hints, aux);
2155
2156 Eina_Strbuf *buf = _ecore_evas_aux_hints_string_get(ee);
2157 if (buf)
2158 {
2159 if (ee->engine.func->fn_aux_hints_set)
2160 ee->engine.func->fn_aux_hints_set(ee, eina_strbuf_string_get(buf));
2161
2162 eina_strbuf_free(buf);
2163
2164 ee->prop.aux_hint.id++;
2165
2166 return aux->id;
2167 }
2168
2169 eina_stringshare_del(aux->hint);
2170 eina_stringshare_del(aux->val);
2171 free(aux);
2172 }
2173 break;
2174 }
2175 }
2176
2177 return -1;
2178}
2179
2180EAPI Eina_Bool
2181ecore_evas_aux_hint_del(Ecore_Evas *ee, const int id)
2182{
2183 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2184 {
2185 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2186 "ecore_evas_aux_hint_del");
2187 return EINA_FALSE;
2188 }
2189
2190 Eina_List *ll;
2191 Ecore_Evas_Aux_Hint *aux;
2192 EINA_LIST_FOREACH(ee->prop.aux_hint.hints, ll, aux)
2193 {
2194 if (id == aux->id)
2195 {
2196 ee->prop.aux_hint.hints = eina_list_remove(ee->prop.aux_hint.hints, aux);
2197
2198 eina_stringshare_del(aux->hint);
2199 eina_stringshare_del(aux->val);
2200 free(aux);
2201
2202 Eina_Strbuf *buf = _ecore_evas_aux_hints_string_get(ee);
2203 if (buf)
2204 {
2205 if (ee->engine.func->fn_aux_hints_set)
2206 ee->engine.func->fn_aux_hints_set(ee, eina_strbuf_string_get(buf));
2207
2208 eina_strbuf_free(buf);
2209
2210 return EINA_TRUE;
2211 }
2212 break;
2213 }
2214 }
2215
2216 return EINA_FALSE;
2217}
2218
2219EAPI Eina_Bool
2220ecore_evas_aux_hint_val_set(Ecore_Evas *ee, const int id, const char *val)
2221{
2222 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2223 {
2224 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2225 "ecore_evas_aux_hint_val_set");
2226 return EINA_FALSE;
2227 }
2228
2229 Eina_List *ll;
2230 Ecore_Evas_Aux_Hint *aux;
2231 EINA_LIST_FOREACH(ee->prop.aux_hint.hints, ll, aux)
2232 {
2233 if (id == aux->id)
2234 {
2235 eina_stringshare_del(aux->val);
2236 aux->val = eina_stringshare_add(val);
2237 aux->allowed = 0;
2238 aux->notified = 0;
2239
2240 Eina_Strbuf *buf = _ecore_evas_aux_hints_string_get(ee);
2241 if (buf)
2242 {
2243 if (ee->engine.func->fn_aux_hints_set)
2244 ee->engine.func->fn_aux_hints_set(ee, eina_strbuf_string_get(buf));
2245
2246 eina_strbuf_free(buf);
2247
2248 return EINA_TRUE;
2249 }
2250 break;
2251 }
2252 }
2253
2254 return EINA_TRUE;
2255}
2256
2096EAPI void 2257EAPI void
2097ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on) 2258ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
2098{ 2259{
@@ -2854,6 +3015,7 @@ _ecore_evas_free(Ecore_Evas *ee)
2854 ee->prop.wm_rot.available_rots = NULL; 3015 ee->prop.wm_rot.available_rots = NULL;
2855 if (ee->prop.wm_rot.manual_mode.timer) 3016 if (ee->prop.wm_rot.manual_mode.timer)
2856 ecore_timer_del(ee->prop.wm_rot.manual_mode.timer); 3017 ecore_timer_del(ee->prop.wm_rot.manual_mode.timer);
3018 _ecore_evas_aux_hint_free(ee);
2857 ee->prop.wm_rot.manual_mode.timer = NULL; 3019 ee->prop.wm_rot.manual_mode.timer = NULL;
2858 if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object); 3020 if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object);
2859 ee->prop.cursor.object = NULL; 3021 ee->prop.cursor.object = NULL;
@@ -3157,6 +3319,48 @@ ecore_evas_input_event_unregister(Ecore_Evas *ee)
3157 ecore_event_window_unregister((Ecore_Window)ee); 3319 ecore_event_window_unregister((Ecore_Window)ee);
3158} 3320}
3159 3321
3322EAPI Eina_Strbuf *
3323_ecore_evas_aux_hints_string_get(Ecore_Evas *ee)
3324{
3325 Eina_Strbuf *buf = eina_strbuf_new();
3326 if (buf)
3327 {
3328 if (eina_list_count(ee->prop.aux_hint.hints) > 0)
3329 {
3330 Eina_List *l;
3331 Ecore_Evas_Aux_Hint *aux;
3332 int i = 0;
3333
3334 EINA_LIST_FOREACH(ee->prop.aux_hint.hints, l, aux)
3335 {
3336 /* add delimiter */
3337 if (i > 0) eina_strbuf_append_char(buf, ',');
3338 eina_strbuf_append_printf(buf, "%d:%s:%s", aux->id, aux->hint, aux->val);
3339 i++;
3340 }
3341 }
3342 }
3343 return buf;
3344}
3345
3346void
3347_ecore_evas_aux_hint_free(Ecore_Evas *ee)
3348{
3349 char *hint;
3350 EINA_LIST_FREE(ee->prop.aux_hint.supported_list, hint)
3351 {
3352 eina_stringshare_del(hint);
3353 }
3354
3355 Ecore_Evas_Aux_Hint *aux;
3356 EINA_LIST_FREE(ee->prop.aux_hint.hints, aux)
3357 {
3358 eina_stringshare_del(aux->hint);
3359 eina_stringshare_del(aux->val);
3360 free(aux);
3361 }
3362}
3363
3160/** 3364/**
3161 * @brief Create Ecore_Evas using fb backend. 3365 * @brief Create Ecore_Evas using fb backend.
3162 * @param disp_name The name of the display to be used. 3366 * @param disp_name The name of the display to be used.
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c
index 5c4a739ba7..4f0211c4b3 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -589,7 +589,9 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func =
589 NULL, // wm_rot_preferred_rotation_set 589 NULL, // wm_rot_preferred_rotation_set
590 NULL, // wm_rot_available_rotations_set 590 NULL, // wm_rot_available_rotations_set
591 NULL, // wm_rot_manual_rotation_done_set 591 NULL, // wm_rot_manual_rotation_done_set
592 NULL // wm_rot_manual_rotation_done 592 NULL, // wm_rot_manual_rotation_done
593
594 NULL // aux_hints_set
593}; 595};
594 596
595static void * 597static void *
diff --git a/src/lib/ecore_evas/ecore_evas_ews.c b/src/lib/ecore_evas/ecore_evas_ews.c
index 84c9a0f495..afffa5e9f2 100644
--- a/src/lib/ecore_evas/ecore_evas_ews.c
+++ b/src/lib/ecore_evas/ecore_evas_ews.c
@@ -706,7 +706,9 @@ static const Ecore_Evas_Engine_Func _ecore_ews_engine_func =
706 NULL, // wm_rot_preferred_rotation_set 706 NULL, // wm_rot_preferred_rotation_set
707 NULL, // wm_rot_available_rotations_set 707 NULL, // wm_rot_available_rotations_set
708 NULL, // wm_rot_manual_rotation_done_set 708 NULL, // wm_rot_manual_rotation_done_set
709 NULL // wm_rot_manual_rotation_done 709 NULL, // wm_rot_manual_rotation_done
710
711 NULL // aux_hints_set
710}; 712};
711 713
712void 714void
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index cc514d5d8e..e84550b5a8 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -46,6 +46,7 @@ typedef void (*Ecore_Evas_Event_Cb) (Ecore_Evas *ee);
46typedef struct _Ecore_Evas_Engine Ecore_Evas_Engine; 46typedef struct _Ecore_Evas_Engine Ecore_Evas_Engine;
47typedef struct _Ecore_Evas_Engine_Func Ecore_Evas_Engine_Func; 47typedef struct _Ecore_Evas_Engine_Func Ecore_Evas_Engine_Func;
48typedef struct _Ecore_Evas_Interface Ecore_Evas_Interface; 48typedef struct _Ecore_Evas_Interface Ecore_Evas_Interface;
49typedef struct _Ecore_Evas_Aux_Hint Ecore_Evas_Aux_Hint;
49 50
50/* Engines interfaces */ 51/* Engines interfaces */
51struct _Ecore_Evas_Engine_Func 52struct _Ecore_Evas_Engine_Func
@@ -120,6 +121,8 @@ struct _Ecore_Evas_Engine_Func
120 void (*fn_wm_rot_available_rotations_set) (Ecore_Evas *ee, const int *rots, unsigned int count); 121 void (*fn_wm_rot_available_rotations_set) (Ecore_Evas *ee, const int *rots, unsigned int count);
121 void (*fn_wm_rot_manual_rotation_done_set) (Ecore_Evas *ee, Eina_Bool set); 122 void (*fn_wm_rot_manual_rotation_done_set) (Ecore_Evas *ee, Eina_Bool set);
122 void (*fn_wm_rot_manual_rotation_done) (Ecore_Evas *ee); 123 void (*fn_wm_rot_manual_rotation_done) (Ecore_Evas *ee);
124
125 void (*fn_aux_hints_set) (Ecore_Evas *ee, const char *hints);
123}; 126};
124 127
125struct _Ecore_Evas_Interface 128struct _Ecore_Evas_Interface
@@ -206,6 +209,11 @@ struct _Ecore_Evas
206 Ecore_Timer *timer; 209 Ecore_Timer *timer;
207 } manual_mode; 210 } manual_mode;
208 } wm_rot; 211 } wm_rot;
212 struct {
213 Eina_List *supported_list;
214 Eina_List *hints;
215 int id;
216 } aux_hint;
209 int layer; 217 int layer;
210 Ecore_Window window; 218 Ecore_Window window;
211 unsigned char avoid_damage; 219 unsigned char avoid_damage;
@@ -298,6 +306,15 @@ struct _Ecore_Evas
298 unsigned char can_async_render : 1; 306 unsigned char can_async_render : 1;
299}; 307};
300 308
309struct _Ecore_Evas_Aux_Hint
310{
311 int id; // ID of aux hint
312 const char *hint; // hint string
313 const char *val; // value string
314 unsigned char allowed : 1; // received allowed event from the window manager
315 unsigned char notified : 1; // let caller know ee has got response for this aux hint
316};
317
301EAPI void _ecore_evas_ref(Ecore_Evas *ee); 318EAPI void _ecore_evas_ref(Ecore_Evas *ee);
302EAPI void _ecore_evas_unref(Ecore_Evas *ee); 319EAPI void _ecore_evas_unref(Ecore_Evas *ee);
303EAPI int ecore_evas_buffer_render(Ecore_Evas *ee); 320EAPI int ecore_evas_buffer_render(Ecore_Evas *ee);
@@ -363,6 +380,9 @@ int _ecore_evas_ews_shutdown(void);
363void _ecore_evas_extn_init(void); 380void _ecore_evas_extn_init(void);
364void _ecore_evas_extn_shutdown(void); 381void _ecore_evas_extn_shutdown(void);
365 382
383EAPI Eina_Strbuf *_ecore_evas_aux_hints_string_get(Ecore_Evas *ee);
384void _ecore_evas_aux_hint_free(Ecore_Evas *ee);
385
366Eina_Module *_ecore_evas_engine_load(const char *engine); 386Eina_Module *_ecore_evas_engine_load(const char *engine);
367const Eina_List *_ecore_evas_available_engines_get(void); 387const Eina_List *_ecore_evas_available_engines_get(void);
368void _ecore_evas_engine_init(void); 388void _ecore_evas_engine_init(void);
diff --git a/src/lib/ecore_x/Ecore_X_Atoms.h b/src/lib/ecore_x/Ecore_X_Atoms.h
index 6c028e6582..865bb02426 100644
--- a/src/lib/ecore_x/Ecore_X_Atoms.h
+++ b/src/lib/ecore_x/Ecore_X_Atoms.h
@@ -322,4 +322,10 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE;
322EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE; 322EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE;
323EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST; 323EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST;
324EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE; 324EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE;
325
326/* E window auxiliary hint */
327EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORTED_LIST;
328EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORT;
329EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT;
330EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED;
325#endif /* _ECORE_X_ATOMS_H */ 331#endif /* _ECORE_X_ATOMS_H */
diff --git a/src/lib/ecore_x/ecore_x_atoms_decl.h b/src/lib/ecore_x/ecore_x_atoms_decl.h
index a1f7ecbb85..5b048f3969 100644
--- a/src/lib/ecore_x/ecore_x_atoms_decl.h
+++ b/src/lib/ecore_x/ecore_x_atoms_decl.h
@@ -352,6 +352,12 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE = 0;
352EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST = 0; 352EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST = 0;
353EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE = 0; 353EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE = 0;
354 354
355/* E window auxiliary hint */
356EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORTED_LIST = 0;
357EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORT = 0;
358EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT = 0;
359EAPI Ecore_X_Atom ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED = 0;
360
355typedef struct _Atom_Item Atom_Item; 361typedef struct _Atom_Item Atom_Item;
356 362
357struct _Atom_Item 363struct _Atom_Item
@@ -660,6 +666,11 @@ const Atom_Item atom_items[] =
660 { "_E_WINDOW_ROTATION_CHANGE_PREPARE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE }, 666 { "_E_WINDOW_ROTATION_CHANGE_PREPARE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE },
661 { "_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE }, 667 { "_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_PREPARE_DONE },
662 { "_E_WINDOW_ROTATION_CHANGE_REQUEST", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST }, 668 { "_E_WINDOW_ROTATION_CHANGE_REQUEST", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST },
663 { "_E_WINDOW_ROTATION_CHANGE_DONE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE } 669 { "_E_WINDOW_ROTATION_CHANGE_DONE", &ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_DONE },
670
671 { "_E_WINDOW_AUX_HINT_SUPPORTED_LIST", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORTED_LIST },
672 { "_E_WINDOW_AUX_HINT_SUPPORT", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORT },
673 { "_E_WINDOW_AUX_HINT", &ECORE_X_ATOM_E_WINDOW_AUX_HINT },
674 { "_E_WINDOW_AUX_HINT_ALLOWED", &ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED }
664}; 675};
665 676
diff --git a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
index d54737eb1a..6722f71977 100644
--- a/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
+++ b/src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c
@@ -481,7 +481,9 @@ static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func =
481 NULL, // wm_rot_preferred_rotation_set 481 NULL, // wm_rot_preferred_rotation_set
482 NULL, // wm_rot_available_rotations_set 482 NULL, // wm_rot_available_rotations_set
483 NULL, // wm_rot_manual_rotation_done_set 483 NULL, // wm_rot_manual_rotation_done_set
484 NULL // wm_rot_manual_rotation_done 484 NULL, // wm_rot_manual_rotation_done
485
486 NULL // aux_hints_set
485 }; 487 };
486 488
487EAPI Ecore_Evas * 489EAPI Ecore_Evas *
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index ec6afa691d..8a7160bfee 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -104,7 +104,9 @@ static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func =
104 NULL, // wm_rot_preferred_rotation_set 104 NULL, // wm_rot_preferred_rotation_set
105 NULL, // wm_rot_available_rotations_set 105 NULL, // wm_rot_available_rotations_set
106 NULL, // wm_rot_manual_rotation_done_set 106 NULL, // wm_rot_manual_rotation_done_set
107 NULL // wm_rot_manual_rotation_done 107 NULL, // wm_rot_manual_rotation_done
108
109 NULL // aux_hints_set
108}; 110};
109 111
110EAPI Ecore_Evas * 112EAPI Ecore_Evas *
diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
index 221a7de639..4b2aaeb0e1 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c
@@ -882,7 +882,9 @@ static const Ecore_Evas_Engine_Func _ecore_extn_plug_engine_func =
882 NULL, // wm_rot_preferred_rotation_set 882 NULL, // wm_rot_preferred_rotation_set
883 NULL, // wm_rot_available_rotations_set 883 NULL, // wm_rot_available_rotations_set
884 NULL, // wm_rot_manual_rotation_done_set 884 NULL, // wm_rot_manual_rotation_done_set
885 NULL // wm_rot_manual_rotation_done 885 NULL, // wm_rot_manual_rotation_done
886
887 NULL // aux_hints_set
886}; 888};
887 889
888static Eina_Bool 890static Eina_Bool
@@ -2007,7 +2009,9 @@ static const Ecore_Evas_Engine_Func _ecore_extn_socket_engine_func =
2007 NULL, // wm_rot_preferred_rotation_set 2009 NULL, // wm_rot_preferred_rotation_set
2008 NULL, // wm_rot_available_rotations_set 2010 NULL, // wm_rot_available_rotations_set
2009 NULL, // wm_rot_manual_rotation_done_set 2011 NULL, // wm_rot_manual_rotation_done_set
2010 NULL // wm_rot_manual_rotation_done 2012 NULL, // wm_rot_manual_rotation_done
2013
2014 NULL // aux_hints_set
2011}; 2015};
2012 2016
2013EAPI Ecore_Evas * 2017EAPI Ecore_Evas *
diff --git a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
index aba3127ab5..4fb69c438a 100644
--- a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
+++ b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
@@ -577,7 +577,9 @@ static Ecore_Evas_Engine_Func _ecore_fb_engine_func =
577 NULL, // wm_rot_preferred_rotation_set 577 NULL, // wm_rot_preferred_rotation_set
578 NULL, // wm_rot_available_rotations_set 578 NULL, // wm_rot_available_rotations_set
579 NULL, // wm_rot_manual_rotation_done_set 579 NULL, // wm_rot_manual_rotation_done_set
580 NULL // wm_rot_manual_rotation_done 580 NULL, // wm_rot_manual_rotation_done
581
582 NULL // aux_hints_set
581 }; 583 };
582 584
583EAPI Ecore_Evas * 585EAPI Ecore_Evas *
diff --git a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
index bd09d14565..032dbba5c3 100644
--- a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
+++ b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
@@ -415,7 +415,9 @@ static Ecore_Evas_Engine_Func _ecore_psl1ght_engine_func =
415 NULL, // wm_rot_preferred_rotation_set 415 NULL, // wm_rot_preferred_rotation_set
416 NULL, // wm_rot_available_rotations_set 416 NULL, // wm_rot_available_rotations_set
417 NULL, // wm_rot_manual_rotation_done_set 417 NULL, // wm_rot_manual_rotation_done_set
418 NULL // wm_rot_manual_rotation_done 418 NULL, // wm_rot_manual_rotation_done
419
420 NULL // aux_hints_set
419}; 421};
420 422
421EAPI Ecore_Evas * 423EAPI Ecore_Evas *
diff --git a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
index 33da51882b..98bd98a6f3 100644
--- a/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
+++ b/src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c
@@ -455,7 +455,9 @@ static Ecore_Evas_Engine_Func _ecore_sdl_engine_func =
455 NULL, // wm_rot_preferred_rotation_set 455 NULL, // wm_rot_preferred_rotation_set
456 NULL, // wm_rot_available_rotations_set 456 NULL, // wm_rot_available_rotations_set
457 NULL, // wm_rot_manual_rotation_done_set 457 NULL, // wm_rot_manual_rotation_done_set
458 NULL // wm_rot_manual_rotation_done 458 NULL, // wm_rot_manual_rotation_done
459
460 NULL // aux_hints_set
459}; 461};
460 462
461static Ecore_Evas* 463static Ecore_Evas*
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index eaaa16b9ca..592609f034 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -84,7 +84,9 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
84 NULL, // wm_rot_preferred_rotation_set 84 NULL, // wm_rot_preferred_rotation_set
85 NULL, // wm_rot_available_rotations_set 85 NULL, // wm_rot_available_rotations_set
86 NULL, // wm_rot_manual_rotation_done_set 86 NULL, // wm_rot_manual_rotation_done_set
87 NULL // wm_rot_manual_rotation_done 87 NULL, // wm_rot_manual_rotation_done
88
89 NULL // aux_hints_set
88}; 90};
89 91
90/* external variables */ 92/* external variables */
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
index c873acef78..90ab66f70a 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
@@ -84,7 +84,9 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
84 NULL, // wm_rot_preferred_rotation_set 84 NULL, // wm_rot_preferred_rotation_set
85 NULL, // wm_rot_available_rotations_set 85 NULL, // wm_rot_available_rotations_set
86 NULL, // wm_rot_manual_rotation_done_set 86 NULL, // wm_rot_manual_rotation_done_set
87 NULL // wm_rot_manual_rotation_done 87 NULL, // wm_rot_manual_rotation_done
88
89 NULL // aux_hints_set
88}; 90};
89 91
90/* external variables */ 92/* external variables */
diff --git a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
index bbcfae228b..2ff8998f8b 100644
--- a/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
+++ b/src/modules/ecore_evas/engines/win32/ecore_evas_win32.c
@@ -1141,7 +1141,9 @@ static Ecore_Evas_Engine_Func _ecore_win32_engine_func =
1141 NULL, // wm_rot_preferred_rotation_set 1141 NULL, // wm_rot_preferred_rotation_set
1142 NULL, // wm_rot_available_rotations_set 1142 NULL, // wm_rot_available_rotations_set
1143 NULL, // wm_rot_manual_rotation_done_set 1143 NULL, // wm_rot_manual_rotation_done_set
1144 NULL // wm_rot_manual_rotation_done 1144 NULL, // wm_rot_manual_rotation_done
1145
1146 NULL // aux_hints_set
1145}; 1147};
1146 1148
1147#endif /* BUILD_ECORE_EVAS_WIN32 */ 1149#endif /* BUILD_ECORE_EVAS_WIN32 */
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 2a33fc8265..c6cc9ec975 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -118,6 +118,7 @@ static Ecore_Evas_Interface_Gl_X11 *_ecore_evas_x_interface_gl_x11_new(void);
118static void _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize); 118static void _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize);
119static Eina_Bool _ecore_evas_x_wm_rot_manual_rotation_done_timeout(void *data); 119static Eina_Bool _ecore_evas_x_wm_rot_manual_rotation_done_timeout(void *data);
120static void _ecore_evas_x_wm_rot_manual_rotation_done_timeout_update(Ecore_Evas *ee); 120static void _ecore_evas_x_wm_rot_manual_rotation_done_timeout_update(Ecore_Evas *ee);
121static void _ecore_evas_x_aux_hints_set(Ecore_Evas *ee, const char *hints);
121 122
122static void _resize_shape_do(Ecore_Evas *); 123static void _resize_shape_do(Ecore_Evas *);
123static void _shaped_do(Ecore_Evas *, int); 124static void _shaped_do(Ecore_Evas *, int);
@@ -341,6 +342,55 @@ _ecore_evas_x_wm_rot_manual_rotation_done_job(void *data)
341 edata->wm_rot.done = 0; 342 edata->wm_rot.done = 0;
342} 343}
343 344
345static void
346_ecore_evas_x_aux_hints_supprted_update(Ecore_Evas *ee)
347{
348 Ecore_X_Window root = ecore_x_window_root_first_get();
349 unsigned char *data = NULL;
350 unsigned int num = 0, i = 0;
351 int res = 0, n = 0;
352 char **str;
353 const char *hint;
354
355 EINA_LIST_FREE(ee->prop.aux_hint.supported_list, hint)
356 {
357 eina_stringshare_del(hint);
358 }
359
360 res = ecore_x_window_prop_property_get
361 (root, ECORE_X_ATOM_E_WINDOW_AUX_HINT_SUPPORTED_LIST,
362 ECORE_X_ATOM_STRING, 0, &data, &n);
363
364 if ((res == 8) && (n >0))
365 {
366 str = eina_str_split_full((char *)data, ",", -1, &num);
367 for (i = 0; i < num; i++)
368 {
369 hint = eina_stringshare_add(str[i]);
370 ee->prop.aux_hint.supported_list = eina_list_append(ee->prop.aux_hint.supported_list, hint);
371 }
372
373 if (num > 0)
374 {
375 free(str[0]);
376 free(str);
377 }
378 }
379
380 free(data);
381}
382
383static void
384_ecore_evas_x_aux_hints_update(Ecore_Evas *ee)
385{
386 Eina_Strbuf *buf = _ecore_evas_aux_hints_string_get(ee);
387 if (buf)
388 {
389 _ecore_evas_x_aux_hints_set(ee, eina_strbuf_string_get(buf));
390 eina_strbuf_free(buf);
391 }
392}
393
344# ifdef BUILD_ECORE_EVAS_OPENGL_X11 394# ifdef BUILD_ECORE_EVAS_OPENGL_X11
345static Ecore_X_Window 395static Ecore_X_Window
346_ecore_evas_x_gl_window_new(Ecore_Evas *ee, Ecore_X_Window parent, int x, int y, int w, int h, Eina_Bool override, int argb, const int *opt) 396_ecore_evas_x_gl_window_new(Ecore_Evas *ee, Ecore_X_Window parent, int x, int y, int w, int h, Eina_Bool override, int argb, const int *opt)
@@ -1128,6 +1178,28 @@ _ecore_evas_x_event_client_message(void *data EINA_UNUSED, int type EINA_UNUSED,
1128 } 1178 }
1129 } 1179 }
1130 } 1180 }
1181 else if (e->message_type == ECORE_X_ATOM_E_WINDOW_AUX_HINT_ALLOWED)
1182 {
1183 ee = ecore_event_window_match(e->win);
1184 if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
1185
1186 int id = e->data.l[1]; /* id of aux hint */
1187 Eina_List *l;
1188 Ecore_Evas_Aux_Hint *aux;
1189 EINA_LIST_FOREACH(ee->prop.aux_hint.hints, l, aux)
1190 {
1191 if (id == aux->id)
1192 {
1193 aux->allowed = 1;
1194 if (!aux->notified)
1195 {
1196 if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
1197 aux->notified = 1;
1198 }
1199 break;
1200 }
1201 }
1202 }
1131 return ECORE_CALLBACK_PASS_ON; 1203 return ECORE_CALLBACK_PASS_ON;
1132} 1204}
1133 1205
@@ -2479,6 +2551,8 @@ _alpha_do(Ecore_Evas *ee, int alpha)
2479 _ecore_evas_x_protocols_set(ee); 2551 _ecore_evas_x_protocols_set(ee);
2480 _ecore_evas_x_window_profile_protocol_set(ee); 2552 _ecore_evas_x_window_profile_protocol_set(ee);
2481 _ecore_evas_x_wm_rotation_protocol_set(ee); 2553 _ecore_evas_x_wm_rotation_protocol_set(ee);
2554 _ecore_evas_x_aux_hints_supprted_update(ee);
2555 _ecore_evas_x_aux_hints_update(ee);
2482 _ecore_evas_x_sync_set(ee); 2556 _ecore_evas_x_sync_set(ee);
2483 _ecore_evas_x_size_pos_hints_update(ee); 2557 _ecore_evas_x_size_pos_hints_update(ee);
2484#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */ 2558#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
@@ -2631,6 +2705,8 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
2631 _ecore_evas_x_protocols_set(ee); 2705 _ecore_evas_x_protocols_set(ee);
2632 _ecore_evas_x_window_profile_protocol_set(ee); 2706 _ecore_evas_x_window_profile_protocol_set(ee);
2633 _ecore_evas_x_wm_rotation_protocol_set(ee); 2707 _ecore_evas_x_wm_rotation_protocol_set(ee);
2708 _ecore_evas_x_aux_hints_supprted_update(ee);
2709 _ecore_evas_x_aux_hints_update(ee);
2634 _ecore_evas_x_sync_set(ee); 2710 _ecore_evas_x_sync_set(ee);
2635 _ecore_evas_x_size_pos_hints_update(ee); 2711 _ecore_evas_x_size_pos_hints_update(ee);
2636#endif /* BUILD_ECORE_EVAS_OPENGL_X11 */ 2712#endif /* BUILD_ECORE_EVAS_OPENGL_X11 */
@@ -3403,6 +3479,18 @@ _ecore_evas_x_wm_rot_manual_rotation_done_timeout_update(Ecore_Evas *ee)
3403 (4.0f, _ecore_evas_x_wm_rot_manual_rotation_done_timeout, ee); 3479 (4.0f, _ecore_evas_x_wm_rot_manual_rotation_done_timeout, ee);
3404} 3480}
3405 3481
3482static void
3483_ecore_evas_x_aux_hints_set(Ecore_Evas *ee, const char *hints)
3484{
3485 if (hints)
3486 ecore_x_window_prop_property_set
3487 (ee->prop.window, ECORE_X_ATOM_E_WINDOW_AUX_HINT,
3488 ECORE_X_ATOM_STRING, 8, (void *)hints, strlen(hints) + 1);
3489 else
3490 ecore_x_window_prop_property_del
3491 (ee->prop.window, ECORE_X_ATOM_E_WINDOW_AUX_HINT);
3492}
3493
3406static Ecore_Evas_Engine_Func _ecore_x_engine_func = 3494static Ecore_Evas_Engine_Func _ecore_x_engine_func =
3407{ 3495{
3408 _ecore_evas_x_free, 3496 _ecore_evas_x_free,
@@ -3473,7 +3561,9 @@ static Ecore_Evas_Engine_Func _ecore_x_engine_func =
3473 _ecore_evas_x_wm_rot_preferred_rotation_set, 3561 _ecore_evas_x_wm_rot_preferred_rotation_set,
3474 _ecore_evas_x_wm_rot_available_rotations_set, 3562 _ecore_evas_x_wm_rot_available_rotations_set,
3475 _ecore_evas_x_wm_rot_manual_rotation_done_set, 3563 _ecore_evas_x_wm_rot_manual_rotation_done_set,
3476 _ecore_evas_x_wm_rot_manual_rotation_done 3564 _ecore_evas_x_wm_rot_manual_rotation_done,
3565
3566 _ecore_evas_x_aux_hints_set
3477}; 3567};
3478 3568
3479/* 3569/*
@@ -3873,6 +3963,8 @@ ecore_evas_software_x11_new_internal(const char *disp_name, Ecore_X_Window paren
3873 _ecore_evas_x_protocols_set(ee); 3963 _ecore_evas_x_protocols_set(ee);
3874 _ecore_evas_x_window_profile_protocol_set(ee); 3964 _ecore_evas_x_window_profile_protocol_set(ee);
3875 _ecore_evas_x_wm_rotation_protocol_set(ee); 3965 _ecore_evas_x_wm_rotation_protocol_set(ee);
3966 _ecore_evas_x_aux_hints_supprted_update(ee);
3967 _ecore_evas_x_aux_hints_update(ee);
3876 _ecore_evas_x_sync_set(ee); 3968 _ecore_evas_x_sync_set(ee);
3877 3969
3878 ee->engine.func->fn_render = _ecore_evas_x_render; 3970 ee->engine.func->fn_render = _ecore_evas_x_render;
@@ -4321,6 +4413,8 @@ ecore_evas_gl_x11_options_new_internal(const char *disp_name, Ecore_X_Window par
4321 _ecore_evas_x_protocols_set(ee); 4413 _ecore_evas_x_protocols_set(ee);
4322 _ecore_evas_x_window_profile_protocol_set(ee); 4414 _ecore_evas_x_window_profile_protocol_set(ee);
4323 _ecore_evas_x_wm_rotation_protocol_set(ee); 4415 _ecore_evas_x_wm_rotation_protocol_set(ee);
4416 _ecore_evas_x_aux_hints_supprted_update(ee);
4417 _ecore_evas_x_aux_hints_update(ee);
4324 _ecore_evas_x_sync_set(ee); 4418 _ecore_evas_x_sync_set(ee);
4325 4419
4326 ee->engine.func->fn_render = _ecore_evas_x_render; 4420 ee->engine.func->fn_render = _ecore_evas_x_render;