sunMfb.c revision ee7c6486
1
2/* $Xorg: sunMfb.c,v 1.4 2001/02/09 02:04:44 xorgcvs Exp $ */
3
4/*
5Copyright 1990, 1993, 1998  The Open Group
6
7Permission to use, copy, modify, distribute, and sell this software and its
8documentation for any purpose is hereby granted without fee, provided that
9the above copyright notice appear in all copies and that both that
10copyright notice and this permission notice appear in supporting
11documentation.
12
13The above copyright notice and this permission notice shall be included in
14all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
19OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23Except as contained in this notice, the name of The Open Group shall not be
24used in advertising or otherwise to promote the sale, use or other dealings
25in this Software without prior written authorization from The Open Group.
26 */
27/* $XFree86: xc/programs/Xserver/hw/sun/sunMfb.c,v 3.4 2001/12/14 19:59:43 dawes Exp $ */
28
29/************************************************************
30Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
31
32                    All Rights Reserved
33
34Permission  to  use,  copy,  modify,  and  distribute   this
35software  and  its documentation for any purpose and without
36fee is hereby granted, provided that the above copyright no-
37tice  appear  in all copies and that both that copyright no-
38tice and this permission notice appear in  supporting  docu-
39mentation,  and  that the names of Sun or The Open Group
40not be used in advertising or publicity pertaining to
41distribution  of  the software  without specific prior
42written permission. Sun and The Open Group make no
43representations about the suitability of this software for
44any purpose. It is provided "as is" without any express or
45implied warranty.
46
47SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO  THIS  SOFTWARE,
48INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
49NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE  LI-
50ABLE  FOR  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
51ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,  DATA  OR
52PROFITS,  WHETHER  IN  AN  ACTION OF CONTRACT, NEGLIGENCE OR
53OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
54THE USE OR PERFORMANCE OF THIS SOFTWARE.
55
56********************************************************/
57
58/*
59 * Copyright 1987 by the Regents of the University of California
60 * Copyright 1987 by Adam de Boor, UC Berkeley
61 *
62 * Permission to use, copy, modify, and distribute this
63 * software and its documentation for any purpose and without
64 * fee is hereby granted, provided that the above copyright
65 * notice appear in all copies.  The University of California
66 * makes no representations about the suitability of this
67 * software for any purpose.  It is provided "as is" without
68 * express or implied warranty.
69 */
70
71/****************************************************************/
72/* Modified from  sunCG4C.c for X11R3 by Tom Jarmolowski	*/
73/****************************************************************/
74
75/*
76 * Copyright 1991, 1992, 1993 Kaleb S. Keithley
77 *
78 * Permission to use, copy, modify, and distribute this
79 * software and its documentation for any purpose and without
80 * fee is hereby granted, provided that the above copyright
81 * notice appear in all copies.  Kaleb S. Keithley makes no
82 * representations about the suitability of this software for
83 * any purpose.  It is provided "as is" without express or
84 * implied warranty.
85 */
86
87#include "sun.h"
88#include "fb.h"
89
90Bool
91sunBW2Init
92(
93    ScreenPtr	    pScreen,  	/* The Screen to initialize */
94    int		    argc,    	/* The number of the Server's arguments. */
95    char	    **argv   	/* The arguments themselves. Don't change! */
96)
97{
98    int	screen = pScreen->myNum;
99
100    sunFbs[screen].EnterLeave = (void (*)(ScreenPtr, int))NoopDDA;
101    if (sunFlipPixels) {
102	pScreen->whitePixel = 1;
103	pScreen->blackPixel = 0;
104    } else {
105	pScreen->whitePixel = 0;
106	pScreen->blackPixel = 1;
107    }
108    return sunInitCommon (screen, pScreen, (off_t) 0,
109	fbScreenInit, NULL,
110	fbCreateDefColormap, sunSaveScreen, 0);
111}
112
113