devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=926cbb98af4757af991e55f7d4f4cd35195a5ff4

commit 926cbb98af4757af991e55f7d4f4cd35195a5ff4
Author: Woochanlee <wc0917....@samsung.com>
Date:   Wed Jan 8 07:59:53 2020 -0500

    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
---
 src/lib/ecore_wl2/Ecore_Wl2.h        | 40 ++++++++++++++++++++++++++++++++++++
 src/lib/ecore_wl2/ecore_wl2_window.c | 30 +++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)

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
@@ -917,6 +917,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.
  *
@@ -935,6 +949,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
  *
@@ -1300,6 +1328,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.
  *
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
@@ -844,6 +844,17 @@ ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window 
*window, int x, int y, int w
    window->pending.opaque = EINA_TRUE;
 }
 
+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)
 {
@@ -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)
 {

-- 


Reply via email to