aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-06-13 12:23:49 -0400
committerChris Michael <cp.michael@samsung.com>2017-06-13 12:57:17 -0400
commit8b311aa27f46c5eebe33e2a46433d87428dbecf6 (patch)
tree2a1e2655eb00eaeafde70bab0af0a96ff34e4e90
parentecore-wl2: Add API to support adding auxiliary window hints (diff)
downloadefl-8b311aa27f46c5eebe33e2a46433d87428dbecf6.tar.gz
ecore-wl2: Add API function to change auxiliary window hint
@feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h12
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c18
2 files changed, 30 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index d320256f3f..ef2eb043fb 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1122,6 +1122,18 @@ EAPI Eina_List *ecore_wl2_window_aux_hints_supported_get(Ecore_Wl2_Window *windo
EAPI void ecore_wl2_window_aux_hint_add(Ecore_Wl2_Window *window, int id, const char *hint, const char *val);
/**
+ * Change an auxiliary hint on a given window
+ *
+ * @param window
+ * @param id
+ * @param val
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.20
+ */
+EAPI void ecore_wl2_window_aux_hint_change(Ecore_Wl2_Window *window, int id, const char *val);
+
+/**
* @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions
* @ingroup Ecore_Wl2_Group
*
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index f43d5d41fd..cc6acc6fc8 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1400,3 +1400,21 @@ ecore_wl2_window_aux_hint_add(Ecore_Wl2_Window *window, int id, const char *hint
window->supported_aux_hints =
eina_inlist_append(window->supported_aux_hints, EINA_INLIST_GET(ehint));
}
+
+EAPI void
+ecore_wl2_window_aux_hint_change(Ecore_Wl2_Window *window, int id, const char *val)
+{
+ Eina_Inlist *tmp;
+ Ecore_Wl2_Aux_Hint *ehint;
+
+ EINA_SAFETY_ON_NULL_RETURN(window);
+
+ EINA_INLIST_FOREACH_SAFE(window->supported_aux_hints, tmp, ehint)
+ {
+ if (ehint->id == id)
+ {
+ eina_stringshare_replace(&ehint->val, val);
+ break;
+ }
+ }
+}