summaryrefslogtreecommitdiff
path: root/man/drmHandleEvent.man
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2012-09-06 16:16:50 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-09-17 08:07:04 -0700
commit2426a6a7112ae62755408a371831eddbe2d89d99 (patch)
treeeb887b44553dde049e767aeff4db57fd37634a74 /man/drmHandleEvent.man
parent1b7ce582ceac74c7c5f1989c611b4f01a2a18434 (diff)
libdrm: man page infrastructure and a few sample man pages
Diffstat (limited to 'man/drmHandleEvent.man')
-rw-r--r--man/drmHandleEvent.man45
1 files changed, 45 insertions, 0 deletions
diff --git a/man/drmHandleEvent.man b/man/drmHandleEvent.man
new file mode 100644
index 00000000..b98f417d
--- /dev/null
+++ b/man/drmHandleEvent.man
@@ -0,0 +1,45 @@
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH drmHandleEvent __drivermansuffix__ __vendorversion__
+.SH NAME
+drmHandleEvent \- read and process pending DRM events
+.SH SYNOPSIS
+.nf
+.B "#include <xf86drm.h>"
+
+.B "typedef struct _drmEventContext {"
+.BI " int version;"
+.BI " void (*vblank_handler)(int fd,"
+.BI " unsigned int sequence,"
+.BI " unsigned int tv_sec,"
+.BI " unsigned int tv_usec,"
+.BI " void *user_data);"
+.BI " void (*page_flip_handler)(int fd,"
+.BI " unsigned int sequence,"
+.BI " unsigned int tv_sec,"
+.BI " unsigned int tv_usec,"
+.BI " void *user_data);"
+.B "} drmEventContext, *drmEventContextPtr;"
+
+.B "int drmHandleEvent(int fd, drmEventContextPtr evctx);"
+.fi
+.SH DESCRIPTION
+This function will process outstanding DRM events on
+.I fd
+, which must be an open DRM device. This function should be called after
+the DRM file descriptor has polled readable; it will read the events and
+use the passed-in
+.I evctx
+structure to call function pointers with the parameters noted above.
+
+.SH RETURN VALUE
+Returns 0 on success, or if there is no data to read from the file descriptor.
+Returns -1 if the read on the file descriptor fails or returns less than a
+full event record.
+
+.SH REPORTING BUGS
+Bugs in this function should be reported to http://bugs.freedesktop.org under
+the "Mesa" product, with "Other" or "libdrm" as the component.
+
+.SH "SEE ALSO"
+drmModePageFlip(__libmansuffix__), drmWaitVBlank(__libmansuffix__)