aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm2/Ecore_Drm2.h
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-11-14 15:22:19 -0500
committerChris Michael <cp.michael@samsung.com>2016-11-15 08:42:07 -0500
commitfbc58c3424f3ae4893b94cde7adac4e71d7ff526 (patch)
treef3c0fe3384462178f6d6eb7853a542e9efd8d4a4 /src/lib/ecore_drm2/Ecore_Drm2.h
parentecore-drm2: Make calls to symlink'd libdrm functions (diff)
downloadefl-fbc58c3424f3ae4893b94cde7adac4e71d7ff526.tar.gz
ecore-drm2: Add API function for drmHandleEvent
As we are not compile-time linking to libdrm anymore, Ecore_Evas_Drm needs to be able to call drmHandleEvent, so add an API function to Ecore_Drm2 that can be used there. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm2/Ecore_Drm2.h')
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 209453eda2..7712643114 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -58,6 +58,16 @@ typedef struct _Ecore_Drm2_Event_Activate
Eina_Bool active : 1;
} Ecore_Drm2_Event_Activate;
+/* structure to represent a drm event context */
+typedef struct _Ecore_Drm2_Context
+{
+ int version;
+ void (*vblank_handler)(int fd, unsigned int sequence, unsigned int tv_sec,
+ unsigned int tv_usec, void *user_data);
+ void (*page_flip_handler)(int fd, unsigned int sequence, unsigned int tv_sec,
+ unsigned int tv_usec, void *user_data);
+} Ecore_Drm2_Context;
+
EAPI extern int ECORE_DRM2_EVENT_OUTPUT_CHANGED;
EAPI extern int ECORE_DRM2_EVENT_ACTIVATE;
@@ -107,6 +117,23 @@ EAPI int ecore_drm2_init(void);
EAPI int ecore_drm2_shutdown(void);
/**
+ * Read and process pending Drm events
+ *
+ * @param fd drm file descriptor
+ * @param ctx
+ *
+ * @return 0 on success, -1 otherwise
+ *
+ * @note: Do not ever use this function in applications !!!
+ * This is a special-purpose API function and should not be used by
+ * application developers.
+ *
+ * @ingroup Ecore_Drm_Init_Group
+ * @since 1.19
+ */
+EAPI int ecore_drm2_event_handle(int fd, Ecore_Drm2_Context *drmctx);
+
+/**
* @defgroup Ecore_Drm2_Device_Group Drm device functions
*
* Functions that deal with finding, opening, closing, or obtaining various