aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm2/Ecore_Drm2.h
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-02 11:26:44 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-27 11:57:53 -0400
commit4e38aabdc09df1ef4ad630caa7fe754433a35d7d (patch)
tree3044c5c6dfdd93ed44a1bb64b96d71226fa0cfd9 /src/lib/ecore_drm2/Ecore_Drm2.h
parentecore-drm2: Add API functions to work with a drm device (diff)
downloadefl-4e38aabdc09df1ef4ad630caa7fe754433a35d7d.tar.gz
ecore-drm2: Add API functions to work with outputs
This patch adds support for creating, destroying, and otherwise working with outputs via exposed API functions. Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_drm2/Ecore_Drm2.h')
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h153
1 files changed, 153 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index bf08be22c5..0bed771489 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -31,6 +31,30 @@
/* opaque structure to represent a drm device */
typedef struct _Ecore_Drm2_Device Ecore_Drm2_Device;
+/* opaque structure to represent a framebuffer object */
+typedef struct _Ecore_Drm2_Fb Ecore_Drm2_Fb;
+
+/* opaque structure to represent an output device */
+typedef struct _Ecore_Drm2_Output Ecore_Drm2_Output;
+
+/* opaque structure to represent an output mode */
+typedef struct _Ecore_Drm2_Output_Mode Ecore_Drm2_Output_Mode;
+
+/* structure to represent event for output changes */
+typedef struct _Ecore_Drm2_Event_Output_Changed
+{
+ unsigned int id;
+ int x, y, w, h;
+ int phys_width, phys_height;
+ unsigned int refresh, scale;
+ int subpixel, transform;
+ const char *make, *model, *name;
+ Eina_Bool connected : 1;
+ Eina_Bool enabled : 1;
+} Ecore_Drm2_Event_Output_Changed;
+
+EAPI extern int ECORE_DRM2_EVENT_OUTPUT_CHANGED;
+
/**
* @file
* @brief Ecore functions for dealing with drm, virtual terminals
@@ -42,6 +66,7 @@ typedef struct _Ecore_Drm2_Device Ecore_Drm2_Device;
*
* @li @ref Ecore_Drm2_Init_Group
* @li @ref Ecore_Drm2_Device_Group
+ * @li @ref Ecore_Drm2_Output_Group
*/
/**
@@ -149,6 +174,134 @@ EAPI int ecore_drm2_device_clock_id_get(Ecore_Drm2_Device *device);
*/
EAPI void ecore_drm2_device_cursor_size_get(Ecore_Drm2_Device *device, int *width, int *height);
+/**
+ * @defgroup Ecore_Drm2_Output_Group Drm output functions
+ *
+ * Functions that deal with setup of outputs
+ */
+
+/**
+ * Iterate drm resources and create outputs
+ *
+ * @param device
+ *
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI Eina_Bool ecore_drm2_outputs_create(Ecore_Drm2_Device *device);
+
+/**
+ * Destroy any created outputs
+ *
+ * @param device
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm2_outputs_destroy(Ecore_Drm2_Device *device);
+
+/**
+ * Get the list of outputs from a drm device
+ *
+ * @param device
+ *
+ * @return
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI const Eina_List *ecore_drm2_outputs_get(Ecore_Drm2_Device *device);
+
+/**
+ * Get the dpms level of a given output
+ *
+ * @param output
+ *
+ * @return Integer value representing the state of DPMS on a given output
+ * or -1 on error
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI int ecore_drm2_output_dpms_get(Ecore_Drm2_Output *output);
+
+/**
+ * Set the dpms level of a given output
+ *
+ * @param output
+ * @param level
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm2_output_dpms_set(Ecore_Drm2_Output *output, int level);
+
+/**
+ * Get the edid of a given output
+ *
+ * @param output
+ *
+ * @return A string representing the edid
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI char *ecore_drm2_output_edid_get(Ecore_Drm2_Output *output);
+
+/**
+ * Get if a given output has a backlight
+ *
+ * @param output
+ *
+ * @return EINA_TRUE if this output has a backlight, EINA_FALSE otherwise
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI Eina_Bool ecore_drm2_output_backlight_get(Ecore_Drm2_Output *output);
+
+/**
+ * Find an output at the given position
+ *
+ * @param device
+ * @param x
+ * @param y
+ *
+ * @return An Ecore_Drm2_Output which exists at the given coordinates, or NULL on failure
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI Ecore_Drm2_Output *ecore_drm2_output_find(Ecore_Drm2_Device *device, int x, int y);
+
+/**
+ * Get the geometry of a given output
+ *
+ * @param output
+ * @param x
+ * @param y
+ * @param w
+ * @param h
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm2_output_geometry_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h);
+
+/**
+ * Get the id of the crtc that an output is using
+ *
+ * @param output
+ *
+ * @return A valid crtc id or 0 on failure
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI unsigned int ecore_drm2_output_crtc_get(Ecore_Drm2_Output *output);
+
# endif
#endif