vbeModes.h revision f78b12e570284aa8291f4ca1add24937fd107403
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Copyright © 2002 David Dawes
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * copy of this software and associated documentation files (the "Software"),
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * to deal in the Software without restriction, including without limitation
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * and/or sell copies of the Software, and to permit persons to whom the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Software is furnished to do so, subject to the following conditions:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The above copyright notice and this permission notice shall be included in
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * all copies or substantial portions of the Software.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * SOFTWARE.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Except as contained in this notice, the name of the author(s) shall
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * not be used in advertising or otherwise to promote the sale, use or other
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * dealings in this Software without prior written authorization from
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * the author(s).
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Authors: David Dawes <dawes@xfree86.org>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * This is intended to be stored in the DisplayModeRec's private area.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * It includes all the information necessary to VBE information.
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _VbeModeInfoData {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define VBE_MODE_SUPPORTED(m) (((m)->ModeAttributes & 0x01) != 0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define VBE_MODE_COLOR(m) (((m)->ModeAttributes & 0x08) != 0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define VBE_MODE_GRAPHICS(m) (((m)->ModeAttributes & 0x10) != 0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define VBE_MODE_VGA(m) (((m)->ModeAttributes & 0x40) == 0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define VBE_MODE_LINEAR(m) (((m)->ModeAttributes & 0x80) != 0 && \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define VBE_MODE_USABLE(m, f) (VBE_MODE_SUPPORTED(m) || \
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern _X_EXPORT int VBEFindSupportedDepths(vbeInfoPtr pVbe, VbeInfoBlock *vbe,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern _X_EXPORT DisplayModePtr VBEGetModePool(ScrnInfoPtr pScrn, vbeInfoPtr pVbe,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern _X_EXPORT void VBESetModeNames(DisplayModePtr pMode);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern _X_EXPORT void VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Note: These are alternatives to the standard helpers. They should
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * usually just wrap the standard helpers.
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern _X_EXPORT int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern _X_EXPORT void VBEPrintModes(ScrnInfoPtr scrp);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif /* VBE_MODES_H */