ecore-drm: Add API function to return the name of an output
authorChris Michael <cp.michael@samsung.com>
Mon, 4 May 2015 18:06:31 +0000 (14:06 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 7 May 2015 18:39:45 +0000 (14:39 -0400)
Summary: This adds a new API function to turn the name of a given Ecore_Drm_Output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_drm/Ecore_Drm.h
src/lib/ecore_drm/ecore_drm_output.c

index 157d0b8f184ca84b6b7f95d71ea68746c94e6c0a..54e252e4e0b1bd77a0c4a29b0a39c25afac29395 100644 (file)
@@ -708,6 +708,19 @@ EAPI Eina_Stringshare *ecore_drm_output_model_get(Ecore_Drm_Output *output);
  */
 EAPI Eina_Stringshare *ecore_drm_output_make_get(Ecore_Drm_Output *output);
 
+/**
+ * Get the name of Ecore_Drm_Output
+ *
+ * This function will give the name of Ecore_Drm_Output
+ *
+ * @param output The Ecore_Drm_Output to get name for
+ * @return The name. Caller should free this return.
+ *
+ * @ingroup Ecore_Drm_Output_Group
+ * @since 1.15
+ */
+EAPI char *ecore_drm_output_name_get(Ecore_Drm_Output *output);
+
 /**
  * Set the dpms level of an Ecore_Drm_Output
  *
index b564f1062633dd1b9c1a2206221457d93a2f7602..614abea519427b5171335c98f88fe0e06fe88f1e 100644 (file)
@@ -1091,3 +1091,11 @@ ecore_drm_output_connector_id_get(Ecore_Drm_Output *output)
 
    return output->conn_id;
 }
+
+EAPI char *
+ecore_drm_output_name_get(Ecore_Drm_Output *output)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
+
+   return strdup(output->name);
+}