aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm2/Ecore_Drm2.h
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-02 10:40:47 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-27 11:57:53 -0400
commit9c7b6572875d5245ae69300936d1cb942bfd0498 (patch)
treedac2e60e6fef3019ab73699d16387c82f90e2d0d /src/lib/ecore_drm2/Ecore_Drm2.h
parentecore-drm2: Add start of Ecore_Drm2 library (diff)
downloadefl-9c7b6572875d5245ae69300936d1cb942bfd0498.tar.gz
ecore-drm2: Add API functions to work with a drm device
This commit adds new API functions to find, open, and close a drm device, along with API functions to retrieve clock_id and cursor size. 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.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index b2bbd15e02..bf08be22c5 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -28,6 +28,9 @@
# ifdef EFL_BETA_API_SUPPORT
+/* opaque structure to represent a drm device */
+typedef struct _Ecore_Drm2_Device Ecore_Drm2_Device;
+
/**
* @file
* @brief Ecore functions for dealing with drm, virtual terminals
@@ -69,6 +72,83 @@ EAPI int ecore_drm2_init(void);
*/
EAPI int ecore_drm2_shutdown(void);
+/**
+ * @defgroup Ecore_Drm2_Device_Group Drm device functions
+ *
+ * Functions that deal with finding, opening, closing, or obtaining various
+ * information about a drm device
+ */
+
+/**
+ * Try to find a drm device on a given seat
+ *
+ * @param seat
+ * @param tty
+ * @param sync
+ *
+ * @return A newly allocated Ecore_Drm2_Device on success, NULL otherwise
+ *
+ * @ingroup Ecore_Drm2_Device_Group
+ * @since 1.18
+ */
+EAPI Ecore_Drm2_Device *ecore_drm2_device_find(const char *seat, unsigned int tty, Eina_Bool sync);
+
+/**
+ * Try to open a given Ecore_Drm2_Device
+ *
+ * @param device
+ *
+ * @return A valid file descriptor if open succeeds, -1 otherwise.
+ *
+ * @ingroup Ecore_Drm2_Device_Group
+ * @since 1.18
+ */
+EAPI int ecore_drm2_device_open(Ecore_Drm2_Device *device);
+
+/**
+ * Close an open Ecore_Drm2_Device
+ *
+ * @param device
+ *
+ * @ingroup Ecore_Drm2_Device_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm2_device_close(Ecore_Drm2_Device *device);
+
+/**
+ * Free a given Ecore_Drm2_Device
+ *
+ * @param device
+ *
+ * @ingroup Ecore_Drm2_Device_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm2_device_free(Ecore_Drm2_Device *device);
+
+/**
+ * Get the type of clock used by a given Ecore_Drm2_Device
+ *
+ * @param device
+ *
+ * @return The clockid_t used by this drm device
+ *
+ * @ingroup Ecore_Drm2_Device_Group
+ * @since 1.18
+ */
+EAPI int ecore_drm2_device_clock_id_get(Ecore_Drm2_Device *device);
+
+/**
+ * Get the size of the cursor supported by a given Ecore_Drm2_Device
+ *
+ * @param device
+ * @param width
+ * @param height
+ *
+ * @ingroup Ecore_Drm2_Device_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm2_device_cursor_size_get(Ecore_Drm2_Device *device, int *width, int *height);
+
# endif
#endif