home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / x386 / x386Priv.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-30  |  3.6 KB  |  108 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/x386Priv.h,v 1.3 1991/06/30 21:02:53 root Exp $
  23.  */
  24.  
  25. #ifndef _X386PRIV_H
  26. #define _X386PRIV_H
  27.  
  28.  
  29. typedef struct {
  30.  
  31.   /* keyboard part */
  32.   DevicePtr     pKeyboard;
  33.   int           (* kbdProc)();        /* procedure for initializing */
  34.   void          (* kbdEvents)();      /* proc for processing events */
  35.   int           consoleFd;
  36.   int           vtno;
  37.   int           kbdType;              /* AT84 / AT101 */
  38.   int           kbdRate;
  39.   int           kbdDelay;
  40.   int           bell_pitch;
  41.   int           bell_duration;
  42.   Bool          autoRepeat;
  43.   unsigned long leds;
  44.   unsigned long xleds;
  45.   int           scanPrefix;           /* scancode-state */
  46.   Bool          capsLock;
  47.   Bool          numLock;
  48.   Bool          scrollLock;
  49.   Bool          modeSwitchLock;
  50.   Bool          serverNumLock;
  51.  
  52.   /* pointer part */
  53.   DevicePtr     pPointer;
  54.   int           (* mseProc)();        /* procedure for initializing */
  55.   void          (* mseEvents)();      /* proc for processing events */
  56.   int           mseFd;
  57.   char          *mseDevice;
  58.   int           mseType;
  59.   int           baudRate;
  60.   int           sampleRate;
  61.   int           lastButtons;
  62.   int           threshold, num, den;  /* acceleration */
  63.   int           emulateState;         /* automata state for 2 button mode */
  64.   Bool          emulate3Buttons;
  65.  
  66.   /* xque part */
  67.   int           xqueFd;
  68.   int           xqueSema;
  69.  
  70.   /* event handler part */
  71.   int           lastEventTime;
  72.   Bool          vtRequestsPending;
  73.   Bool          inputPending;
  74.   Bool          dontZap;
  75.  
  76.   /* graphics part */
  77.   Bool          sharedMonitor;
  78.   ScreenPtr     currentScreen;
  79.  
  80. } x386InfoRec, *x386InfoPtr;
  81.  
  82. extern x386InfoRec x386Info;
  83.  
  84. #define P_MS    0                     /* Microsoft */
  85. #define P_MSC   1                     /* Mouse Systems Corp */
  86. #define P_MM    2                     /* MMseries */
  87. #define P_LOGI  3                     /* Logitech */
  88. #define P_BM    4                     /* BusMouse ??? */
  89.  
  90. /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
  91. #define XLED1   ((unsigned long) 0x00000001)
  92. #define XLED2   ((unsigned long) 0x00000002)
  93. #define XLED3   ((unsigned long) 0x00000004)
  94. #define XCAPS   ((unsigned long) 0x20000000)
  95. #define XNUM    ((unsigned long) 0x40000000)
  96. #define XSCR    ((unsigned long) 0x80000000)
  97.  
  98. extern int x386ScreenIndex;
  99.  
  100. #define X386SCRNINFO(p) ((ScrnInfoPtr)((p)->devPrivates[x386ScreenIndex].ptr))
  101.  
  102. extern int x386MaxScreens;
  103. extern ScrnInfoPtr x386Screens[];
  104.  
  105. #endif /* _X386PRIV_H */
  106.  
  107.  
  108.