Reference

XF86DGA(3x)

XFree86-DGA extension interface functions

NAME

XF86DGAQueryExtension, XF86DGAQueryVersion, XF86DGAQueryDirectVideo, XF86DGAGetVideo, XF86DGADirectVideo, XF86DGASetVidPage, XF86DGASetViewPort, XF86DGAViewPortChanged, XF86DGAGetViewPortSize, XF86DGAInstallColormap, XF86DGAForkApp - XFree86-DGA extension interface functions

SYNTAX


        
    

    
        
            

#include <X11/extensions/xf86dga.h>

Bool XF86DGAQueryExtension(
Display *display,
int *event_base_return,
int *error_base_return);

Bool XF86DGAQueryVersion(
Display *display,
int *major_version_return,
int *minor_version_return);

Bool XF86DGAQueryDirectVideo(
Display *display,
int screen,
int *flags_return);

Bool XF86DGAGetVideo(
Display *display,
int screen,
char **addr_return,
int *width_return,
int *banksize_return,
int *memsize_return);

Bool XF86DGADirectVideo(
Display *display,
int screen,
int flags);

Bool XF86DGASetVidPage(
Display *display,
int screen,
int page);

Bool XF86DGASetViewPort(
Display *display,
int screen,
int x,
int y);

Bool XF86DGAViewPortChanged(
Display *display,
int screen,
int num_pages);

Bool XF86DGAGetViewPortSize(
Display *display,
int screen,
int *viewport_width_return,
int *viewport_height_return);

Bool XF86DGAInstallColormap(
Display *display,
int screen,
Colormap cmap);

int XF86DGAForkApp(
int screen);

ARGUMENTS

display

Specifies the connection to the X server.

screen

Specifies which screen number the setting apply to.

event_base_return

Returns the base event number for the extension.

error_base_return

Returns the base error number for the extension.

major_version_return

Returns the major version number of the extension.

minor_version_return

Returns the minor version number of the extension.

addr_return

Returns a pointer to the start of the video framebuffer.

width_return

Returns the framebuffer line width.

banksize_return

Returns the framebuffer bank size.

memsize_return

Returns the size of the framebuffer memory.

flags

Sets the DirectVideo access features. When zero, DirectVideo mode is disabled. flags may be a a bit-wise combination of the following values:

XF86DGADirectGraphics          enable Direct Video mode
XF86DGADirectMouse             enable reporting of pointer movement
                               as relative motion
XF86DGADirectKeyb              enable direct reporting of keyboard events

flags_return

Reports the DirectVideo features supported by the hardware. When zero, the hardware does not support direct video at all. flags may be a a bit-wise combination of the following values:

XF86DGADirectPresent           DirectVideo support is present

page

Indicates the framebuffer page (bank) to activate for read/write access.

x

Incidates the x coordinate for the upper-left corner of the view port.

y

Incidates the y coordinate for the upper-left corner of the view port.

viewport_width_return

Reports the width of the view port.

viewport_width_return

Reports the height of the view port.

num_pages

Indicates the number of pages when doing hardware multi-buffering.

cmap

Indicates the colormap to install.

DESCRIPTION

These functions provide an interface to the server extension XFree86-DGA which allows a local client direct access to the video framebuffer. Applications that use these functions must be linked with -lXxf86dga

DGA FUNCTIONS

The function XF86DGAQueryDirectVideo returns the DirectVideo capabilities supported by the graphics device.

The XF86DGAGetVideo function is used to get the parameters for the framebuffer. The parameters returned are a pointer to the start of the framebuffer, the framebuffer line width, framebuffer bank size, and framebuffer memory size.

XF86DGADirectVideo is used to enable or disable DirectVideo mode.

The XF86DGASetVidPage function sets the currently active framebuffer page (bank). This is only required for hardware which has a banked memory layout (banksize < memsize).

The XF86DGASetViewPort function sets the framebuffer coordinates to use for the upper-left corner of the view port.

The XF86DGAViewPortChanged function checks whether a previous XF86DGASetViewPort command has been completed by the hardware, that is, whether a vertical retrace has occurred since a previous XF86DGASetViewPort. This can (must, in fact) be used with page-flipping; you can start writing to the next page only when this function returns TRUE. For some devices this will be the case immediately after XF86DGASetViewPort, however this may be changed in the future. The number of pages used is specified with num_pages; it should be 2 for simple page flipping (double buffering). If n is greater than two (triple or multi-buffering), the function checks whether the (n - 2)-before-last SetViewPort has been completed.

The XF86DGAGetViewPortSize function returns the size of the view port, which is the part of the framebuffer that is visible on the screen.

The XF86DGAInstallColormap function is used to install a colormap. This must be called after DirectVideo mode has been enabled.

The XF86DGAForkApp function causes the client application to fork, leaving the parent process to hang around and return to non-DGA mode should the client exit for any reason. This function returns 0 for success, or the error condition returned by fork().

OTHER FUNCTIONS

The XF86DGAQueryVersion function can be used to determine the version of the extension built into the server.

The function XF86DGAQueryExtension returns the lowest numbered error and event values assigned to the extension.

SEE ALSO

XFree86(1), XF86Config(4/5)

AUTHORS

Jon Tombs, Harm Hanemaayer, Mark Vojkovich.

History