aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-06-13 12:18:01 -0400
committerChris Michael <cp.michael@samsung.com>2017-06-13 12:57:17 -0400
commitdaddaac7ec64765659a8bb2052ba6f308fc4b556 (patch)
tree1c278abb83970b32208add54ee9bf0394f33fce1
parentecore-wl2: Add API function to get list of supported auxiliary hints (diff)
downloadefl-daddaac7ec64765659a8bb2052ba6f308fc4b556.tar.gz
ecore-wl2: Add API to support adding auxiliary window hints
@feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h13
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c18
2 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 69e0c778d4..d320256f3f 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1109,6 +1109,19 @@ EAPI void ecore_wl2_window_rotation_change_done_send(Ecore_Wl2_Window *window, i
EAPI Eina_List *ecore_wl2_window_aux_hints_supported_get(Ecore_Wl2_Window *window);
/**
+ * Add a supported auxiliary hint to a given window
+ *
+ * @param window
+ * @param id
+ * @param hint
+ * @param val
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.20
+ */
+EAPI void ecore_wl2_window_aux_hint_add(Ecore_Wl2_Window *window, int id, const char *hint, 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 12c888a887..f43d5d41fd 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1382,3 +1382,21 @@ ecore_wl2_window_aux_hints_supported_get(Ecore_Wl2_Window *window)
return ret;
}
+
+EAPI void
+ecore_wl2_window_aux_hint_add(Ecore_Wl2_Window *window, int id, const char *hint, const char *val)
+{
+ Ecore_Wl2_Aux_Hint *ehint;
+
+ EINA_SAFETY_ON_NULL_RETURN(window);
+
+ ehint = calloc(1, sizeof(Ecore_Wl2_Aux_Hint));
+ if (!ehint) return;
+
+ ehint->id = id;
+ ehint->hint = eina_stringshare_add(hint);
+ ehint->val = eina_stringshare_add(val);
+
+ window->supported_aux_hints =
+ eina_inlist_append(window->supported_aux_hints, EINA_INLIST_GET(ehint));
+}