OpenFramebuffer() should pass the client everything
it needs to know to be able to open the framebuffer. These
parameters are OS specific and their meanings are to be interpreted
by an OS specific client library.

name

The name of the device to open or NULL if
there is no special device to open. A NULL
name tells the client that it should open whatever device
one would usually open to access physical memory.

mem

The physical address of the start of the framebuffer, or the
mmap(2) offset into the device designated by
name. This is actually a pointer to two
consecutive 32-bit values. Regardless of hardware architecture,
the first of these is to be set to the low-order 32 bits of the
address or offset, and the second is to be set to the high-order
32 bits.

size

The size of the framebuffer in bytes.

offset

Any offset into the device, if applicable.

flags

Any additional information that the client may need.
Currently, only the DGA_NEED_ROOT flag is
defined.

void CloseFramebuffer (pScrn)

CloseFramebuffer() merely informs the driver (if it
even cares) that client no longer needs to access the framebuffer
directly. This function is optional.

Bool SetMode (pScrn, pMode)

SetMode() tells the driver to initialize the mode
passed to it. If pMode is NULL,
then the driver should restore the original pre-DGA mode.

void SetViewport (pScrn, x, y, flags)

SetViewport() tells the driver to make the upper
left-hand corner of the visible screen correspond to coordinate
(x,y) on the framebuffer. Flags
currently defined are:

DGA_FLIP_IMMEDIATE

The viewport change should occur immediately.

DGA_FLIP_RETRACE

The viewport change should occur at the
vertical retrace, but this function should
return sooner if possible.

The (x,y) locations will be passed as the client
specified them, however, the driver is expected to round these
locations down to the next supported location as specified by the
xViewportStep and yViewportStep
for the current mode.

int GetViewport (pScrn)

GetViewport() gets the current page flip status.
Set bits in the returned int correspond to viewport change requests
still pending. For instance, set bit zero if the last SetViewport
request is still pending, bit one if the one before that is still
pending, etc.

void Sync (pScrn)

This function should ensure that any graphics accelerator operations
have finished. This function should not return until the graphics
accelerator is idle.

void FillRect (pScrn, x, y, w, h, color)

This optional function should fill a rectangle
w x h located at
(x,y) in the given color.

void BlitRect (pScrn, srcx, srcy, w, h, dstx, dsty)

This optional function should copy an area
w x h located at
(srcx,srcy) to location (dstx,dsty).
This function will need to handle copy directions as appropriate.

void BlitTransRect (pScrn, srcx, srcy, w, h, dstx, dsty, color)

This optional function is the same as BlitRect except that pixels
in the source corresponding to the color key color
should be skipped.