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