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