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