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