5 -----------------------------------
6 read and process pending DRM events
7 -----------------------------------
11 :Manual group: Direct Rendering Manager
16 ``#include <xf86drm.h>``
18 ``int drmHandleEvent(int fd, drmEventContextPtr evctx);``
23 ``drmHandleEvent`` processes outstanding DRM events on the DRM
24 file-descriptor passed as ``fd``. This function should be called after
25 the DRM file-descriptor has polled readable; it will read the events and
26 use the passed-in ``evctx`` structure to call function pointers with the
27 parameters noted below:
31 typedef struct _drmEventContext {
33 void (*vblank_handler) (int fd,
34 unsigned int sequence,
38 void (*page_flip_handler) (int fd,
39 unsigned int sequence,
43 } drmEventContext, *drmEventContextPtr;
48 ``drmHandleEvent`` returns 0 on success, or if there is no data to
49 read from the file-descriptor. Returns -1 if the read on the
50 file-descriptor fails or returns less than a full event record.
55 Bugs in this function should be reported to
56 https://gitlab.freedesktop.org/mesa/drm/-/issues
61 **drm**\ (7), **drm-kms**\ (7), **drmModePageFlip**\ (3),
62 **drmWaitVBlank**\ (3)