summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWoochanlee <wc0917.lee@samsung.com>2020-01-08 07:59:53 -0500
committerChristopher Michael <cp.michael@samsung.com>2020-01-08 07:59:53 -0500
commit926cbb98af4757af991e55f7d4f4cd35195a5ff4 (patch)
treeab5a368842a112df066e0d9b5a0b1b4e50eac0d9
parent4ea865623df83b78830dc253bcddd7e64a7810ca (diff)
downloadefl-926cbb98af4757af991e55f7d4f4cd35195a5ff4.tar.gz
ecore_wl2: Add APIs to get window property.
Summary: Creates APIs to get property. +ecore_wl2_window_popup_input_get +ecore_wl2_window_input_region_get +ecore_wl2_window_opaque_region_get ref T8016 Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8016 Differential Revision: https://phab.enlightenment.org/D11038
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h40
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c30
2 files changed, 70 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 0631a5fe6d..d6dfaf1d28 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -918,6 +918,20 @@ EAPI void ecore_wl2_window_alpha_set(Ecore_Wl2_Window *window, Eina_Bool alpha);
EAPI void ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, int y, int w, int h);
/**
+ * Get the opaque region of the Ecore_Wl2_Window
+ *
+ * @param win The window
+ * @param x The left point of the region.
+ * @param y The top point of the region.
+ * @param w The width of the region.
+ * @param h The height of the region.
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.24
+ */
+EAPI void ecore_wl2_window_opaque_region_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h);
+
+/**
* Set the input region of the Ecore_Wl2_Window.
*
* To set an empty region, pass width and height as 0.
@@ -936,6 +950,20 @@ EAPI void ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, in
EAPI void ecore_wl2_window_input_region_set(Ecore_Wl2_Window *window, int x, int y, int w, int h);
/**
+ * Get the input region of the Ecore_Wl2_Window.
+ *
+ * @param window The window to set the input region of
+ * @param x The left point of the region.
+ * @param y The top point of the region.
+ * @param w The width of the region.
+ * @param h The height of the region.
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.24
+ */
+EAPI void ecore_wl2_window_input_region_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h);
+
+/**
* Get if a given window is maximized
*
* @param window The window to get the maximized state of
@@ -1301,6 +1329,18 @@ EAPI Eina_Bool ecore_wl2_window_activated_get(const Ecore_Wl2_Window *window);
EAPI void ecore_wl2_window_popup_input_set(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input);
/**
+ * @brief Get the seat for a popup window to be used with grab
+ *
+ * @param window The window
+ *
+ * @return Returns Ecore_Wl2_Input if the window has an input.
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.24
+ */
+EAPI Ecore_Wl2_Input *ecore_wl2_window_popup_input_get(Ecore_Wl2_Window *window);
+
+/**
* Check if a window has a shell surface - without one it can't be visible.
*
* @param The window to check
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 0085354d11..21c01c5a70 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -845,6 +845,17 @@ ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, int y, int w
}
EAPI void
+ecore_wl2_window_opaque_region_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h)
+{
+ EINA_SAFETY_ON_NULL_RETURN(window);
+
+ if (x) *x = window->opaque.x;
+ if (y) *y = window->opaque.y;
+ if (w) *w = window->opaque.w;
+ if (h) *h = window->opaque.h;
+}
+
+EAPI void
ecore_wl2_window_input_region_set(Ecore_Wl2_Window *window, int x, int y, int w, int h)
{
int nx = 0, ny = 0, nw = 0, nh = 0;
@@ -893,6 +904,17 @@ ecore_wl2_window_input_region_set(Ecore_Wl2_Window *window, int x, int y, int w,
window->pending.input = EINA_TRUE;
}
+EAPI void
+ecore_wl2_window_input_region_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h)
+{
+ EINA_SAFETY_ON_NULL_RETURN(window);
+
+ if (x) *x = window->input_rect.x;
+ if (y) *y = window->input_rect.y;
+ if (w) *w = window->input_rect.w;
+ if (h) *h = window->input_rect.h;
+}
+
EAPI Eina_Bool
ecore_wl2_window_maximized_get(Ecore_Wl2_Window *window)
{
@@ -1117,6 +1139,14 @@ ecore_wl2_window_popup_input_set(Ecore_Wl2_Window *window, Ecore_Wl2_Input *inpu
window->grab = input;
}
+EAPI Ecore_Wl2_Input *
+ecore_wl2_window_popup_input_get(Ecore_Wl2_Window *window)
+{
+ EINA_SAFETY_ON_NULL_RETURN(window);
+
+ return window->grab;
+}
+
EAPI Ecore_Wl2_Display *
ecore_wl2_window_display_get(const Ecore_Wl2_Window *window)
{