uterm: video: return buffer information on display_use()
authorDavid Herrmann <dh.herrmann@googlemail.com>
Mon, 14 Jan 2013 19:57:15 +0000 (20:57 +0100)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Mon, 14 Jan 2013 19:57:15 +0000 (20:57 +0100)
commit3eb9cc6f50f96fcf6ba87408064c2d8090d401cb
tree7f0a3856e94b773eec89f12e0dc0d73ce959bdd9
parent0b25c9f68ae24fdb384f0e88c8a138e1cad80ace
uterm: video: return buffer information on display_use()

uterm_display_use() now returns the current back-buffer index when called.
It returns <0 on error. Whether OpenGL is supported is returned via a new
parameter "opengl". Set it to NULL if you're not interested.

Note that a backend might support OpenGL _and_ memory-mapped buffer
access. But you shouldn't rely on uterm_display_use() to return the
correct buffer-index if uterm_display_get_buffers() is not supported. For
instance the DRM-3D backend always returns 0 as buffer index as it has no
way of detecting it, yet.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/kmscon_terminal.c
src/text_gltex.c
src/uterm_fbdev_video.c
src/uterm_video.c
src/uterm_video.h
src/uterm_video_drm.c
src/uterm_video_dumb.c
src/uterm_video_internal.h