From a08f8e7bbff72d58f30d28c2b6dd32b627b5b19b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 17 May 2017 16:02:53 -0400 Subject: [PATCH] ecore-wl2: add ecore_wl2_display_name_get() @feature --- src/lib/ecore_wl2/Ecore_Wl2.h | 12 ++++++++++++ src/lib/ecore_wl2/ecore_wl2_display.c | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 26ebb2c57d..8e0e39832e 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -568,6 +568,18 @@ EAPI struct wl_registry *ecore_wl2_display_registry_get(Ecore_Wl2_Display *displ */ EAPI Eina_Bool ecore_wl2_display_sync_is_done(const Ecore_Wl2_Display *display); +/** + * Get the name of the display object + * + * @param display The display + * + * @return The name of the display object + * + * @ingroup Ecore_Wl2_Display_Group + * @since 1.20 + */ +EAPI const char *ecore_wl2_display_name_get(const Ecore_Wl2_Display *display); + /** * @defgroup Ecore_Wl2_Window_Group Wayland Library Window Functions * @ingroup Ecore_Wl2_Group diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index e6c60fa03e..0832c69505 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -980,3 +980,10 @@ ecore_wl2_display_sync_is_done(const Ecore_Wl2_Display *display) EINA_SAFETY_ON_NULL_RETURN_VAL(display, EINA_FALSE); return display->sync_done; } + +EAPI const char * +ecore_wl2_display_name_get(const Ecore_Wl2_Display *display) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL); + return display->name; +}