home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / mips / mipsFb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-18  |  2.8 KB  |  75 lines

  1. /*
  2.  * $XConsortium: mipsFb.h,v 1.4 91/07/18 22:58:18 keith Exp $
  3.  *
  4.  * Copyright 1991 MIPS Computer Systems, Inc.
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of MIPS not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  MIPS makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * MIPS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL MIPS
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  */
  23. /* $Header: mipsFb.h,v 1.4 91/07/18 22:58:18 keith Exp $ */
  24. #ifndef __DDX_MIPSFB_H
  25. #define    __DDX_MIPSFB_H
  26.  
  27. /* private per-screen information */
  28.  
  29. typedef struct _MipsScreen {
  30.     char type;        /* screen type */
  31. #define        MIPS_SCRTYPE_DISABLED    0
  32. #define        MIPS_SCRTYPE_COLOR    1
  33. #define        MIPS_SCRTYPE_MONO    2
  34.     char unit;        /* display unit number */
  35.     char bitsPerPixel;    /* bits occupied */
  36.     char depth;        /* bits actually present */
  37.     short dpi;        /* resolution */
  38.  
  39.     short scr_width;    /* visible */
  40.     short scr_height;    /* visible */
  41.     unsigned char *fbnorm;    /* normal framebuffer mapping */
  42.     unsigned char *fbcache;    /* cached framebuffer mapping */
  43.     unsigned char *fbnocache; /* uncached framebuffer mapping */
  44.     unsigned char *fbspec;    /* special framebuffer mapping */
  45.     unsigned char *fbreg;    /* framebuffer registers */
  46.     int fb_width;        /* pixels per scanline (fbnorm) */
  47.  
  48.     int cap;        /* device capabilities */
  49. #define        MIPS_SCR_CURSOR    1    /* HW cursor */
  50. #define        MIPS_SCR_PACKED    2    /* packed mode */
  51. #define        MIPS_SCR_FILL    4    /* fill mode */
  52. #define        MIPS_SCR_MASK    8    /* plane mask */
  53.  
  54.     Bool (*CloseScreen)();    /* wrapped screen close */
  55.  
  56.     void (*Blank)();    /* screen blank/unblank */
  57.     void (*WriteCMap)();    /* colormap load */
  58.     void (*Close)();    /* restore normal state */
  59.  
  60.     Bool (*RealizeCursor)(); /* HW cursor support */
  61.     void (*SetCursor)();
  62.     void (*MoveCursor)();
  63.     void (*RecolorCursor)();
  64.     int xhot, yhot;        /* cursor hot spot (device dependent) */
  65.  
  66.     ColormapPtr InstalledMap; /* current colormap for this screen */
  67. } MipsScreenRec, *MipsScreenPtr;
  68.  
  69. extern MipsScreenRec mipsScreen[];
  70.  
  71. #define    MipsScreenToPriv(scr)    (&mipsScreen[(scr)->myNum])
  72. #define    MipsScreenNumToPriv(n)    (&mipsScreen[(n)])
  73.  
  74. #endif /* __DDX_MIPSFB_H */
  75.