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