home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / x386 / x386.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-02  |  2.9 KB  |  103 lines

  1. /*
  2.  * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and its
  5.  * documentation for any purpose is hereby granted without fee, provided that
  6.  * the above copyright notice appear in all copies and that both that
  7.  * copyright notice and this permission notice appear in supporting
  8.  * documentation, and that the name of Thomas Roell not be used in
  9.  * advertising or publicity pertaining to distribution of the software without
  10.  * specific, written prior permission.  Thomas Roell makes no representations
  11.  * about the suitability of this software for any purpose.  It is provided
  12.  * "as is" without express or implied warranty.
  13.  *
  14.  * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  16.  * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  18.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  19.  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  20.  * PERFORMANCE OF THIS SOFTWARE.
  21.  *
  22.  * $Header: /proj/X11/mit/server/ddx/x386/RCS/x386.h,v 1.1 1991/06/02 22:36:07 root Exp $
  23.  */
  24.  
  25. #ifndef _X386_H
  26. #define _X386_H
  27.  
  28. /*
  29.  * structure common for all modes
  30.  */
  31. typedef struct _DispM {
  32.   struct _DispM    *prev,*next;
  33.   char        *name;              /* identifier of this mode */
  34.   int        Clock;              /* doclock */
  35.   int           HDisplay;           /* horizontal timing */
  36.   int           HSyncStart;
  37.   int           HSyncEnd;
  38.   int           HTotal;
  39.   int           VDisplay;           /* vertical timing */
  40.   int           VSyncStart;
  41.   int           VSyncEnd;
  42.   int           VTotal;
  43.   int           Flags;
  44. } DisplayModeRec, *DisplayModePtr;
  45.  
  46. #define V_PHSYNC    0x0001
  47. #define V_NHSYNC    0x0002
  48. #define V_PVSYNC    0x0004
  49. #define V_NVSYNC    0x0008
  50. #define V_INTERLACE 0x0010
  51. #define V_DBLSCAN   0x0020
  52.  
  53. #define MAXCLOCKS   32
  54.  
  55. /*
  56.  * the graphic device
  57.  */
  58. typedef struct {
  59.   Bool           configured;
  60.   int            index;
  61.   Bool           (* Probe)();
  62.   Bool           (* Init)();
  63.   void           (* EnterLeaveVT)();
  64.   void           (* EnterLeaveMonitor)();
  65.   void           (* EnterLeaveCursor)();
  66.   void           (* AdjustFrame)();
  67.   void           (* SwitchMode)();
  68.   int            depth;
  69.   int            bitsPerPixel;
  70.   int            defaultVisual;
  71.   int            virtualX,virtualY; 
  72.   int            frameX0, frameY0, frameX1, frameY1;
  73.   char           *vendor;
  74.   char           *chipset;
  75.   int            clocks;
  76.   int            clock[MAXCLOCKS];
  77.   int            videoRam;
  78.   int            width, height;            /* real display dimensions */
  79.   DisplayModePtr modes;
  80. } ScrnInfoRec, *ScrnInfoPtr;
  81.  
  82. #define VGA_DRIVER  1
  83. #define V256_DRIVER 2
  84. #define WGA_DRIVER  3
  85. #define XGA_DRIVER  4
  86.  
  87. #define ENTER       1
  88. #define LEAVE       0
  89.  
  90. extern Bool        x386VTSema;
  91.  
  92. #endif /* _X386_H */
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.