Annotation of researchv9/X11/src/X.V11R1/server/ddx/qvss/init.c, revision 1.1.1.1

1.1       root        1: /***********************************************************
                      2: Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
                      3: and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
                      4: 
                      5:                         All Rights Reserved
                      6: 
                      7: Permission to use, copy, modify, and distribute this software and its 
                      8: documentation for any purpose and without fee is hereby granted, 
                      9: provided that the above copyright notice appear in all copies and that
                     10: both that copyright notice and this permission notice appear in 
                     11: supporting documentation, and that the names of Digital or MIT not be
                     12: used in advertising or publicity pertaining to distribution of the
                     13: software without specific, written prior permission.  
                     14: 
                     15: DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
                     16: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
                     17: DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
                     18: ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
                     19: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
                     20: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
                     21: SOFTWARE.
                     22: 
                     23: ******************************************************************/
                     24: 
                     25: /* $Header: init.c,v 1.27 87/09/09 17:09:06 rws Exp $ */
                     26: 
                     27: #include "X.h"
                     28: #include "Xproto.h"
                     29: #include "screenint.h"
                     30: #include "input.h"
                     31: #include "cursor.h"
                     32: #include "misc.h"
                     33: #include "scrnintstr.h"
                     34: #include "servermd.h"
                     35: 
                     36: extern Bool qvssScreenInit();          /* qvss specific code, which
                     37:                                           calls mfbScreenInit */
                     38: extern int qvssMouseProc();
                     39: extern int qvssKeybdProc();
                     40: 
                     41: #define MOTION_BUFFER_SIZE 0
                     42: #define NUMSCREENS 1
                     43: #define NUMFORMATS 1
                     44: 
                     45: static PixmapFormatRec formats[] = {{1, 1, BITMAP_SCANLINE_PAD}};
                     46: 
                     47: InitOutput(screenInfo, argc, argv)
                     48:     ScreenInfo *screenInfo;
                     49:     int argc;
                     50:     char **argv;
                     51: {
                     52:     int i;
                     53: 
                     54:     screenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
                     55:     screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
                     56:     screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
                     57:     screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER;
                     58: 
                     59:     screenInfo->numPixmapFormats = NUMFORMATS;
                     60:     for (i=0; i< NUMFORMATS; i++)
                     61:     {
                     62:        screenInfo->formats[i].depth = formats[i].depth;
                     63:        screenInfo->formats[i].bitsPerPixel = formats[i].bitsPerPixel;
                     64:        screenInfo->formats[i].scanlinePad = formats[i].scanlinePad;
                     65:     }
                     66: 
                     67:     AddScreen(qvssScreenInit, argc, argv);
                     68: }
                     69: 
                     70: /* ARGSUSED */
                     71: void
                     72: InitInput(argc, argv)
                     73:     int argc;
                     74:     char *argv[];
                     75: {
                     76:     DevicePtr p, k;
                     77:     
                     78:     p = AddInputDevice(qvssMouseProc, TRUE);
                     79: 
                     80:     k = AddInputDevice(qvssKeybdProc, TRUE);
                     81: 
                     82:     RegisterPointerDevice(p, MOTION_BUFFER_SIZE);
                     83:     RegisterKeyboardDevice(k);
                     84: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.