|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.1 (the "License"). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License. ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 24: ! 25: /***************************************************************************** ! 26: ! 27: vga.h ! 28: Header file for VGA Device Driver ! 29: ! 30: ******************************************************************************/ ! 31: ! 32: #import PACKAGE_SPECS ! 33: #import ENVIRONMENT ! 34: #import MOUSEKEYBOARD ! 35: ! 36: // VGA mode selection is done here for now. ! 37: ! 38: #define VGA_MODE MODE_VGA_AT_12 ! 39: #define VGA_WIDTH 640 /* Pixels wide (visible pixels) */ ! 40: #define VGA_HEIGHT 480 /* Pixels high (visible scanlines)*/ ! 41: #define VGAFLUSH(bounds) vga_at_mode12_bpp2_to_bpp4(bounds) ! 42: ! 43: #if 0 ! 44: #define VGA_MODE MODE_VGA_TS_29 ! 45: #define VGA_WIDTH 800 /* Pixels wide (visible pixels) */ ! 46: #define VGA_HEIGHT 600 /* Pixels high (visible scanlines)*/ ! 47: #define VGAFLUSH(bounds) vga_ts_mode29_bpp2_to_bpp4(bounds) ! 48: #endif ! 49: ! 50: #if 0 ! 51: #define VGA_MODE MODE_VGA_TS_37n ! 52: #define VGA_WIDTH 1024 /* Pixels wide (visible pixels) */ ! 53: #define VGA_HEIGHT 768 /* Pixels high (visible scanlines)*/ ! 54: #define VGAFLUSH(bounds) vga_ts_mode37n_bpp2_to_bpp4(bounds) ! 55: #endif ! 56: ! 57: #define VGA_ROMID 0 /* Unique ROM id for product (dummy value) */ ! 58: #define VGA_ROWBYTES (VGA_WIDTH / 4) /* Row bytes to start of next line (not used) */ ! 59: ! 60: #define VGA_SAMPLES_PER_CHAN 0 /* LUT entries per channel */ ! 61: ! 62: /* Private state information cached in the NXSDevice priv field. */ ! 63: ! 64: typedef struct _VGA_PrivInfo_ { ! 65: unsigned int *vgaVirtAddr; ! 66: uint bytes_per_scanline; ! 67: int monitorType; ! 68: } VGA_PrivInfo; ! 69: #define SHMEMPTR(device) ((VGAShmem_t *)device->shmemPtr) ! 70: #define VGASETSEMA(device) (ev_lock(&(SHMEMPTR(device)->cursorSema))) ! 71: #define VGACLEARSEMA(device) (ev_unlock(&(SHMEMPTR(device)->cursorSema))) ! 72: #define VGAPRIVDRIVER(driver) ((VGA_PrivInfo *)(driver->priv)) ! 73: #define VGAPRIVDEVICE(device) ((VGA_PrivInfo *)(device->driver->priv)) ! 74: ! 75: /* structure for registering graphics package drivers */ ! 76: ! 77: typedef struct package_init_t { ! 78: struct package_init_t *next; ! 79: int package_id; ! 80: void *(*func)(NXDevice *dev, int package_id, void *data); ! 81: } package_init_t; ! 82: ! 83: ! 84: /***************************************************************************** ! 85: Forward Declarations (ANSI C Prototypes) ! 86: ******************************************************************************/ ! 87: ! 88: /**** vga ****/ ! 89: ! 90: extern int VGAStart(NXDriver *); ! 91: extern void VGAInitScreen(NXDevice *); ! 92: extern void VGARegisterScreen(NXDevice *device); ! 93: ! 94: /**** vgacursor ****/ ! 95: ! 96: extern void VGASetCursor(NXDevice *d, LocalBitmap *lbm, Point hotSpot, ! 97: int frame, int *waitCursorFlag); ! 98: extern void VGADisplayCursor2(NXDevice *); ! 99: extern void VGARemoveCursor2(NXDevice *); ! 100: extern void VGAHideCursor(NXDevice *device); ! 101: extern void VGAShowCursor(NXDevice *device); ! 102: extern void VGARevealCursor(NXDevice *device); ! 103: extern void VGAObscureCursor(NXDevice *device); ! 104: extern void VGAShieldCursor(NXDevice *device, Bounds *shieldRect); ! 105: extern void VGAUnshieldCursor(NXDevice *device); ! 106: ! 107: /**** generic ****/ ! 108: ! 109: extern void VGAGenDrvComposite(CompositeOperation *cop, Bounds *dstBounds); ! 110: extern void VGAGenDrvFreeWindow(NXBag *bag, int termflag); ! 111: extern void VGAGenDrvMark(NXBag *bag, int channel, MarkRec *mrec, Bounds *markBds, ! 112: Bounds *bpBds); ! 113: extern void VGAGenDrvMoveWindow(NXBag *bag, short dx, short dy, Bounds *old, ! 114: Bounds *new); ! 115: extern void VGAGenDrvNewAlpha(NXBag *bag); ! 116: extern void VGAGenDrvNewWindow(NXBag *bag, Bounds *bounds, int windowType, ! 117: int depth, int local); ! 118: extern void VGAGenDrvPromoteWindow(NXBag *bag, Bounds *bounds, int newDepth, ! 119: int windowType, DevPoint phase); ! 120: extern int VGAGenDrvWindowSize(NXBag *bag); ! 121: ! 122: ! 123: ! 124: /***************************************************************************** ! 125: Globals ! 126: ******************************************************************************/
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.