summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWoochanlee <wc0917.lee@samsung.com>2019-12-02 08:50:23 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-12-02 08:50:24 -0500
commit6162914be59354a5113f9b6d81a9c0f51fe8a1c5 (patch)
tree321f81bb362c19b14605eff8aa68bd4235babe6e
parent1cb7d11ea86f23ba4126e62103df00baa425c645 (diff)
downloadefl-6162914be59354a5113f9b6d81a9c0f51fe8a1c5.tar.gz
ecore_wl2: Add APIs to get window properies.
Summary: Creates APIs to get property. Reviewers: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10743
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h44
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c34
2 files changed, 78 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 6f8f9dcd54..acca6d5f74 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -821,6 +821,13 @@ EAPI int ecore_wl2_window_surface_id_get(Ecore_Wl2_Window *window);
EAPI void ecore_wl2_window_aspect_set(Ecore_Wl2_Window *window, int w, int h, unsigned int aspect);
/**
+ * @see evas_object_size_hint_aspect_get
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.24
+ */
+EAPI void ecore_wl2_window_aspect_get(Ecore_Wl2_Window *window, int *w, int *h, unsigned int *aspect);
+
+/**
* Show a given Ecore_Wl2_Window
*
* @param window The Ecore_Wl2_Window to show
@@ -1009,6 +1016,18 @@ EAPI void ecore_wl2_window_rotation_set(Ecore_Wl2_Window *window, int rotation);
EAPI void ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title);
/**
+ * Get the title of a given window
+ *
+ * @param window The window to set the title of
+ *
+ * @return A string if found, or NULL otherwise
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.24
+ */
+EAPI const char *ecore_wl2_window_title_get(Ecore_Wl2_Window *window);
+
+/**
* Set the class of a given window
*
* @param window The window to set the class of
@@ -1019,6 +1038,19 @@ EAPI void ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title
*/
EAPI void ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas);
+
+/**
+ * Get the class of a given window
+ *
+ * @param window The window to set the class of
+ *
+ * @return A string if found, or NULL otherwise
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.24
+ */
+EAPI const char *ecore_wl2_window_class_get(Ecore_Wl2_Window *window);
+
/**
* Get the geometry of a given window
*
@@ -1338,6 +1370,18 @@ EAPI Eina_Bool ecore_wl2_window_focus_skip_get(Ecore_Wl2_Window *window);
EAPI void ecore_wl2_window_role_set(Ecore_Wl2_Window *window, const char *role);
/**
+ * Get the role of a given window
+ *
+ * @param window The window to set the class role
+ *
+ * @return A string if found, or NULL otherwise
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.24
+ */
+EAPI const char *ecore_wl2_window_role_get(Ecore_Wl2_Window *window);
+
+/**
* Set if a given window is in floating mode
*
* @param window The window to set floating mode on
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index d31dcafeb0..0085354d11 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1017,6 +1017,14 @@ ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title)
ecore_wl2_display_flush(window->display);
}
+EAPI const char *
+ecore_wl2_window_title_get(Ecore_Wl2_Window *window)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL);
+
+ return window->title ? window->title : NULL;
+}
+
EAPI void
ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas)
{
@@ -1033,6 +1041,14 @@ ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas)
ecore_wl2_display_flush(window->display);
}
+EAPI const char *
+ecore_wl2_window_class_get(Ecore_Wl2_Window *window)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL);
+
+ return window->class ? window->class : NULL;
+}
+
EAPI void
ecore_wl2_window_geometry_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h)
{
@@ -1367,6 +1383,14 @@ ecore_wl2_window_role_set(Ecore_Wl2_Window *window, const char *role)
eina_stringshare_replace(&window->role, role);
}
+EAPI const char *
+ecore_wl2_window_role_get(Ecore_Wl2_Window *window)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL);
+
+ return window->role ? window->role : NULL;
+}
+
EAPI void
ecore_wl2_window_floating_mode_set(Ecore_Wl2_Window *window, Eina_Bool floating)
{
@@ -1404,6 +1428,16 @@ ecore_wl2_window_aspect_set(Ecore_Wl2_Window *window, int w, int h, unsigned int
}
EAPI void
+ecore_wl2_window_aspect_get(Ecore_Wl2_Window *window, int *w, int *h, unsigned int *aspect)
+{
+ EINA_SAFETY_ON_NULL_RETURN(window);
+
+ if (w) *w = window->aspect.w;
+ if (h) *h = window->aspect.h;
+ if (aspect) *aspect = window->aspect.aspect;
+}
+
+EAPI void
ecore_wl2_window_weight_set(Ecore_Wl2_Window *window, double w, double h)
{
int ww, hh;