Copyright (C) 2000-2012 |
Manpages XF86VIDMODESection: X FUNCTIONS (3X11)Updated: Version 4.1.0.1 Index Return to Main Contents NAMEXF86VidModeQueryExtension, XF86VidModeQueryVersion, XF86VidModeSetClientVersion, XF86VidModeGetModeLine, XF86VidModeGetAllModeLines, XF86VidModeDeleteModeLine, XF86VidModeModModeLine, XF86VidModeValidateModeLine, XF86VidModeSwitchMode, XF86VidModeSwitchToMode, XF86VidModeLockModeSwitch, XF86VidModeGetMonitor, XF86VidModeGetViewPort, XF86VidModeSetViewPort, XF86VidModeGetDotClocks, XF86VidModeGetGamma, XF86VidModeSetGamma, XF86VidModeGetGammaRamp, XF86VidModeSetGammaRamp, XF86VidModeGetGammaRampSize - XFree86-VidMode extension interface functionsSYNTAX#include <X11/extensions/xf86vmode.h> Bool XF86VidModeQueryExtension( Display *display, int *event_base_return, int *error_base_return); Bool XF86VidModeQueryVersion( Display *display, int *major_version_return, int *minor_version_return); Bool XF86VidModeSetClientVersion( Display *display); Bool XF86VidModeGetModeLine( Display *display, int screen, int *dotclock_return, XF86VidModeModeLine *modeline); Bool XF86VidModeGetAllModeLines( Display *display, int screen, int *modecount_return, XF86VidModeModeInfo ***modesinfo); Bool XF86VidModeDeleteModeLine( Display *display, int screen, XF86VidModeModeInfo *modeline); Bool XF86VidModeModModeLine( Display *display, int screen, XF86VidModeModeLine *modeline); Status XF86VidModeValidateModeLine( Display *display, int screen, XF86VidModeModeLine *modeline); Bool XF86VidModeSwitchMode( Display *display, int screen, int zoom); Bool XF86VidModeSwitchToMode( Display *display, int screen, XF86VidModeModeInfo *modeline); Bool XF86VidModeLockModeSwitch( Display *display, int screen, int lock); Bool XF86VidModeGetMonitor( Display *display, int screen, XF86VidModeMonitor *monitor); Bool XF86VidModeGetViewPort( Display *display, int screen, int *x_return, int *y_return); Bool XF86VidModeSetViewPort( Display *display, int screen, int x, int y); XF86VidModeGetDotClocks( Display *display, int screen, int *flags return, int *number of clocks return, int *max dot clock return, int **clocks return); XF86VidModeGetGamma( Display *display, int screen, XF86VidModeGamma *Gamma); XF86VidModeSetGamma( Display *display, int screen, XF86VidModeGamma *Gamma); XF86VidModeGetGammaRamp( Display *display, int screen, int size, unsigned short *red array, unsigned short *green array, unsigned short *blue array); XF86VidModeSetGammaRamp( Display *display, int screen, int size, unsigned short *red array, unsigned short *green array, unsigned short *blue array); XF86VidModeGetGammaRampSize( Display *display, int screen, int *size); ARGUMENTS
STRUCTURESVideo Mode Settings: typedef struct { unsigned short hdisplay; unsigned short hsyncstart; unsigned short hsyncend; unsigned short htotal; unsigned short vdisplay; unsigned short vsyncstart; unsigned short vsyncend; unsigned short vtotal; unsigned int flags; int privsize; INT32 *private; } XF86VidModeModeLine; typedef struct { unsigned int dotclock; unsigned short hdisplay; unsigned short hsyncstart; unsigned short hsyncend; unsigned short htotal; unsigned short vdisplay; unsigned short vsyncstart; unsigned short vsyncend; unsigned short vtotal; unsigned int flags; int privsize; INT32 *private; } XF86VidModeModeInfo; Monitor information: typedef struct { char* vendor; char* model; float bandwidth; unsigned char nhsync; XF86VidModeSyncRange* hsync; unsigned char nvsync; XF86VidModeSyncRange* vsync; } XF86VidModeMonitor; typedef struct { float hi; float lo; } XF86VidModeSyncRange; typedef struct { int type; unsigned long serial; Bool send_event; Display *display; Window root; int state; int kind; Bool forced; Time time; } XF86VidModeNotifyEvent; typedef struct { float red; float green; float blue; } XF86VidModeGamma; DESCRIPTIONThese functions provide an interface to the server extension XFree86-VidModeExtension which allows the video modes to be queried and adjusted dynamically and mode switching to be controlled. Applications that use these functions must be linked with -lXxf86vmMODELINE FUNCTIONSThe XF86VidModeGetModeLine function is used to query the settings for the currently selected video mode. The calling program should pass a pointer to a XF86VidModeModeLine structure that it has already allocated. The function fills in the fields of the structure.If there are any server private values (currently only applicable to the S3 server) the function will allocate storage for them. Therefore, if the privsize field is non-zero, the calling program should call Xfree(private) to free the storage. XF86VidModeGetAllModeLines returns the settings for all video modes. The calling program supplies the address of a pointer which will be set by the function to point to an array of XF86VidModeModeInfo structures. The memory occupied by the array is dynamically allocated by the XF86VidModeGetAllModeLines function and should be freed by the caller. The first element of the array corresponds to the current video mode. The XF86VidModeModModeLine function can be used to change the settings of the current video mode provided the requested settings are valid (e.g. they don't exceed the capabilities of the monitor). Modes can be deleted with the XF86VidModeDeleteModeLine function. The specified mode must match an existing mode. To be considered a match, all of the fields of the given XF86VidModeModeInfo structure must match, except the privsize and private fields. If the mode to be deleted is the current mode, a mode switch to the next mode will occur first. The last remaining mode can not be deleted. The validity of a mode can be checked with the XF86VidModeValidateModeLine function. If the specified mode can be used by the server (i.e. meets all the constraints placed upon a mode by the combination of the server, card, and monitor) the function returns MODE_OK, otherwise it returns a value indicating the reason why the mode is invalid (as defined in xf86.h) MODE SWITCH FUNCTIONSWhen the function XF86VidModeSwitchMode is called, the server will change the video mode to next (or previous) video mode. The XF86VidModeSwitchToMode function can be used to switch directly to the specified mode. Matching is as specified in the description of the XF86VidModeAddModeLine function above. The XF86VidModeLockModeSwitch function can be used to allow or disallow mode switching whether the request to switch modes comes from a call to the XF86VidModeSwitchMode or XF86VidModeSwitchToMode functions or from one of the mode switch key sequences.MONITOR FUNCTIONSInformation known to the server about the monitor is returned by the XF86VidModeGetMonitor function. The hsync and vsync fields each point to an array of XF86VidModeSyncRange structures. The arrays contain nhsync and nvsync elements, respectively. The hi and low values will be equal if a discreate value was given in the XF86Config file.The vendor, model, hsync, and vsync fields point to dynamically allocated storage that should be freed by the caller. VIEWPORT FUNCTIONSThe XF86VidModeGetViewPort and XF86VidModeSetViewPort functions can be used to, respectively, query and change the location of the upper left corner of the viewport into the virtual screen.OTHER FUNCTIONSThe XF86VidModeQueryVersion function can be used to determine the version of the extension built into the server.The function XF86VidModeQueryExtension returns the lowest numbered error and event values assigned to the extension. BUGSThe XF86VidModeSetClientVersion, XF86VidModeGetDotClocks, XF86VidModeGetGamma, XF86VidModeSetGamma, XF86VidModeSetGammaRamp, XF86VidModeGetGammaRamp, and XF86VidModeGetGammaRampSize functions need to be documented.SEE ALSOXFree86(1), XF86Config(4/5), xvidtune(1)AUTHORSKaleb Keithley, Jon Tombs, David Dawes, and Joe Moss
IndexThis document was created by man2html, using the manual pages. Time: 07:35:19 GMT, April 26, 2024 |