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