aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-06-13 12:32:59 -0400
committerChris Michael <cp.michael@samsung.com>2017-06-13 12:57:17 -0400
commitb678382b8aca530c24801a2f56cb36beb68979fe (patch)
treedb29bb4dc1d9f83cc3334658d2c61b3ce1aae119
parentecore-wl2: Add API function to change auxiliary window hint (diff)
downloadefl-b678382b8aca530c24801a2f56cb36beb68979fe.tar.gz
ecore-wl2: Add API to support deleting auxiliary window hints
@feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h11
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c25
2 files changed, 36 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index ef2eb043fb..cff185f3f5 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1134,6 +1134,17 @@ EAPI void ecore_wl2_window_aux_hint_add(Ecore_Wl2_Window *window, int id, const
EAPI void ecore_wl2_window_aux_hint_change(Ecore_Wl2_Window *window, int id, const char *val);
/**
+ * Delete an auxiliary hint on a given window
+ *
+ * @param window
+ * @param id
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.20
+ */
+EAPI void ecore_wl2_window_aux_hint_del(Ecore_Wl2_Window *window, int id);
+
+/**
* @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 cc6acc6fc8..e47b6b8c8d 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1418,3 +1418,28 @@ ecore_wl2_window_aux_hint_change(Ecore_Wl2_Window *window, int id, const char *v
}
}
}
+
+EAPI void
+ecore_wl2_window_aux_hint_del(Ecore_Wl2_Window *window, int id)
+{
+ 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)
+ {
+ window->supported_aux_hints =
+ eina_inlist_remove(window->supported_aux_hints,
+ EINA_INLIST_GET(ehint));
+
+ eina_stringshare_del(ehint->hint);
+ eina_stringshare_del(ehint->val);
+ free(ehint);
+
+ break;
+ }
+ }
+}